MATLAB, how to create symbolic variables with FOR?

0

How do I create multiple variables with the use of for in matlab? I'm not getting the index of for with the name I give the variable for example:

For i = 1:10

Syms Variable i; % What do I put here to differentiate or at least get the variables to be created? End

Thank you!

    
asked by anonymous 17.11.2018 / 20:34

1 answer

0

I did not quite understand the idea of your application but why instead of creating multiple variables just does not declare a vector as syms and in the sequence it uses to create the n positions you want? Something like this:

syms var
for i = 1: 10
    var (i) = i + 3;
end
disp (var)

    
18.11.2018 / 15:03