I have an Excel spreadsheet with the following data:

A B A B

5 0.01500 5 0.01500

20 0.04000 15 0.03000

25 0.10000 22 0.10000

32 20.00000 27 20.00000

38 20.00000 35 20.00000

45 0.10000 43 0.10000

70 0.00300 70 0.00200

130 0.00300 90 0.00200

150 0.00010 100 0.03000

200 0.00010 110 0.03000

210 0.00400 150 0.00010

300 0.00400 190 0.00010

220 0.00150

300 0.00150

I am trying to import this data, separate the A's from B's into two

separate matricies. Then preform similar functions for the A's, then

the B's.

For the A's: Find the lowest and highest numbers in the matrix and

create an interval of 0.1 between these values (e.g. 5.0 5.1 5.2 5.3

... 299.8 299.9 300.0)

For the B's: Take the B value for each A value and find the B value

at each new created A value on a logarithmic scale.

I have been able to get this to work on a single A and B column. I

cannot get this to work for multiple A & B colums. Do I need to write

a loop to do this?

I would also like for the data computed in MATLAB to directly go to a

new excel file. Is this possible?

My code so far:

[DATA, HEADER]=xlsread('test.xls');

SIZE=size(DATA);

A=DATA(:,[1:2:SIZE(2)]);

B=DATA(:,[2:2:SIZE(2)]);

A_INTERVAL=[(min(A):.1:max(A))]';

B_INTERVAL=exp(interp1(log(A(:)), log(B(:)), log(A_INT),'linear'));

C=[A_INTERVAL B_INTERVAL]

I really appreciate any help.

Should look more like this

A.B........A.. B

5 0.01500 5 0.01500

20 0.04000 15 0.03000

25 0.10000 22 0.10000

32 20.00000 27 20.00000

38 20.00000 35 20.00000

45 0.10000 43 0.10000

70 0.00300 70 0.00200

130 0.00300 90 0.00200

150 0.00010 100 0.03000

200 0.00010 110 0.03000

210 0.00400 150 0.00010

300 0.00400 190 0.00010

............220 0.00150

............300 0.00150

A.B........A.. B

5 0.01500 5 0.01500

20 0.04000 15 0.03000

25 0.10000 22 0.10000

32 20.00000 27 20.00000

38 20.00000 35 20.00000

45 0.10000 43 0.10000

70 0.00300 70 0.00200

130 0.00300 90 0.00200

150 0.00010 100 0.03000

200 0.00010 110 0.03000

210 0.00400 150 0.00010

300 0.00400 190 0.00010

............220 0.00150

............300 0.00150

I CANNOT GET THIS TO WORK. DO I NEED TO WRITE A LOOP TO PREFORM THIS?

Why do you need two separate columns? Put them together.

I do need to do this with multiple columns and output columns. Any

help?

help?

There are basically two ways of doing it: ODBC and ActiveX. For the

first one you need the database toolbox, and for the second you need

installation of Excel on your computer. Check

http://www.yqcomputer.com/

KA

first one you need the database toolbox, and for the second you need

installation of Excel on your computer. Check

http://www.yqcomputer.com/

KA

I do not have the database toolbox. I do have excel. What

specifically should I be looking for from that link??

For

I just did this at work, i read data from 10 time series, averaged

the correct columns row by row and put the averaged data into a new

excel file.

[data, colheaders] = xlsread(filename)

time=data(:,1);

data(:,1)=[];

N=[1:4:39];

ch1=data(:,N);

N=N+1;

ch2=data(:,N);

N=N+1;

ch3=data(:,N);

N=N+1;

ch4=data(:,N);

CH1 =mean(ch1,2);

CH2 =mean(ch2,2);

CH3 =mean(ch3,2);

CH4 =mean(ch4,2);

excel = horzcat(time,CH1,CH2,CH3,CH4);

xlswrite(newfilename, excel)

1. Spreadsheet changes from auto calc to manual calc - HELP!

2. can I export a spreadsheet into a different spreadsheet with different column headings

3. Exporting Excel Spreadsheet to XML Spreadsheet.

4. import data from several spreadsheets into one spreadsheet

5. Importing cells into an excel spreadsheet from another spreadsheet

6. Importing Spreadsheet/Linking spreadsheet

7. How do I import multiple spreadsheets into the same spreadsheet?

8. Import excel spreadsheet into an excel spreadsheet

10. import/export quattro pro spreadsheets

11. importing/exporting Excel spreadsheet with Google

12. Can an Excel spreadsheet be exported to a comma-delimited import .

13. Importing excell spreadsheet - exporting ASCII fixed width file

14. Importing financial data from export Spreadsheet

15. Importing and exporting sheets from spreadsheets

9 post • Page:**1** of **1**