Skip to main content
1-Visitor
September 18, 2010
Question

Converting range variable into a vector, ultimately to find root

  • September 18, 2010
  • 4 replies
  • 32604 views

Hi All,

Is there an easier way to convert a range variable into a vector? That is, suppose we have a list of data (perhaps huge) in a single table over a range. Infact, this range variable is the output of a part of programming in mathcad. How to convert this in to a vector? Once I can convert this into a vector, then I can easily locate roots using curve "fitting".

4 replies

19-Tanzanite
September 18, 2010

If you have a range variable, say i:=0:10, you can create the vector x with values 0 to 10 simply by x[i:=i (where the '[' symbol provides a subscript in Mathcad - it's a pity the text formatting in these posts doesn't allow subscripts given the frequency with which they're used in Mathcad).

Alan

1-Visitor
September 18, 2010

Alan Stevens wrote:

it's a pity the text formatting in these posts doesn't allow subscripts given the frequency with which they're used in Mathcad).

Alan

Alan,

Just one of many problems with the website. It surely isn't hard to implement subscript/superscript formatting options.

Image attached.

Mike

AshehadAl1-VisitorAuthor
1-Visitor
September 18, 2010

Suppose the range variable is as follows:

For i:=1...4, we have f(i):= 0.001, 0.0019,0.0025, 0.0031

I would like to convert these four values of f(i) into a single vector, say "g". Note that I don't want to copy each value and type it over and over.

Ashehad

1-Visitor
September 19, 2010

Have you deleted your other thread ?

Possibly answered [generally] here:

http://communities.ptc.com/message/152316#152316

jmG

1-Visitor
September 19, 2010

jean Giraud wrote:

Have you deleted your other thread ?

Possibly answered [generally] here:

http://communities.ptc.com/message/152316#152316

jmG

Jean,

That link doesn't seem to be working.

The link to the other thread is below.

http://communities.ptc.com/thread/32637

Mike

1-Visitor
September 20, 2010

MIke Armstrong wrote:

jean Giraud wrote:

Have you deleted your other thread ?

Possibly answered [generally] here:

http://communities.ptc.com/message/152316#152316

jmG

Jean,

That link doesn't seem to be working.

The link to the other thread is below.

http://communities.ptc.com/thread/32637

Mike

Yes, broken link was reported many times.

Not acknowledged is not correct, simply !

Jean

1-Visitor
September 21, 2010

"g" looks exponential,but not of the traditional forms.

MCADfit_7.gif

jmG

AshehadAl1-VisitorAuthor
1-Visitor
September 21, 2010

Jean,

You are certainly right. I didn't know if there was any other alternative to fitting as suggested by Richard.

Ashehad

1-Visitor
January 22, 2021

Hello  AshehadAl,

Please see the uploaded jpeg graphic.