Error in port widths or dimensions.

1 view (last 30 days)
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

Answers (0)

Community Treasure Hunt

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

Start Hunting!