combining evalfis with sprintf
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to combine evalfis with sprintf in order to use it repeatedly within a loop. The command I use is the following:
evalfis(sprintf('[%1.0f %1.0f %1.0f %1.0f],fis',j,deg1,deg2,deg3))
I receive the following error message:
Need at least two inputs ??? In an assignment A(I) = B, the number of elements in B and I must be the same.
if i use evalfis without sprintf works, and sprintf alone is working great when copying the result to evalfis.
Can you suggest me anything?
Thank you in advance
Sotiris
0 个评论
采纳的回答
Walter Roberson
2011-6-13
evalfis() requires a numeric input for the first argument, not a string.
When you are copying the output of sprintf to evalfis, you are probably copying and pasting, which would cause the command interpreter to parse the text and convert it in to numeric form.
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Source Control Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!