Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hello,
These examples are for each particular i:
But how to iterate through all values of i:
Solved! Go to Solution.
Maybe that way
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:
Maybe that way
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:
Yes, the second variant.
But look:
How to extract each i from the above two vectors?
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??
If that's the case you may have a second look at how I defined the vector(!) "ratios" in my answer above!!
Look:
I want to extract from the 20log() vector each i value:
Because look:
Compare the 2 vectors and you will see that they are different
So,
And from this vector I want to extract only the value corresponding to i=1:
Then if i=2:
And to put these values for each i into another vector:
@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
I used the sheet you posted last. The values are different so I guess you are using different data in your picture
I was expecting something like this to be in 20log() vector:
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
and this perfectly corresponds with the first two values in the full vector we crated
Something is not updated accordingly...
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.