Info
This question is closed. Reopen it to edit or answer.
how to use if in matlab for 2 matrix condition?
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!