Skip to main content
1-Visitor
November 14, 2011
Question

This value must be a scalar?

  • November 14, 2011
  • 3 replies
  • 5855 views

$7A041C90A894290A.bmp

Sorry if this seems to be a basic question but I cant figure it out how to correct this.

What I'm trying to do is to test the values of each number in the matrix "a" above if it is less than 0, if it is then I will have the result in "b" which will show only the values less than 0 in matrix "a". I've try the above program but results in the error "This value must be a scalar"

Thank you for your help.

3 replies

Bartz871-VisitorAuthor
1-Visitor
November 14, 2011

I thought I cant correct it...hehe, but I got it now. Here's what I got:

$689340909E0D21EF.bmp

bdw, thanks all for viewing....:)

24-Ruby IV
November 14, 2011

One more solution:

bool.png

24-Ruby III
November 14, 2011
24-Ruby IV
November 14, 2011

rows(a^T)=cols(a)

1-Visitor
November 14, 2011

I wasn't going to provide an alternative because I believe Valery's example to the best way to run with this, but seems we're all having fun.....

Clipboard01.jpg

Mike

24-Ruby III
November 14, 2011

Mike Armstrong wrote:

...but seems we're all having fun.....

Mike