plot/stackedplot excel matlab

조회 수: 2 (최근 30일)
Salwa Ben Mbarek
Salwa Ben Mbarek 2021년 4월 22일
편집: Scott MacKenzie 2021년 4월 22일
Hello,
Can anyone tell me how to plot excel tabel in matlab? I've try plot/ stackedplot but it does not work. Can you please help me?
Here's the code:
clc;
clear all;
T = readtable('file.xlsx');
A = readtable('file.xlsx','Range','D11:D49');
B= readtable('file','Range','I11:I49');
A_plot=A(:,1);
B_plot= B(:,1);
figure
plot(A_plot,B_plot)
stackedplot(A,B)

채택된 답변

Scott MacKenzie
Scott MacKenzie 2021년 4월 22일
편집: Scott MacKenzie 2021년 4월 22일
Try changing
A_plot = A(:,1);
B_plot = B(:,1);
to
A_plot = table2array(A(:,1));
B_plot = table2array(B(:,1));

추가 답변 (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