×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

The same problem, different approaches - different results - HATE IT !

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.

RE: The same problem, different approaches - different results - HATE IT !

Would submatrix to extract numeric data followed by max / min functions do what you want?

RE: The same problem, different approaches - different results - HATE IT !

(OP)
ok, I was bit angry when I wrote this post and on the second sight I agree it can be unclear. So I simplified the file.

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 !

Just one question: where you show "Different Result", what is the value of "a"?

RE: The same problem, different approaches - different results - HATE IT !

Yeah, two things:

>  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 !

(OP)
...yes, thank you IRstuff.

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.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources