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: Matrix dimensions must agree.
Replies: 13   Last Post: Mar 24, 2014 5:34 PM

Advanced Search

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

Posts: 12
Registered: 3/18/14
Re: Matrix dimensions must agree.
Posted: Mar 20, 2014 3:42 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <lgfaqk$820$1@speranza.aioe.org>...
> On 3/20/2014 12:57 PM, Vitor Andrade wrote:
> ...
>

> > I don't understand you. I would like to delete the row that is left
> > over. Is there anyway? I want to implement this on my code.

>
> Which specific row is the "leftover" one? First, last, some other based
> on some value...?
>
> But, sure...that's one of the ways to implement option B --
>
> Assume two arrays are x and y and it's the last row to eliminate in the
> longer array...
>
> lenx=length(x);
> leny=length(y);
> if lenx>leny
> x(leny+1:end)=[];
> elseif
> if leny>lenx
> y(lenx+1:end)=[];
> end
>
> It might be simpler to prevent the two arrays from being different
> length to begin with but that depends on how they're created.
>
> --
> Thanks Sr, for your attention!

Your code was used! Thanks again!
>



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.