Doubt in plot XY

1 回表示 (過去 30 日間)
Nuno
Nuno 2011 年 3 月 21 日
I am trying to create a graph but I am not able to because it gives me the following error: "Invalid dimensions encountered while propagating dimensions from output port 1 of 'radiacao/XY Graph/Mux' to input port 1 of 'radiacao/XY Graph/sfunxy'. During propagation, we are attempting to unify the dimensions of the multiplexed signal with dimensions {[1x33],[1x33]} to obtain the dimensions 2."
The chart comes from this code:
function [I,V1] = Corrente(m,I0r,ICC)
%#eml
%Variaveis
VT = 0.0257;
VCA = 32.7;
V1 = (0:1:VCA);
I = ICC - I0r.*(2.718.^(V1./(m.*VT))-1);
I want to graph the curve I in function of V1... Why this error?
  1 件のコメント
Andrew Newell
Andrew Newell 2011 年 3 月 21 日
What command are you using to plot it?

サインインしてコメントする。

回答 (3 件)

Andreas Goser
Andreas Goser 2011 年 3 月 22 日
As the answer is depending from the vizualization command, here a general description for such cases:
1. Find the line with the vizualization command in your code 2. Insert the WHOS command right before this line and apply it for all variables used with the vizualization command. 3. Verify the output's dimension with what the documentation specifies
While this is the description for MATLAB, your error points out you are using Simulink. It is unclear how exactly your MATLAB code is embedded into your model. Can you provide the model?

Nuno
Nuno 2011 年 3 月 22 日
I don't understand your answer ... My model is this: http://img543.imageshack.us/img543/2282/modell.png
I try make plot in the workspace but showed up me this error:
>> plot (x,y) ??? Error using ==> plot Data may not have more than 2 dimensions
The value of x double and y double....
Why don´t show plot?

Andreas Goser
Andreas Goser 2011 年 3 月 23 日
1. Your MATLAB Code is within an Embedded MATLAB block - this is important to know
2. You first error message comes from the internals of a "XY Graph" block. You could look under the mask to understand wher it is coming from. The block is expecting scalar inputs (for each time step). It looks the are not. The problem is however the block is not visible in your screenshot.

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by