simulink output size is not same as input size

10 vues (au cours des 30 derniers jours)
Harish Medikonda
Harish Medikonda le 5 Août 2019
Commenté : Harish Medikonda le 5 Août 2019
im trying to run a model as a part of matlab code but, the ooutput of simulink 'temp' variable is not same as input variable 'temperature'
heres the code
m=size(test36New);
dt=10/(m(1)-1);
time=0:dt:10;
temperature=test36New.Var95;
t=[time' temperature];
  3 commentaires
Harish Medikonda
Harish Medikonda le 5 Août 2019
@Jim Riggs
test36New is a table which size can be seen in the picture attached.
simulink block, variable sizes can be seen in workspace tab in the screenshot provided.
the output I am getting is the same as input but the size of the array is different.
Thank you.
Harish Medikonda
Harish Medikonda le 5 Août 2019
the screenshot is attached to question.

Connectez-vous pour commenter.

Réponses (1)

Jim Riggs
Jim Riggs le 5 Août 2019
The answer has to do with how you are saving variable "temp" from Simulink, but I cannot tell from the screenshot how this is being done.
If the "temp" block is a "to workspace" block, then there are a number of options for how to save temp, e.g. as an array, as a structure, as a time series, etc.
There are also options for how to concattenate multiple dimension signals (which also applies in this case).
One hint is that the value 51 is the (default) number of itteratons that the model is performing.
  1 commentaire
Harish Medikonda
Harish Medikonda le 5 Août 2019
ok. thank you very much. I just got it sorted.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by