hello sir i want real values but when i write my function in matlab s(ii)==real (s(ii)); it give me complex value how to solve it
1 ビュー (過去 30 日間)
Thorsten 2016 年 6 月 30 日
編集済み: Thorsten 2016 年 6 月 30 日
real is the real part of a complex number. Unless you do not have re-defined Matlab's real, this should work.
To check if you use the real "real", type
Further, the lines
don't make sense. The result would be the same without the first line, because s ist not used in the second line, so the s from the first line is simple replaced.
Do you want
Also, if the argument of log is negative, the result will be complex. And round rounds, but does not discard the imaginary part. You can use abs or real, but of course I don't know if this is what you want to compute.