error while compiling matlab file
2 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/163697/image.png)
when i compile the the programm (see attached file), an error occur in defining mu1, please help me, how can i define mu1
2 件のコメント
Adam
2017 年 5 月 3 日
You didn't attach anything. And what do you mean by 'compile'? Are you using Matlab Coder to produce C++ code?
mu1 isn't defined at all in the code you give so obviously using it as an index will give an error.
採用された回答
Jan
2017 年 5 月 3 日
編集済み: Jan
2017 年 5 月 3 日
mu1 is used before it is defined. What is the prupose of:
real(mu1) = -log(1.3);
imag(mu2) = log(1.8);
? real() is a function and you cannot assign a value to the output of a function. Do you mean:
mu1 = -log(1.3) + 1i * log(1.8);
?
Then omit this line, which actually replaces a value by its value:
mu1 = real(mu1) + i .* imag(mu1);
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!