from File and if block conditions error
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hasan Atacan Tosun
il 22 Mag 2022
Commentato: Walter Roberson
il 28 Mag 2022
Hello everyone,
I am building a Simulink structure for my homework which is about EVs.
I have Drive_cycle.mat contains time and corresponding speeds. It is directly connected (used goto, from blocks) to if block.
But I am getting an error. And I could not solve it.
I really appreciate any help you can provide. Thank you
2 Commenti
Harshit Rastogi
il 25 Mag 2022
Hi Hasan, If possible could you please share the model and drive cycle data here. I think that you are giving the drive cycle as input to the 'if' block. As drive cycle has 2 columns , 'if' block is not able to know with whom to compare the given value. Also instead of goto and from block , first open the subsystem and try connecting the drive cycle directly to the if block.
Risposta accettata
Hasan Atacan Tosun
il 28 Mag 2022
1 Commento
Walter Roberson
il 28 Mag 2022
This does not explain the error about the port dimensions, or why 1369 instead of 1370.
Real problem is that your data must be 2 x 1370 instead of 1370 x 2
Più risposte (1)
Walter Roberson
il 27 Mag 2022
Transpose your mat data. Timestamps are first row not first column.
0 Commenti
Vedere anche
Categorie
Scopri di più su Simulink Functions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!