Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: one liner using deal()
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Paul Mennen

Posts: 277
Registered: 12/7/04
one liner using deal()
Posted: Mar 14, 2013 2:51 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I was trying to reduce these 7 commands to a single command:

x = s(1); y = s(2); z = s(3); ux = s(4); uy = s(5); uz = s(6); t = s(7);

The best I could think of was using these two commands:

ss = num2cell(s);
[x y z ux uy uz t] = deal(ss{:});

Is there a way to do that with a single command?

Thanks
~Paul



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.