Error using ==> plot Vectors must be the same lengths.

Hi! I have three input Mux to Scope. Run the simulation.Open the Scope block, select Parameter. Select the Data history tab, select the Save data to workspace. not select the Limit data points to last. select the type of structure with time.To graph out window Commandwindow, I use the command:
figure(1);
plot(ScopeData.time,ScopeData.signals.values(:));
grid on;
??? Error using ==> plot
Vectors must be the same lengths.
why? please help me!

Respuestas (1)

Wayne King
Wayne King el 16 de Sept. de 2012
Editada: Wayne King el 16 de Sept. de 2012
You have to have an x and y variable that are the same length
So
ScopeData.time and ScopeData.signals.values(:)
do not have the same length
For instance
x = 1:10;
y = randn(11,1);
plot(x,y)
So you should determine what the dimensions (sizes) are of
gives the same error. ScopeData.time and ScopeData.signals.values
If you need to, put a breakpoint on that line in the code that plots and then you can put your cursor over the inputs to see their sizes.

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Sept. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by