matlab问题?Input argument 'X' is undefined.function Y = adb(X,bd)%Y = ADB(X,bd) adds rows and/or columns by duplication on the % lower resp.right side of the input matrix% % X - input matrix% bd(1) - number of rows to add % bd(2) - number of column

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/14 03:12:26
matlab问题?Input argument 'X' is undefined.function Y = adb(X,bd)%Y = ADB(X,bd) adds rows and/or columns by duplication on the % lower resp.right side of the input matrix% % X - input matrix% bd(1) - number of rows to add % bd(2) - number of column

matlab问题?Input argument 'X' is undefined.function Y = adb(X,bd)%Y = ADB(X,bd) adds rows and/or columns by duplication on the % lower resp.right side of the input matrix% % X - input matrix% bd(1) - number of rows to add % bd(2) - number of column
matlab问题?Input argument 'X' is undefined.
function Y = adb(X,bd)
%Y = ADB(X,bd) adds rows and/or columns by duplication on the
% lower resp.right side of the input matrix
%
% X - input matrix
% bd(1) - number of rows to add
% bd(2) - number of columns to add
%
% Y - extended matrix
% (Oliver Rockinger 16.08.99)
[z s] = size(X);
% copy interior
Y = zeros(z+bd(1),s+bd(2));
Y(1:z,1:s) = X;
% add rows
if (bd(1) > 0)
Y(z+1:z+bd(1),1:s) = X(z-1:-1:z-bd(1),1:s);
end;
% add columns
if (bd(2) > 0)
Y(1:z,s+1:s+bd(2)) = X(1:z,s-1:-1:s-bd(2));
end;
% add corner
if (bd(1) > 0 & bd(2) > 0)
Y(z+1:z+bd(1),s+1:s+bd(2)) = X(z-1:-1:z-bd(1),s-1:-1:s-bd(2));
end;
Input argument 'X' is undefined.
Error in ==> C:\MATLAB6p5\work\adb.m
On line 13 ==> [z s] = size(X);
这是什么原因?

matlab问题?Input argument 'X' is undefined.function Y = adb(X,bd)%Y = ADB(X,bd) adds rows and/or columns by duplication on the % lower resp.right side of the input matrix% % X - input matrix% bd(1) - number of rows to add % bd(2) - number of column
你不能直接运行这个adb.m文件
你需要在命令行里输入
X=[1 2 3;4 5 6;7 8 9];%具体什么 你自己定 是一个矩阵
bd=[1,2];%同样是你自己指定的
Y=adb(X,bd)
或者 你建立一个新的temp.m和abd.m在同一个目录下,文件内容为
X=[1 2 3;4 5 6;7 8 9];%具体什么 你自己定 是一个矩阵
bd=[1,2];%同样是你自己指定的
Y=adb(X,bd)
即可

MATLAB取出矩阵中元素的问题inputr=input(:,:,1)inputg=input(:,:,2) matlab求解直线与椭圆交点方程出的问题syms tD=input('输入射线源到旋转轴距离 D ');d1=input('输入任一点到中心探测器的距离 d1 ');d2=input('输入任一点到z轴的距离d2 ');h=input('输入射线源与y轴夹 matlab问题 matlab问题 matlab一个定义值只能用于一个公式的计算吗?“W=input('input W(kg)=');mw=input('input mw(kg/h)=');V0=input('input V0=');T0=input('input T0=');P0=input('input P0=');P0v=input('input P0v=');M0a=((P0-P0v)*V0)/(287*T0);M0v=(P0v*VO)/(461*T0 matlab solve问题,同样使用solve,在使用input的情况下,少了一个解同一个方程15.24*ln(d)+15.24*d1/d-t1-35.54=0,用第一种方法算syms t1 d1d=solve('15.24*ln(d)+15.24*d1/d-t1-35.54=0','d');subs(d,{t1,d1},{input('t1='),input('d1=')} matlab问题?Input argument 'X' is undefined.function Y = adb(X,bd)%Y = ADB(X,bd) adds rows and/or columns by duplication on the % lower resp.right side of the input matrix% % X - input matrix% bd(1) - number of rows to add % bd(2) - number of column 关于matlab解二元方程的问题>> [x,y]=slove('x+y=1','x-y=9')Undefined function 'slove' for input arguments of type 'char'.错在哪儿了? 关于matlab/simulink仿真过程出现的问题!仿真时出现仿真诊断“Derivative input 1 of 'wenya_filer/Transfer Fcn'(文件名) at time 0.2686788627406385 is Inf or NaN.Stopping simulation.There may be a singularity in the solution.If MATLAB问题x=floor(100*rand(1))啥意思?原题如下:x=floor(100*rand(1));for i=0:6y=input('请输入猜测数');if y>xdisp('High')else if y 在用Matlab仿真时出现以下问题 怎么改啊 Undefined function or method 'conv2' for input arguments of type 'char'.Error in ==> conv at 40c = conv2(a(:),b(:),shape); matlab中拉氏变换问题>> f=1;>> F=laplace(f)Undefined function or method 'laplace' for input arguments of type 'double'.想求常数1的拉氏变换.错误在哪里?如何修改? matlab 问题? Error using ==> initial at 71 Not enough input arguments.在运行程序:%标准粒群优化算法程序%测试函数:f(x,y)=100(x^2-y)^2+(1-x)^2, -2.048 matlab的 input函数问题syms x lanmuda n2 n1 n3 H k0H=input('请输入芯层厚度=');lanmuda=('请输入波长=');n1=('请输入上层折射率=');n2=('请输入中间层折射率=');n3=('请输入下层折射率=');N=('请输入模数=');k0=2*pi Matlab 出现的子函数输出问题.源M文件如下:&&&&&&&&&&&&&&&function [taxb,taxa,diff]=homework1income=input('yourincome:','s');type=input('yourtaxtype:(1 is for single,2 is for company)','s');ty=(type-1)*2;tyy=ty+4;y=whichstep(income,ty); matlab 画图的问题, matlab安装问题 matlab 非线性规划问题