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 for Programming
 LabTalk Forum
 importing and transforming data in a matrix

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
Stéphane Posted - 06/12/2007 : 05:42:12 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System: xp

Hi!

Thanks Mike for your last answer!

a new problem...
I have the following data sets in worksheets: Data1_A, Data2_A. For each value in Data1_A I want to make calculations with all the points in Data2_A, so I should obtain something like a matrix.

Now I tried with MATRIX:set values to assign the following, or also with the CodeBuilder:

double i; double j;

for (i=1; i<=5; i++)
{
for (j=1; j<=5; j++)
{
Cell(i,j) = Data1_A[i]*Data2_A[j];
};
};

quite easy in fact... but it doesn't work!

I also look at the AccessWorksheetObjectsTutorial.c to import the files, but I can't programming and so I have problems!!!

Every help is welcome!
Thank you very much

Stéphane
4   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/12/2007 : 08:49:35 AM
Hi Stéphane,

Matrix> Set Values works for me...



Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/12/2007 08:53:15 AM

Edited by - Mike Buess on 06/12/2007 08:56:50 AM
Stéphane Posted - 06/12/2007 : 08:14:32 AM
OK, I wrote the script in one line without semicolons, and now it works!

Stéphane
Stéphane Posted - 06/12/2007 : 07:59:34 AM
Hello Deanna!

Thanks for the answer, but I can't make it works :-(
Wenn I give the code in the Script Window (with the matrix as active window), it writes a warning message:

Cell($(i),$(j)) = Data1_A[$(i)]*Data2_A[$(j)] Column name must not be blank

and in the script window:
Cell(i,j) found < 0.5

What make I false?

Thanks!
Stéphane
Deanna Posted - 06/12/2007 : 05:58:28 AM
Hi Stéphane,

Please execute the following code in the Script Window:

for (i=1; i<=5; i++)
{
for (j=1; j<=5; j++)
{
Cell($(i),$(j)) = Data1_A[$(i)]*Data2_A[$(j)];
};
};


Hope this works for you.

Deanna
OriginLab Technical Services

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