How to use symbolic vector
1 view (last 30 days)
Show older comments
Dear all,
I want to use each cell of a symbolic vector:
syms x y(x)
H = sym( 'H', [3 1] );
H(1,1) = x;
y = H(1,1);
dsolve( diff(y) == x^2, y(0) == 1 );
Error using sym>checkindex (line 2248)
Index must be a positive integer or logical.
Error in sym>privformatscalar (line 2198)
checkindex(x);
Error in sym>privformat (line 2182)
s = privformatscalar(x);
Error in sym/subsref (line 1387)
[inds{k},refs{k}] = privformat(inds{k});
Error in hamsym (line 42)
dsolve( diff(y) == x^2, y(0) == 1 )
but I received the bellow error:
I think it may be due to improper use of symbolic vector which changes "y" from a scalar to a 1x1 system.
Thanks a lot for your help.
2 Comments
Answers (0)
See Also
Categories
Find more on Numbers and Precision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!