How can I solve dimension problem? Simulink
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hasan Atacan Tosun
le 26 Mai 2022
Réponse apportée : Walter Roberson
le 27 Mai 2022
Hello everyone,
I am getting this error
" Error in port widths or dimensions. 'Output Port 1' of 'untitled/From29' is a one dimensional vector with 1369 elements."
saveV.mat size 1370x2 [time,Velocity]
saveACC.mat size 1370x2 [time,Acceleration]
both like,
0 3
1 5.9
2 4
. .
. .
. .
Also I do not know why size decreased from 1370 to 1369.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1012415/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1012430/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1012425/image.jpeg)
Thank you...
2 commentaires
Walter Roberson
le 26 Mai 2022
Sample Time is not number of samples! It is related to the rate at which the block is considered to output samples.
Réponse acceptée
stozaki
le 27 Mai 2022
The Logical operands input of the If block must be a scalar signal. It's a block specification.
Also, the output of the If block should be connected to the Action Subsystem. It is also a block specification.
0 commentaires
Plus de réponses (1)
Walter Roberson
le 27 Mai 2022
You need to transpose the data in the file. The first row is the time stamps and rows after that are samples for that time. You have two times and 1369 values.
This is unlike From Spreadsheet, which treats the first column as time if I recall correctly.
0 commentaires
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!