Error in default port dimensions function of S-function 'MODEL'. This function does not fully set the dimensions of output port 2

2 ビュー (過去 30 日間)
I have this type of error in my simulink code. Anyone can help me to solve this?
I see that, every port in input and output have (1). I put also the code of S-function. Thanks!
function [FTx1,FTy1,FTz1,FTx2,FTy2,FTz2,FTx3,FTy3,FTz3,FTx4,FTy4,FTz4,MTx1,MTy1,MTz1,MTx2,MTy2,MTz2,MTx3,MTy3,MTz3,MTx4,MTy4,MTz4] = FTN(Fcx1,Fcy1,Fcz1,Fcx2,Fcy2,Fcz2,Fcx3,Fcy3,Fcz3,Fcx4,Fcy4,Fcz4,a,b,c,H,delta_1,delta_2,delta_3,delta_4)
Fc1 = [Fcx1 Fcy1 Fcz1]';
Fc2 = [Fcx2 Fcy2 Fcz2]';
Fc3 = [Fcx3 Fcy3 Fcz3]';
Fc4 = [Fcx4 Fcy4 Fcz4]';
Fc = [Fc1 Fc2 Fc3 Fc4];
GW1 = [b c H]';
GW2 = [-a c H]';
GW3 = [-a -c H]';
GW4 = [b -c H]';
GW = [GW1 GW2 GW3 GW4];
FT = [];
MT = [];
delta =[delta_1,delta_2,delta_3,delta_4];
for i = 1:4
MD = [ cos(delta(i)) -sin(delta(i)) 0 ;
sin(delta(i)) cos(delta(i)) 0 ;
0 0 1 ];
FT(:,i) = MD*Fc(:,i);
MT(:,i) = cross(GW(:,i),FT(:,i));
end
FTx1 = FT(1,1);
FTy1 = FT(2,1);
FTz1 = FT(3,1);
FTx2 = FT(1,2);
FTy2 = FT(2,2);
FTz2 = FT(3,2);
FTx3 = FT(1,3);
FTy3 = FT(2,3);
FTz3 = FT(3,3);
FTx4 = FT(1,4);
FTy4 = FT(2,4);
FTz4 = FT(3,4);
MTx1 = MT(1,1);
MTy1 = MT(2,1);
MTz1 = MT(3,1);
MTx2 = MT(1,2);
MTy2 = MT(2,2);
MTz2 = MT(3,2);
MTx3 = MT(1,3);
MTy3 = MT(2,3);
MTz3 = MT(3,3);
MTx4 = MT(1,4);
MTy4 = MT(2,4);
MTz4 = MT(3,4);
end

回答 (0 件)

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by