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: How can I manage the multidimensional array e.g., a{1,1}{2,2}
Replies: 6   Last Post: Jul 29, 2012 12:26 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Antonio Valentine

Posts: 17
Registered: 7/29/12
Re: How can I manage the multidimensional array e.g., a{1,1}{2,2}
Posted: Jul 29, 2012 9:46 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jv2vhp$ln9$1@newscl01ah.mathworks.com>...
> "antnio " <a@mail.com> wrote in message <jv2ut1$jc6$1@newscl01ah.mathworks.com>...
> > I am introducing cell array format like
> > T = 10;
> > for t = 1 : T
> > F{1,2}{6,t} = [0 0 0];
> > end
> >
> > I want to change only the dimension along parameter "t" e.g.,
> > from t = 5 to t = 8
> > F{1,2}{6,5} = [1 1 1];
> > F{1,2}{6,6} = [1 1 1];
> > F{1,2}{6,7} = [1 1 1];
> >
> > What I dd try,
> >
> > F{1,2}{6, 5:7} = [1 1 1];

>
> Use
> F{1,2}{6, 5:7} = deal([1 1 1]);
>
> A strong advise though: CELL array is slow and nasty to work with. Before going too far, ask yourself if you really need to store your data that way.
>
> Bruno



Thank you very much Bruno,

I will try and let you know the result.
However, I have to use this type of array because I have 3 vectors that have different dimension. 37x1, 40x1 and 49x1, respectively.

If you say cell array will make the program more slower, do you have any suggestions?

I have to create a program for 4 variables: i j k m

I am not preferred to run "for loop" for 4 variables.

Thank you in advance.

Antonio



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.