This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: not understand this notation so it will be less confusion if you change excel to use this notation. Go to Tools Options General and put a check mark in front of R1C1 reference style. 4. Open matlab. Lets import the column of data from excel into matlab: myexcel = ddeinit('excel','matlabtest.xls') x = ddereq( myexcel, 'r1c1:r20c1' ) 5. Great we just copied one column of data from excel into matlab. Lets process it in some silly way in this case well simply add one to each element y = x + 1 6. ok now lets write this new data back into the excel table ddepoke(myexcel, 'r1c2:r20c2', y) This example may look rather trivial afterall, we could have just used an excel formula to create the second column but this becomes very useful when the equation for the second column is complicated. For other methods of reading or writing from an excel file, use matlab help to look up the methods: xlsinfo, xlsread, xlswrite...
View
Full
Document
This note was uploaded on 04/29/2008 for the course PHYS 257 taught by Professor Dobbs during the Fall '07 term at McGill.
 Fall '07
 Dobbs

Click to edit the document details