In order to do that, you will have to convert ‘A’ to a symbolic object as well:
function [A] = Test(a,b)
A = sym('A',[1 2])
A(1,1)=a+1;
A(1,2)=b;
end
then:
Q = Test(0,b)
Q =
[ 1, b]
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!