Cell Array and Matrix polynimial
3 次查看(过去 30 天)
显示 更早的评论
How do I subtract matrix polynomials? I want to subtract D which is a cell array from Y a matrix polynomial
syms s
X=[1 2 3 4; 5 6 7 8];
Y=(s-2)*X;
D = {[1 2 ] , [1 3] ; [1 6] , [5 2] };
M=Y-D
Currently i'm getting error for this code saying 'Error using mupadmex Cell input must have string contents.'
0 个评论
采纳的回答
Azzi Abdelmalek
2013-11-10
syms s
X=[1 2 3 4; 5 6 7 8];
Y=(s-2)*X;
D = {[1 2 ] , [1 3] ; [1 6] , [5 2] };
M=Y-cell2mat(D)
7 个评论
Azzi Abdelmalek
2013-11-10
编辑:Azzi Abdelmalek
2013-11-10
cellfun(@(x) sym(x),D,'un',0)
In your case D is not double, it's cell
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Number Theory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!