matlab Index exceeds matrix dimensions.
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/12 18:37:26
matlab Index exceeds matrix dimensions.
子函数:
function [MminT] =MminT(M,H,r,i)
syms x;
y=(x-i(M)).*(x-i(M+1))./((i(M-1)-i(M)).*(i(M-1)-i(M+1))).*r(M-1,H)+(x-i(M-1)).*(x-i(M+1))./((i(M)-i(M-1)).*(i(M)-i(M+1))).*r(M,H)+(x-i(M-1)).*(x-i(M))./((i(M+1)-i(M-1)).*(i(M+1)-i(M))).*r(M+1,H);
c=sym2poly(y);
MminT=roots(c);
程序:
M=2;
H=3;
r=[1 2 3 4 5;2 3 4 5 6;3 4 5 6 7;4 5 6 7 8];
i=[1 2 3 4 5];
[MminT] =MminT(M,H,r,i);
a=MminT;
错误:
Index exceeds matrix dimensions.
Error in ==> aaa at 5
[MminT] =MminT(M,H,r,i);
还是不太懂,应该怎么改呢?我期望的道的MminT是一个数.
子函数:
function [MminT] =MminT(M,H,r,i)
syms x;
y=(x-i(M)).*(x-i(M+1))./((i(M-1)-i(M)).*(i(M-1)-i(M+1))).*r(M-1,H)+(x-i(M-1)).*(x-i(M+1))./((i(M)-i(M-1)).*(i(M)-i(M+1))).*r(M,H)+(x-i(M-1)).*(x-i(M))./((i(M+1)-i(M-1)).*(i(M+1)-i(M))).*r(M+1,H);
c=sym2poly(y);
MminT=roots(c);
程序:
M=2;
H=3;
r=[1 2 3 4 5;2 3 4 5 6;3 4 5 6 7;4 5 6 7 8];
i=[1 2 3 4 5];
[MminT] =MminT(M,H,r,i);
a=MminT;
错误:
Index exceeds matrix dimensions.
Error in ==> aaa at 5
[MminT] =MminT(M,H,r,i);
还是不太懂,应该怎么改呢?我期望的道的MminT是一个数.
MminT
看一下这个变量的维数,提示是告诉你这个变量没有你要得到的维数.
看一下这个变量的维数,提示是告诉你这个变量没有你要得到的维数.
matlab Index exceeds matrix dimensions.
matlab中Index exceeds matrix dimensions.错误
matlab中Index exceeds matrix dimensions
Matlab计算Index exceeds matrix dimensions.为什么?
MATLAB 中 Index exceeds matrix dimensions.错误
MATLAB Index exceeds matrix dimensions问题
Matlab计算Index exceeds matrix dimensions.为什么?...
matlab的问题?Index exceeds matrix dimensions.
Index exceeds matrix dimensions.
matlab的问题:关于Index exceeds matrix dimensions.
matlab中,Index exceeds matrix dimensions错误问题
为什么会出现Index exceeds matrix dimensions