Error using ==> plot Vectors must be the same lengths.
Mostra commenti meno recenti
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!
Risposte (1)
Wayne King
il 16 Set 2012
Modificato: Wayne King
il 16 Set 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.
Categorie
Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!