simulink output size is not same as input size
Mostrar comentarios más antiguos
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 comentarios
Jim Riggs
el 5 de Ag. de 2019
It is very hard to address this question without much information.
test36New is not defined, so we don't know what any of the variables are in your script.
We also don't know what output you are getting.
Also, there are no labels on the blocks in your Simulink diagram, so we can't tell what the blocks are.
Select all of the blocks, then right-click on the blocks, select Format \ Show Block Name.
Harish Medikonda
el 5 de Ag. de 2019
Harish Medikonda
el 5 de Ag. de 2019
Respuestas (1)
Jim Riggs
el 5 de Ag. de 2019
0 votos
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 comentario
Harish Medikonda
el 5 de Ag. de 2019
Categorías
Más información sobre Sources en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!