Skip to main content
1-Visitor
October 24, 2014
Question

illegal context when range is multiplied

  • October 24, 2014
  • 5 replies
  • 4373 views

Hi,

Hope you guys can help.

I can print out the range multiplied by some value:

RTn9M.png

Why can't I store the resulting range in the variable?

5 replies

1-Visitor
October 24, 2014

Add tu as a subscript to tv by typing tv[tu.

Clipboard01.bmp

25-Diamond I
October 24, 2014

greg re wrote:

Hi,

Hope you guys can help.

I can print out the range multiplied by some value:

Why can't I store the resulting range in the variable?

Because a range is an implicit loop, not an a array of values. Use a vector instead of a range.

1-Visitor
October 24, 2014

Further to Werners suggestion, see below.

Clipboard01.bmp

I have used an undocumented feature to turn tu from a range to a vector by in-line evaluation.

23-Emerald I
October 24, 2014

Mike,

What version of Mathcad is that? My 15 M030 won't do that.

1-Visitor
October 31, 2014

Thanks for your answers, guys.

I am using subsript feature suggested by Mike Armstrong, but it still does not work:

math.PNG

LiL is still one thing that keeps formula from being computed.

1-Visitor
October 31, 2014

Please upload the worksheet again.

1-Visitor
October 31, 2014

math.PNG

1-Visitor
October 31, 2014

Not a picture ,the worksheet. You can do this by clicking 'use advanced editor'.

1-Visitor
October 31, 2014

Thanks for the tip.

1-Visitor
October 31, 2014

Have a look in the attached worksheet. There is a user defined function called vec which accepts ranges, range variables and converts them into a vector. Use this instead of using ranges.

Remember you may have to explicitly vectorize using this method.

Sorry am too busy to work through it at the moment.