Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to use if in matlab for 2 matrix condition?

1 visualización (últimos 30 días)
sukma aditya
sukma aditya el 21 de Ag. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
i have 2 reflection coefficient equations R1 and R2 from K with condition absolute must below 1, i use if command for this situation .But when i plot the graph the absolute reflection coefficient still above 1. (K is matrix with 1 column and 201 row)
R1=K+sqrt(K.^2-1);
R2=K-sqrt(K.^2-1);
if abs(R1)<1
r=R1;
else
r=R2;
end

Respuestas (1)

madhan ravi
madhan ravi el 21 de Ag. de 2019
r=R2;
r(abs(R1)<1)=R1
  1 comentario
sukma aditya
sukma aditya el 21 de Ag. de 2019
im sorry can you write the full code?
i cant understand hehe

Etiquetas

Productos


Versión

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by