Extra dimension on simulink output
Afficher commentaires plus anciens
I'm running a Simulink model that should send two 3x1 matrices to the workspace. Instead, both of my matrices are 3x1x51, and a corresponding 51x1 matrix called "tout" is produced. How can I prevent my desired matrices from having this third dimension?
Réponse acceptée
Plus de réponses (1)
Alessio Chieffalo
le 13 Juil 2017
Modifié(e) : Alessio Chieffalo
le 13 Juil 2017
I tried your suggested ways about the same problem, but they don't work. I found a solution in the "Model configuration panel" -> "Solver" setting the "stop time" to 0, but the integrator blocks doesn't work (it puts to 0 its own output). This is my code;
clear all
close all
clc
J=[100 0 0
0 100 0
0 0 500];
Omega0=[0.0175 0 -0.0524];
M=[sin(0.01) 0 sin(0.05)];
SimOut=sim('EulerMomentum')
my Simulink model is:

the User-function code in the Simulink model:
function AngAcc = DynamicEq(J_inv,M)
%#codegen
AngAcc=M'*J_inv;
and the outputs are:

What's wrong?
Catégories
En savoir plus sur Sources dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!