Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.

1 visualización (últimos 30 días)
syms X;
n = length(a) ;
for i=1:n
Tdet1(i) = sqrt(2*a(i)/D(i)*h(i));
FZ(i) = 1-((Tdet1(i).*((cn.*Y(i))+h(i)))./(B(i))); %((cn.*Y(i).+h(i)).*(Tdet(i)./B(i))) ; % Acumulado
alfa(i) = 1-FZ(i) ; % Nivel de Servicio con Tdet
Z(i) = (norminv(1-alfa(i)/2)) ;
fz(i) = normpdf(Z(i)) ; %%abs(0.5-alfa(i)) ; % Función de densidad normal con Z(Tdet)
Tdet(i) = solve ((-a(i)/X^2)+((D*h(i))/2)+ ...
((Z(i)*sg(i))/(2*sqrt(X+L(i))))+ ...
(sg(i)*fz(i))*((((-B(i))*X^2)- ...
(2*X*B(i)*L(i)))/((2*X^3)*sqrt(X+L(i))))- ...
((sg(i)*Z(i))*(((2*L(i)-X)*(((X)*(cn(i)))*Y(i))+ ...
((X)*h(i))))/(2*sqrt(X+L(i))))+((((cn(i))*Y(i))*sqrt(X+L(i)))/X))== 0,X;
  1 comentario
Walter Roberson
Walter Roberson el 4 de Feb. de 2022
What is the difference between this and https://www.mathworks.com/matlabcentral/answers/1643055-hello-my-code-has-the-following-error?s_tid=srchtitle ?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Linear Least Squares en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by