Simple Matlab Operation
Show older comments
Hi Guys! I have a noob question, that was bothering me. Let's say I have three variables: Var1=0, Var2=0, Var3=0. I also have another one - Var4=[1 2 3]
Is it possible to write this code in one row:
Var1=Var4(1);
Var2=Var4(2);
Var3=Var4(3);
Like it would be very useful if I could use something like this:
[Var1, Var2, Var3]=Var4(:);
Accepted Answer
More Answers (0)
Categories
Find more on Calendar in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!