Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Problem in assignning the real of complex number
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello
I want to assign the real of certain complex number,for example
x=2+2*j;
when i write the following command real(x)=0;
matlab output the following error Subscript indices must either be real positive integers or logicals.
but i don't understand the reason, can anyone help me
Thanks
댓글 수: 0
답변 (2개)
Azzi Abdelmalek
2013년 11월 17일
편집: Azzi Abdelmalek
2013년 11월 17일
x=2+2*j;
real(x) will return the real part of x , if you want to assign 0 to real(x) , just write
x=imag(x)*i
%or
x=new_x+imag(x)*i
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!