How do I fix Invalid first data argument ?

37 Ansichten (letzte 30 Tage)
Daniel Oluwalana
Daniel Oluwalana am 3 Feb. 2018
Here's my code. Matlab said there's an error using plot. Please help!
plot ('TBC,theta')
hold on
plot ('TAB, theta')
hold off
grid on
table('TAB & TBC versus theta')
xlabel('theta/ radians');
ylabel ('TAB &TBC /lb');

Akzeptierte Antwort

Les Beckham
Les Beckham am 3 Feb. 2018
The plot() function requires variables as arguments, not a character vector (which is what you have created by putting single quotes around the arguments). Assuming that TBC, TAB, and theta are existing variables in your workspace with consistent dimensions, the plot() commands should work if you take off the single quotes. Also, I think you might mean title() instead of table() on line 6.

Weitere Antworten (0)

Kategorien

Mehr zu Visual Exploration finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by