AnsweredAssumed Answered

Decimal points in data display window

Question asked by ABUELMAATTI on Jul 21, 2006
Latest reply on Jul 21, 2006 by nilesh1
Hi everyone,

Have a little problem here; hope someone might be able to help me with. I feel there is a straight forward solution to this but unfortunately I am not aware of it.

I have got a simple simulation, from which I obtain data and display it in the data display window and so on in the normal manner. The simulation is swept against say parameter ‘H’, so all these data are plotted with respect to H.  Some of these data I use to write an equation which would generate for me some thing else. So say I have three sets of data from the simulation all with respect to the swept variable, out1, out2 and ou3. Then I write two equations eqn1: A=out1+out2 and eqn2: B=out3/(out1+out2). So A and B are also with respect to the swept parameter H.

Until now that is all normal, now here is the problem; out1, out2 and out3 were all produced in 3 decimal points as a standard, i.e. in the form out1=1.234. This means the results of A and B would also be in three decimal points. A and B are two variables which are plotted in a graph against the parameter being swept, and they cross each other, i.e. there is a point at which they are equal. But due to the sweep step being used in the simulation, the point at which they cross, although it exists, but is not produced i.e. the simulation does not produce that very accurate point at which the values of A and B with all their decimal points are equal, that is because the step is not small enough. It can be produced if the simulation is re-done with a much smaller step but as expected, this would slow it down great deal. Trying to find the value of the swept parameter at which A and B are equal, I use the 'find' function in the manner C=find(A==B) but because the value at which A and B with all their decimal points equal was not produced from the simulation, the find function returns -1, i.e. it didn't find any thing. So the question is; is there a way by which I can limit the values resultant from A and B to only 1 or 2 decimal points instead of 3? This would help me do the following, if 3 decimal point of A was 2.456 and B was 2.457 the find function would fail, because it doesn’t see them being equal. But I am not really interested in all that detail, it is enough for me if the find function tells me that at X point of H, A is 2.45 and B is 2.45 so they are both equal.

I hope I managed to explain what I am looking for clearly, however if you think you can help me but you didn't really understand what I am looking for, please let me know and I will try to explain it further.

Many Thanks in advance
Ali  

Outcomes