The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matrix Dimensions must agree.
Replies: 1   Last Post: Feb 12, 2013 11:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  

Posts: 2,359
Registered: 12/6/04
Re: Matrix Dimensions must agree.
Posted: Feb 12, 2013 11:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Erik" wrote in message <kfdpbk$kdp$>...
> I have this:
> t= [0:100];
> L = 100;
> k = [.1 .3 .7];
> C = 25;
> i want to multiply
> -k .* t
> but i get an error message saying matrix dimensions must agree.
> I thought the . before the * would get rid of that error but it doesn't. what is going on???

Well, k has 3 elements and t has 101.

How do you expect the results to look like by multiplying 3 things by 101 things?

Do you want an array of 3X101 or 101X3 perhaps?

Maybe something like:


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.