필터 지우기
필터 지우기

Data is inferred as a variable size matrix, while its properties in the Model Explorer specify its size as inherited or fixed. Please check the 'Variable Size' check

조회 수: 11 (최근 30일)
While I do not get the error in the m file, I am getting it in simulink. How can I fix the error. Thank you.
uk=zeros(1,m*ni);
ns=1;
nb=1;
for n=1:1:m*ni
uk(n)=-w0*cos(gama(nb))+ (w1-k1*w0)*cos(gama(nb)) * (ef*cosd(Azi(nb))+seg_mid(ns)*cosd(Azi(nb)+omega(nb))) + ((D_ws+K1_y*D_w0)*cos(gama(nb))) * (ef*sind(Azi(nb))+seg_mid(ns)*sind(Azi(nb)+omega(nb)));
if ns==m
nb=nb+1;
ns=0;
end
ns=ns+1;
end
u=uk;

채택된 답변

Gowthami
Gowthami 2023년 1월 27일
Hi,
It is my understanding that you are facing an issue with the 'Variable Size' in the Simulink model.
I recommend you perform the following changes in the Simulink model:
1. Enable the 'Variable size' checkbox for the output variable in the property inspector.
2. Change the sample time for the scope to discrete to support the variable size signal.
More information on setting the general variable properties - https://www.mathworks.com/help/simulink/ug/_bqlblru.html#bqona5_
  댓글 수: 1
Alexi
Alexi 2023년 1월 27일
Thank you for your answer, but I have identified where the error is coming from. The reason for the error is that I understood that the parameters that determine the limit of the for value in the simulink math function must be defined in the math function. I've observed that if I don't recognize this value as function inputs, I keep getting errors.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by