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
Replies: 2   Last Post: Feb 21, 2014 9:58 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,231
Registered: 6/7/07
Re: Matrix dimensions
Posted: Feb 21, 2014 9:58 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 2/21/2014 7:19 AM, gasmi wrote:
> Hi,
> when I run my code this error appears "??? Error using ==> plus Matrix
> dimensions must agree.
> Error in ==> code at 29
> y = yppm + 10^(-Eb_N0_dB(ii)/20)*n;"
> knowing that;
> yppm <1*2101 double>
> Eb_N0_dB <1*14 double>
> ii 1
> n <1*100000 double>
> please I need your helps and I'll be gratful.


Well, with such disparate sizes I don't know what you expect to be able
to do...you can't very well expect Matlab to know what to do when you
try to add 14 values to some 2000 and then multiply those by 100000 others.

Also note that '*' is a matrix multiply, not element-wise. Need the
"dot" operators .* and the like for that.

But, you're going to have to somehow get the dimensions commensurate to
get anywhere. Only you can know what those should be for your problem.

--



Date Subject Author
2/21/14
Read Matrix dimensions
gasmi
2/21/14
Read Re: Matrix dimensions
Curious
2/21/14
Read Re: Matrix dimensions
dpb

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.