Why am I getting this error of not enough input arrangements

1 view (last 30 days)
Input in matlab:
t={0 2.25 4.5 6.33 8 10.25 12 13.5 15.6 17.85 19.6 27 30 38 41 45 47 57};
CBr={0.3335 0.2965 0.266 0.245 0.2255 0.205 0.191 0.1794 0.1632 0.15 0.1429 0.116 0.1053 0.083 0.0767 0.0705 0.0678 0.0553};
plot(t,CBr)
Output in matlab:
Error using plot
Not enough input arguments.

Answers (1)

Star Strider
Star Strider on 7 Jul 2014
You used curly braces {}, creating t and CBr as cell arrays. Change the curly brackets to square brackets and your plot works perfectly:
t=[0 2.25 4.5 6.33 8 10.25 12 13.5 15.6 17.85 19.6 27 30 38 41 45 47 57];
CBr=[0.3335 0.2965 0.266 0.245 0.2255 0.205 0.191 0.1794 0.1632 0.15 0.1429 0.116 0.1053 0.083 0.0767 0.0705 0.0678 0.0553];
plot(t,CBr)
  2 Comments
Toni Addison
Toni Addison on 7 Jul 2014
Thanks so much! I can't believe it was that simple! Still learning how to use matlab so thanks for your assistants!!
Star Strider
Star Strider on 7 Jul 2014
My pleasure!
(The most sincere expression of appreciation here on MATLAB Answers is to Accept the Answer that most closely solves your problem.)

Sign in to comment.

Categories

Find more on Line Plots 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!