Excel中数据
0
0
0.14
7.7
0.39
12.4
0.58
17.6
1.05
25.7
1.43
34.75
1.89
43.15
2.08
47.05
2.38
50.5
2.67
53.9
3.11
58.15
3.37
60.05
4
63.3
4.35
62.95
4.97
62.9
5.59
63
5.88
62.55
6.22
62.8
7.11
62.55
7.78
62.3
8.41
61.7
8.85
61.5
9.36
61.1
9.82
60.85
10.4
60.35
11.26
59.8
11.84
59.65
12.48
59.55
12.88
59.85
13.85
60.45
14.38
60.8
14.98
61.05
15.56
61.25
16.36
61.15
16.91
61.15
17.65
61.1
18.13
61
19.37
60.95
20.11
60.7
将左边一列赋予x,右边一列赋给y
这个怎么操作呢?或者有程序解决么?

 채택된 답변

0 개 추천

简短的代码,希望对你有所帮助。
clear all;clc;
[filename,pathname]=uigetfile('*.xls','选择数据文件');
[num txt]=xlsread([pathname,filename]);
x=num(:,1);
y=num(:,2);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!