I came across a curious error and I'm trying to figure out why this is happening.
I have a vector, date, and a 3-D array, TimePortStats. I'm trying to plot this:
plot(date(t_reg+1:end), TimePortStats(t_reg+1:end,j,k));
But I get this error:
Error using plot
Not enough input arguments.
Now instead, if I do this:
date(t_reg+1:end);
TimePortStats(t_reg+1:end,j,k);
plot(date(t_reg+1:end), TimePortStats(t_reg+1:end,j,k));
It plots fine. Why?

1 commentaire

Hi Jiann,
Are you running these lines in a script or in the Command window? I tried something similar and it runs fine for me. I was not able to reproduce the error.
date = rand(1,5);
TimePortStats = rand(5,5,5);
t_reg = 1;
j = 2 ;
k = 3 ;
plot(date(t_reg+1:end), TimePortStats(t_reg+1:end,j,k));
You can see the Figure plot made by running the above code, attached here.
Can you post the M files and/or data, that you are using, so that we can take a better look at this error and try to reproduce it?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by