How to add a constant to a symbolic array element by element?
1 次查看(过去 30 天)
显示 更早的评论
My code is as follows
Mr_theo = (W_R + Up)./a2;
where W_R is a 1x1 double, Up is a 100x1 symbolic array, and a2 is a 100x1 symbolic array. All numbers are positve, however, they consistently are yeilding a negative number, which makes no sense to me at all. Is this a syntax error? the addition of W_R and Up is causing matmatical errors.
4 个评论
回答(1 个)
madhan ravi
2020-3-21
They are not negative numbers but probably represented in scientific notations.
format longg % at the beginning
Because the answers I get is all positive.
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String Parsing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!