The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Min value in a range from max to end
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bedibra

France
35 Posts

Posted - 08/23/2017 :  09:57:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear all,
I am looking for a way using the set values function to get Min value in a column which range from max value in that column to the end of the column.
I will really appreciate your help.

Hideo Fujii

USA
1582 Posts

Posted - 08/23/2017 :  11:58:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi bedibra,

Please try the following:

Before Formula Script:
  sum(col(A));
  smax=sum.max;
  simax=sum.imax;
  range rr=col(A)[$(simax):<end>];
  sum(rr);
  smin=sum.min;
  simin=sum.imin;

col(B)=
  i==1?simax: (i==2?smax: (i==3?simin:(i==4?smin:0)))
It shows the max position, the value, the min position after the max, and the value.

Does it work?

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 08/23/2017 11:58:46 AM
Go to Top of Page

bedibra

France
35 Posts

Posted - 08/23/2017 :  1:59:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Will it works.
Thanks a lot
quote:
Originally posted by Hideo Fujii

Hi bedibra,

Please try the following:

Before Formula Script:
  sum(col(A));
  smax=sum.max;
  simax=sum.imax;
  range rr=col(A)[$(simax):<end>];
  sum(rr);
  smin=sum.min;
  simin=sum.imin;

col(B)=
  i==1?simax: (i==2?smax: (i==3?simin:(i==4?smin:0)))
It shows the max position, the value, the min position after the max, and the value.

Does it work?

--Hideo Fujii
OriginLab


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000