Extra dimension on simulink output
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Alessio Chieffalo
el 13 de Jul. de 2017
Editada: Alessio Chieffalo
el 13 de Jul. de 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?
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!