필터 지우기
필터 지우기

Regarding importing excel in matlab

조회 수: 1 (최근 30일)
Yogesh Rao
Yogesh Rao 2015년 1월 2일
댓글: Yogesh Rao 2015년 1월 2일
heii friends.....i need help..... I have excel sheet .... The first 5 lines have unwanted text containing header date name etc.... actual data starts from 6th line.... I need to get an array which should have data of first column and another array that will have data of all other columns....... I tried with the code as shown below but i get error stating not enough input arguments ....can any1 suggest modifications/correct way so as to solve the problem...... clc; clear all; close all; b=[]; a=[]; [num,txt,raw] = xlsread('C:\Users\SONY\Desktop\goodresults\22122014.xlsx'); [r,c]=size(raw); a=raw(6:r,1); b=raw(6:r,2:c); figure(1),plot(a,b);

채택된 답변

Shoaibur Rahman
Shoaibur Rahman 2015년 1월 2일
xlsread import excel data with cell type. Convert them to double before plotting. In this case u can use cell2mat function:
a=raw(6:r,1);
b=raw(6:r,2:c);
A = cell2mat(a);
B = cell2mat(b);
figure(1), plot(A,B);
  댓글 수: 1
Yogesh Rao
Yogesh Rao 2015년 1월 2일
Hey I tried with the above code you mentioned. It worked ! Thanks a lot for timely help ! Thanks a lot again !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by