Case instead of if-then?

조회 수: 3 (최근 30일)
David Pesetsky
David Pesetsky 2016년 6월 18일
댓글: Star Strider 2016년 6월 18일
Hi,
I have:
solveload=[0 0 0 'x' 'y' 'z'];
And need to determine only the position of the x, the y, and the z, when they could be anywhere in the vector, with 0's elsewhere. I'm finding I need a bunch of if-then's. It must be easier?
Thanks in advance :)
Dave

채택된 답변

Star Strider
Star Strider 2016년 6월 18일
There seem to be missing information.
What characterises ‘x’, ‘y’, and ‘z’?
What makes them so difficult to find? Range? Real/Complex? Something else?
  댓글 수: 7
Star Strider
Star Strider 2016년 6월 18일
I’m glad you solved it, because I have no idea how to differentiate x, y, and z from your description.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by