Error in port widths or dimensions.

1 次查看(过去 30 天)
Greetings to all I have the following error.
Error in port widths or dimensions. Invalid dimension has been specified for input port 1 of 'simulacao_julio6/Integrator1'.
this is my code
function dot_theta = Richards(theta,K,D,thetaz_0,thetaz_f)
L=1; %comprimento
z=linspace(0,L,100); % espaco de discretizacao
dz=L/length(z);
b=1/(2*dz^2);
i=max([1 0 2])+1:length(z),
dot_theta=(1/(2*dz))*((D(i+1)+D(i)).*(theta(i+1)-theta(i))/dz -(D(i-1)+D(i)).*(theta(i)-theta(i-1))/dz+(K(i)-K(i-1)));
%condicao de contorno1
%Se o indice do primeiro elemento do vetor for 1 em vez de 0, seria:
dot_theta(1)=dot_theta(1)+thetaz_0/dz;
%Condicao de contorno no ultimo elemento:
dot_theta(99)=dot_theta(99)-thetaz_f/dz;
my blocks

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 String 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by