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: i want to simplify this code
Replies: 14   Last Post: Apr 22, 2013 7:11 AM

Advanced Search

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

Posts: 8,102
Registered: 6/7/07
Re: i want to simplify this code
Posted: Apr 7, 2013 7:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 4/7/2013 5:50 PM, mohammed wrote:

...Do _NOT_ toppost--put your response at the bottom of text in
context...I'm persnickety about this and after a couple of warnings I
flag threads as "Ignore Thread" if posters persist...so, if you want me
to continue to respond, please heed.

> i did as u did but all my problem is put this items inside the loop
...

> when i put it in for loop it give me error
>
> In an assignment A(I) = B, the number of elements in B and
> I must be the same.

...


Well, your 'I' is a single element so B has to have extent 1, too.

Or, you have to write a subscript expression for A that has the right
starting locations and sizes to correspond to size(B) if that is what is
wanted.

--





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.