cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to iterate through genfit parameters?

Cornel
19-Tanzanite

How to iterate through genfit parameters?

Hello,

These examples are for each particular i:

Cornel_8-1713778566596.png

 

Cornel_7-1713778552618.png


But how to iterate through all values of i:

Cornel_0-1713778679032.png

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Cornel)

Maybe that way

Werner_E_0-1713780731470.png

If that ratio is all that is of interest, you should modify the function beta.in_out accordingly so that it only returns that ratio.

 

Another way could be to turn each of the "genfit" calls into a separate function of the index:

Werner_E_0-1713781143412.png

 

 

 

View solution in original post

10 REPLIES 10
Werner_E
25-Diamond I
(To:Cornel)

Maybe that way

Werner_E_0-1713780731470.png

If that ratio is all that is of interest, you should modify the function beta.in_out accordingly so that it only returns that ratio.

 

Another way could be to turn each of the "genfit" calls into a separate function of the index:

Werner_E_0-1713781143412.png

 

 

 

Cornel
19-Tanzanite
(To:Werner_E)

Yes, the second variant.

But look:

Cornel_0-1713781996590.png

 

Cornel_2-1713782031777.png

How to extract each i from the above two vectors?

 

 

Werner_E
25-Diamond I
(To:Cornel)

I don't understand what you are looking for!?

 

The values you calculate singly for i=4 and i=10 seem to match perfectly with the appropriate values in the calculated vectors.

I see no problem or error here.

 

Or could it be that you stumble across this age-old problem??

Werner_E_0-1713782937308.png

If that's the case you may have a second look at how I defined the vector(!) "ratios" in my answer above!!

 

Cornel
19-Tanzanite
(To:Werner_E)

Look:
I want to extract from the 20log() vector each i value:

Cornel_0-1713782525276.png

Cornel_1-1713782560265.png


Because look:

Cornel_2-1713782605261.png

Cornel_3-1713782616268.png

 

Cornel_4-1713782624012.png

Cornel_5-1713782630831.png

Compare the 2 vectors and you will see that they are different

 



Cornel
19-Tanzanite
(To:Cornel)

So,

Cornel_1-1713782934467.png

And from this vector I want to extract only the value corresponding to i=1:

Cornel_2-1713782987592.png

 

 

Then if i=2:

Cornel_3-1713783022365.png

Cornel_4-1713783182816.png
And to put these values for each i into another vector:

Cornel_5-1713783229243.png

 

 

Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

Look:
I want to extract from the 20log() vector each i value:

?? See my edited answer above. Assign the 20log() expression to a variable so its a vector and access the appropriate element.

Or furmulate that expression as a function of i if thats more appropriate.

 


Compare the 2 vectors and you will see that they are different

 


Not sure what you mean!? You use two different values for i. Of course you get two different vectors.

On the other hand I don't understand why you get vector like results anyway if you use a single scalar for i ??????

You should get something like

Werner_E_0-1713783606826.png

 

I used the sheet you posted last. The values are different so I guess you are using different data in your picture

Cornel
19-Tanzanite
(To:Werner_E)

I was expecting something like this to be in 20log() vector:

Cornel_2-1713784041235.png

And so on...

 

I used the data and sheet you posted last and I have no idea where you would get these values from!?

When I do it, I get

Werner_E_0-1713785518600.png

and this perfectly corresponds with the first two values in the full vector we crated

Werner_E_1-1713785569734.png

 

Cornel
19-Tanzanite
(To:Cornel)

@Werner_E 
These are the mathcad file prime 9 and excel with data used:

Cornel
19-Tanzanite
(To:Cornel)

Something is not updated accordingly...

Werner_E
25-Diamond I
(To:Cornel)

Oooops!!

I'm very sorry but it looks like I mistakenly edited your post instead of replying to it!

So you can see my answer in the reply YOU posted -> https://community.ptc.com/t5/Mathcad/How-to-iterate-through-genfit-parameters/m-p/945065/highlight/true#M211414
Nevertheless, the question remains as to where the values in your pictures come from, which I cannot understand with your Excel data and the last prime sheet you posted.

Announcements

Top Tags