xlsread function and ranges

2 visualizzazioni (ultimi 30 giorni)
huy ho
huy ho il 20 Apr 2019
Risposto: Walter Roberson il 20 Apr 2019
data1 = xlsread('data1.xlsx', 'sheet1', 'A1:B48')
my spreadsheet has data for each day of a month (day 1 to day 30) day 1 equals the range A1:B48, day 2 would be A49:B96 etc so the nth term would be 48n - 47 for A and 48n for B where n = day of the month. how can i incorporate the nth term into the xlsread function so that anyone can choose any value of n between 1 and 30 (here i can also use the opportunity to use if statement) and it'll generate the xls read function for that given day? can i even put a formula in for the range in xlsread function?

Risposte (1)

Walter Roberson
Walter Roberson il 20 Apr 2019
"A"+((n-1)*48+1)+":B"+(n*48)

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by