when i run "fprintf(-), this message shows up. Why? This is not an error.
Show older comments
>> sandy_eig(plant,controller,cost)
* was unexpected at this time.
Plant model # 1
Eigenvalues Damping Frequency(rad/sec) Frequency (Hz)
-0.27573 0.28338i 0.697 0.39538 0.06293
-0.27573 -0.28338i 0.697 0.39538 0.06293
-0.82946 0.00000i 1.000 0.82946 0.13201
-11.84036 5.56036i 0.905 13.08096 2.08190
-11.84036 -5.56036i 0.905 13.08096 2.08190
3 Comments
Walter Roberson
on 10 May 2026 at 11:07
We will need to see the fprintf() call. If you create the format before the call, we will need to see the code that creates the format as well.
Looks like an error to me:
"fprintf(-),
The pasted code in the subject line is isolated from the context -- as @Stephen23 shows, by itself a different error is generated. The interpreter on the real code didn't like where the " is placed in whatever is the whole line or lines of code. As @Walter Roberson notes, will need to see the whole context to interpret.
But, there's more wrong besides the odd/mismatched double quotes character, the isolated minus as the argument is bad syntax as well
fprintf(-)
Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!