The same problem, different approaches - different results - HATE IT !
The same problem, different approaches - different results - HATE IT !
(OP)
Hi,
I created a piece of code, which automaticly return maximal internal forces from a file. Then I realized that I can simplify my code with built-in mathcad functions. So I created a new code but then I realize that results are different...I tried to set higher precision, but it did not work.
I created a piece of code, which automaticly return maximal internal forces from a file. Then I realized that I can simplify my code with built-in mathcad functions. So I created a new code but then I realize that results are different...I tried to set higher precision, but it did not work.





RE: The same problem, different approaches - different results - HATE IT !
RE: The same problem, different approaches - different results - HATE IT !
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: The same problem, different approaches - different results - HATE IT !
The code "MaxVnSily" search in fourth column of input table for absolute maximum. When maximum is found it return this maximum value but with real sign. In the same time some additional values are returned from the same row where maximum is found.
The second code should do the same thing with different approach, but I hope you can see clearly that value -8264.6 is not the same as -8263.6.
The funny and unlogical thing in the same time is that function min(F(4)) return correct value, but subsequently fuction match( min(F(4)), (F(4) ) return incorrect row index.
RE: The same problem, different approaches - different results - HATE IT !
RE: The same problem, different approaches - different results - HATE IT !
> You use indices where you don't need to, so your first answer shows up in a nested array, which is unnecessary
> You seem to have forgotten that you stripped out the header in the submatrix and that b is offset by 6
> c does not need an index, again nested array as output
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: The same problem, different approaches - different results - HATE IT !
In the second case I need to just set b+6 as in the first one case...Sometimes "I do not see things because of my eyes"
I wanted to use the external file directly (the table is actualy input as xls, only for this example I put it in the mathcad file to prevent uploading two files) without manual deleting of header so I came up whit this solution, but s from time to time I forgot my own logic.
Regarding unnesesary indexes, if you look to previous file I uploaded, maxVnSily returns more than one row of information. The reason of nested array is that I want to save vertical space in file so I try to write the information horizontaly as much as possible.
Ok, thank you again.