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
 All Forums
 Origin Forum
 Origin Forum
 Index Problem

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
MichelDe Posted - 07/06/2023 : 05:57:12 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: 9.8.5.201 , Win10

Hello!
I have a "simple" index problem and hope that someone can help.

I have a column A with data points and I want to calculate the mean value of certain points (not all) between the rows x and y.

The index for x and y should be easy to change - thus I want to put x and y in column B and C as the first value.

To calculate the mean value of the values in column A between row x and row y I used the following formula:

mean(A[B1:C1])

But in this way I only the mean value of the two values at position x and y. The values in between were not taken.

So basically I need the right syntax to get out all values between index x and y without putting x and y directly into the formula. This is important as the same indices should be used for multiple different calculations.

Thanks!
5   L A T E S T    R E P L I E S    (Newest First)
ChaoC Posted - 07/06/2023 : 4:35:41 PM
Hello,

It looks like this was fixed in 2022b:
https://originlab.jira.com/wiki/spaces/main/pages/2485846067/Origin+2022b+Bug+Fixes#:~:text=in%20Orign%202022b.-,ORG%2D24699,-SCV%20named%20range

If you can't upgrade, then as a workaround, you can do this:



You can hide column D if you want a cleaner worksheet.

Best,
Chao
MichelDe Posted - 07/06/2023 : 10:39:51 AM
Okay thanks!

One more question came up... When I chance of the indices or even values in the respective column (A), the calculated values are not updated.
Everything is set to "recalculate automatically" but nothing happens

The only way it is recalculating with new values is when I type in the formula again.
Is there a solution for this? So that all calculations are recalculated every time when I change the indices?
ChaoC Posted - 07/06/2023 : 10:15:49 AM
Hello,

The -v option is not strictly necessary in this case and you can read about it here: https://www.originlab.com/doc/en/LabTalk/guide/Range-Notation#Option_Switch_-vOption_Switches

The ; is how you end a line in a LabTalk script.

If you upgrade to at least Origin 2022, you would also have the option of using Named ranges: https://www.originlab.com/doc/en/Origin-Help/Named-Range

E.g.



Best,
Chao
MichelDe Posted - 07/06/2023 : 10:04:22 AM
Hello Chao,

thanks! that worked.

Just to understand that "code"
what does "-v" mean? And why are the ";" necessary?

Best,
Michel
ChaoC Posted - 07/06/2023 : 09:53:38 AM
Hello,

You can use LabTalk to set the data range.



Best,
Chao

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000