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
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alexi
el 23 de En. de 2023
Comentada: Alexi
el 27 de En. de 2023
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;
0 comentarios
Respuesta aceptada
Gowthami
el 27 de En. de 2023
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_
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!