[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning: implicit conversion from numeric to char
From: |
mmuetzel |
Subject: |
Re: warning: implicit conversion from numeric to char |
Date: |
Sun, 18 Nov 2018 08:18:35 -0600 (CST) |
The warning comes from lines similar to this:
num2str([Decision, sprintf('0.5 ') , sprintf('-1')])
I didn't dive deep enough into your code to guess what you are actually
trying to do. But the result of sprintf is a char vector (fwiw the argument
already is). Your variable Decision is an empty numeric array which is
converted into a char array to do the concatenation with the chars. Hence
the warning.
num2str on a char vector returns the same char vector...
Markus
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html