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!

Answers (1)

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.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Asked:

on 16 Sep 2012

Community Treasure Hunt

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

Start Hunting!