Suppose I have a matrix A=[1,2] if I try to print it with command
fprintf("A ", A)
Output
A
Blank A
is printed without values?
It's:
fprintf('A:\n');
fprintf('%f\n', A);
You need to specify a valid format specifier when displaying a variable. Doing %f\n
will print out a single value per line. Please read up on how to use format specifiers from the docs: https://www.gnu.org/software/octave/doc/v4.0.0/Formatted-Output.html#XREFsprintf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With