# Error : Subscript indices must either be real positive integers or logicals.

2 visualizaciones (últimos 30 días)
daniel Picasso el 15 de Feb. de 2020
Respondida: JESUS DAVID ARIZA ROYETH el 15 de Feb. de 2020
Trying to use fzero to solve for the equation, want to first plot the function.. but i keep getting this error
"Subscript indices must either be real positive integers or logicals."
g1 = 1.4;
R1 = 287;
T = 283.15;
g4 = 1.667;
R2 = 2077;
a1 = sqrt(g1*R1*T);
a4 = sqrt(g4*R2*T);
ar = a1/a4;
z = -5;
x = linspace(3,4,100);
F = (8/(1-((g4-1)*ar*(x-1))/sqrt(2*g1(2*g1+(g1+1)*(x-1))))^z)-8;
figure(1)
plot(F,x);
##### 0 comentariosMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

JESUS DAVID ARIZA ROYETH el 15 de Feb. de 2020
you missed a "*" here : 2*g1*(2*..... and many "." ./
g1 = 1.4;
R1 = 287;
T = 283.15;
g4 = 1.667;
R2 = 2077;
a1 = sqrt(g1*R1*T);
a4 = sqrt(g4*R2*T);
ar = a1/a4;
z = -5;
x = linspace(3,4,100);
F = (8./(1-((g4-1)*ar*(x-1))./sqrt(2*g1*(2*g1+(g1+1).*(x-1)))).^z)-8;
figure(1)
plot(F,x);
##### 0 comentariosMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Correlation and Convolution 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!

Translated by