undefined variable, passive variable vector
Show older comments
HELLO do you know how should i make vector with passiv variable.and be aware of that the size of this vector will be defined in the middel of program. thanks
1 Comment
David Young
on 1 Mar 2011
Please would you delete the four duplicates of this question. Thanks.
Accepted Answer
More Answers (2)
David Young
on 1 Mar 2011
In MATLAB, you probably don't need to make the vector before you know its size. You don't have to declare variables, so the best solution is probably to simply not use the vector until the point where the size is known.
If there's some reason you need to reference the variable before that point, you could set it to the empty matrix:
v = [];
to indicate that it's a vector with, as yet, no contents.
3 Comments
kaveh
on 1 Mar 2011
David Young
on 2 Mar 2011
Can I just check - are you asking about the Symbolic Math Toolbox, as Kaustubha govind suggests? If you are, then sorry, I misunderstood. I don't know about that toolbox, and I hope someone else can help.
kaveh
on 3 Mar 2011
Categories
Find more on Number Theory 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!