Error using ==> plot Vectors must be the same lengths.
Afficher commentaires plus anciens
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!
Réponses (1)
Wayne King
le 16 Sep 2012
Modifié(e) : Wayne King
le 16 Sep 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.
Catégories
En savoir plus sur 2-D and 3-D Plots 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!