Let's say we have the unknown variable t in
. How can I define this variable t in Matlab so I can do calculations with it? For example, I'd like to do this:
and then form this to t, in the end display the result of variable t.
I have tried to do this with sym and downloaded matlab toolbox addon for it... but it's not working :/
function Test()
syms t
v = [3+t, 3, 6];
disp(v);
end
Displays the vector: [t + 3, 3, 6]
But now I cannot assign any value to t after this calculation, I cannot change it and do future work with it... it just stays t. But I want do the operation for example
and then get the t value or keep working with t for other operations. How can I do this, I hope my question is clear? :)