Info
此问题已关闭。 请重新打开它进行编辑或回答。
cannot figure out the reason for a warning message
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am working with a piece of code, and though the code seems to work well(as the results yielded seem to be correct)Matlab shows the following warning:
Warning: new entry not compatible with coefficient domain
[(Dom::Matrix(Dom::ExpressionField()))::set_index]
When executing the following code (Jcpg is a symbolic matrix):
Jcpg=zeros(length(candelabroc),length(vectpg));
Jcpg(1:length(candelabroc),1:length(vectpg))=
(1/h)*subs(candelabroc(1:length(candelabroc)),{vectpg(1:length(vectpg))},
{X(1:length(vectpg))+h1},0);
I cannot figure out the reason for this warning. Any ideas?
2 个评论
Walter Roberson
2013-2-14
Question: after you do the subs() are there any remaining free variables in the formula? If there are, then it would not be possible to automatically convert the result to double precision as would be required to store the result into a numeric matrix, as Jcpp is initialized as numeric and not symbolic.
Question: why are you indexing candelabroc(1:length(candelabroc)) instead of just passing candelabroc ? Likewise for vectpg ?
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!