Skip to main content
1-Visitor
Question

Converting range variable into a vector, ultimately to find root

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".

18 replies

19-Tanzanite

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

Translate
1-Visitor

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

Translate
AshehadAl1-VisitorAuthor
1-Visitor

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

Translate
1-Visitor

Have you deleted your other thread ?

Possibly answered [generally] here:

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

jmG

Translate
1-Visitor

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

Translate
1-Visitor

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

Translate
1-Visitor

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

MCADfit_7.gif

jmG

Translate
AshehadAl1-VisitorAuthor
1-Visitor

Jean,

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

Ashehad

Translate
1-Visitor

Hello  AshehadAl,

Please see the uploaded jpeg graphic.

 

Translate