Error in if funtion
Oct 03, 2023
05:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 03, 2023
05:28 AM
Error in if funtion
Labels:
- Labels:
-
Mathcad Usage
ACCEPTED SOLUTION
Accepted Solutions
Oct 03, 2023
06:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
2 REPLIES 2
Oct 03, 2023
06:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 03, 2023
06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 03, 2023
06:57 AM
Some remarks:
- The function "and" is only for matrix arguments look it up in the help. You have to use the "and operator" ^ as Cornel had shown
- There is a unit mismatch! You can only calculate f-l if both are of the same dimension. So either both must be unit-less (like f is) or both must be lengths (like l is). Choose d:=20m in Cornels sheet to see the error. I guess that f should be a length.
- Another unit mismatch at the return values. Sometimes a unit-less value like f or 3.5 is returned, sometimes a length. Guess it should be 3.5 m or even better, write l, not 3.5
- It would look much clearer if you use the programmed "if" statement and not the Excel-like if-function
- You also may consider turning k.s into a function of d.
- And here is what I get when I evaluate and plot that function in the range from -2m to 30 m:
Look a bit strange to me. Are you sure that it should look like that? Maybe the expression for d>0.7*L.rule should be, so it would rather look like
- Last, but not least: It's usually considered rude not to close threads (Re: Can i form a trochoidal wave ?, how can i get interpolated value without sorting, interpolations of table) or not to respond to replies at all (Recalling values to table from predefined values, finding X intercept)!
