Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12262

Re: How to call values from a table and then do the minerr() calculation?

$
0
0

Hi:

 

I hope you can see the below Excel table I posted (also imported to MathCad) and I use MathCad 15.

As you can see, X axis is 1E15, 2E15... and Y axis is frequency (0.3, 0.35....).

1,2,3... is the data.

 

For the question 1, the var1, var2...I paln to use inside minerr() are the data in 1E15, 2E15.....columns (data: 1,2,3..)

For example, if I define 1E15, 2E15, 3E15 and 4E15 columns as variables, data (1,1,1,1 in frequency 0.3), data (2,2,2,2 in frequency 0.35) will do the calculation separately and then come out a data column like the "t" columnat right side of the table. The calculated "t" column will compare with the measured "t" column in minerr() to find the minimun error.

 

So you say it can work by using array variables, right?

 

For the question 2 (I guess it is similar to question 1), my plan is to choose data from this table in each loop (for example, select 1E15==> data in 1E15 column will be used) and then use minerr() to find the variables (say 4 variables) with a minimun error.

In all examples I read, the initial guess value (integer or complex number) is defined first and then LMA in minerr() will determine proper values to find minimum error.

To me, is there any way to select data ( data column) from this table in each loop (this is what I mean "call") and then put them into minerr() to determine proper variable (say 1E15, 3E15, 5E15 and 8E15)?

 

Since the variables (var2, var2,...) I plan to use are data column, should I use vectors as guess values?

 

Maybe the table I import shouldn't contain X/Y axis (I am new to the programming).

 

Frequency1E+152E+153E+154E+155E+156E+157E+158E+159E+15Frequencyt
0.301111111110.301
0.352222222220.352
0.403333333330.403
0.454444444440.454
0.505555555550.505
0.556666666660.556
0.607777777770.607
0.658888888880.658
0.709999999990.709
0.751010101010101010100.7510
0.801111111111111111110.8011
0.851212121212121212120.8512
0.901313131313131313130.9013
0.951414141414141414140.9514
1.001515151515151515151.0015

Viewing all articles
Browse latest Browse all 12262

Trending Articles