MATLAB: Iam new to matlab… Beginner..

please help plotting the excel in matlab

I have imported an excel file which reads 1367*17 rows & columns.. In my program i should read starting or in between 10 rows & 10 columns & plot contours… How to use for looping for this cenario & the code should be user defined… for eg… when user enters 10 then 10 rows & coulumns should be read out… Please help me… If not possible to write codes,suggest me links where i can read & try to code..

Best Answer

  • rows = input('Enter matrix size: '); % user input
    end_cell = strcat(char(65+rows),num2str(rows));
    range = strcat('A1:',end_cell); % if rows = 10, range = 'A1:K10'. If rows = 5, range = 'A1:F5'
    M = xlsread('my_excel_file.xls',range); % the matrix you want