excel程序再次运​行的时候,显示索引超​出矩阵维度。

3 views (last 30 days)
rhujneg
rhujneg on 23 May 2023
Answered: phepwg on 23 May 2023
下面的这段程序,在我修改代码再运行的时候,这个excel文件就被修改过了,但是为什么会显示“索引超出矩阵维度”?怎么改好
clear data
data=xlsread('dataForMeasure1.xlsx')
disp(data);
X01=data(:,1);
Y01=data(:,2);
Z01=data(:,3);
X02=data(:,4);
Y02=data(:,5);
Z02=data(:,6);
xt=data(:,7);
yt=data(:,8);
zt=data(:,9);
syms Azimuth_1_ideal
Azimuth_1_ideal=Y01-yt
pathout = 'D:\此电脑\桌面\工作\dataForMeasure.xlsx';
Title = {'X01', 'Y01', 'Z01'};
xlswrite(pathout,Title,1,'A1');
xlswrite(pathout,Azimuth_1_ideal,1,'A2');

Accepted Answer

phepwg
phepwg on 23 May 2023
仅供参考,检查一下变量data有多少列。

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!