Message Boards Message Boards

0
|
2343 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

function valid for when two of the arguments are different?

Posted 11 years ago
Hi People.
I have a   data set  of numbers  which can be described as follows :
{{{a,b,c,d},{g,h,k,l}},{{a,b,c,d},{g,h,k,l}},{{a,b,c,d},{g,h,k,l}},{{a,b,c,d},{g,h,k,l}},{{a,b,c,d},{g,h,k,l}}....}
And I'm trying to use the function:
f3[{{a_, b_, c_, d_}, {g_, h_, k_, l_}}] := ( [(l - d)] + 0.01)/((Max[h, d]) - (Min[k, d]) + 0.01)
The thing is that I like the function to be used only in the  case  when l and d  are not equal.
I tried to use   /;  but the messages the mathematica issued were not clear enough for me .
POSTED BY: Artur Kotarski
2 Replies
f3[{{ a_, b_, c_, d_},{g_, h_, k_, l_ }} /; Unequal[l,d] := (l - d + 0.01)/( Max[h,d]) - Min[k,d] + 0.01 )
POSTED BY: Frank Kampas
Posted 11 years ago
Thank you for clue
POSTED BY: Artur Kotarski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract