error in matlab function
1 回表示 (過去 30 日間)
古いコメントを表示
hello,
I have a problem in matlab function block, where I use the trigonometric function, conversion function (ex:degtorad..) ... when I simulates a first part it works, but once I pass execter:
x = degtorad (var);
s = cos (x) * 2
... that it generated this error :
Expected Either a logical, char, int, fi, single, double gold. Found a MATLAB type. MATLAB kinds are returned from calls to the MATLAB interpreter and are not supported inside expressions. They May only be used on the right-hand side of assignments and have arguments to MATLAB calls.
can u help me?
0 件のコメント
回答 (3 件)
studentU
2015 年 5 月 12 日
編集済み: Walter Roberson
2015 年 5 月 12 日
1 件のコメント
Walter Roberson
2015 年 5 月 12 日
You probably need to use .* instead of *
F1 = vc .* vs .* ca;
studentU
2015 年 5 月 12 日
1 件のコメント
Walter Roberson
2015 年 5 月 13 日
Your var and your arg are not the same size and your arg is not scalar.
You need to define what size of output you want for that case.
Code would help.
Note: do not go down to "Answer this question" to reply. Click in "Comment on this Answer" instead.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!