matlab Input argument "x" is undefined.function y=m(x);y=x.^3-2.*x-5;function y=m1(x);y=3.*x.^2-2;x=3;i=0;while i1e-5x=y;else breakendi=i+1;endx是这样的.出现了?Input argument "x" is undefinedX是用FUNCTION定义过的,怎么回事.能解决

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/13 07:39:01
matlab Input argument

matlab Input argument "x" is undefined.function y=m(x);y=x.^3-2.*x-5;function y=m1(x);y=3.*x.^2-2;x=3;i=0;while i1e-5x=y;else breakendi=i+1;endx是这样的.出现了?Input argument "x" is undefinedX是用FUNCTION定义过的,怎么回事.能解决
matlab Input argument "x" is undefined.
function y=m(x);
y=x.^3-2.*x-5;
function y=m1(x);
y=3.*x.^2-2;
x=3;i=0;
while i1e-5
x=y;
else
break
end
i=i+1;
end
x
是这样的.出现了?Input argument "x" is undefined
X是用FUNCTION定义过的,怎么回事.能解决再加5分.

matlab Input argument "x" is undefined.function y=m(x);y=x.^3-2.*x-5;function y=m1(x);y=3.*x.^2-2;x=3;i=0;while i1e-5x=y;else breakendi=i+1;endx是这样的.出现了?Input argument "x" is undefinedX是用FUNCTION定义过的,怎么回事.能解决
没有错啊,我在我的MATLAB2010a的版本上调试了,没错,结果是
x =
2.0946
我估计你会出错应该是你的function文件在保存的时候不要修改文件名,分别是m和m1,因为你在下面函数定义是这样的:
function y=m(x)
y=x.^3-2*x-5;
故,文件名不能改,否则也就是说你的x并没有定义.把你的邮箱给我,我把m文件发给你!

matlab 傅立叶变换程序在MATLAB中想要计算傅立叶变换,如sin(t),想请达人指点如何调用Fourier函数来实现.我的程序如下:t=linspace(-10,10,1000);>> Fourier(sin(t))Undefined function or method 'Fourier' for input argumen 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取出矩阵中元素的问题inputr=input(:,:,1)inputg=input(:,:,2) 怎样用MATLAB求解高次方程%主减速器传动比计算m=input('请输入汽车质量m=');ig=input('请输入变速器各档传动比ig=');et=input('请输入传动效率et=');r=input('请输入车轮半径r=');f=input('请输入滚动阻力系 matlab解一元二次方程a*x^2+b*x+ca,b,c用input输入,并且用到子函数 Error:File:Untitled2.m Line:1 Column:6 The input character is not valid in MATLAB statement 一道matlab的题目,clearm_num=input('m=')p_num=input('p=')t_num=input('t=')s_num=input('s=')D_num=input('D=')d_num=input('d=')f=sym('9.8/18*(6*m/(pi*d)-p*d.^2)*t/s*D/(D+2.4*d)');dfdm=diff(f,'m')dfdp=diff(f,'p')dfdt=diff(f,'t')dfds=diff(f,'s')dfdD= matlab做fft实验代码clc;clear;clf;N=input('Node number')T=input('cai yang jian ge')f=input('frenquency')choise=input('add zero or not?1/0 ')n=0:T:(N-1)*T; %采样点k=0:N-1;x=sin(2*pi*f*n);if choise==1e=input('Input the number of zeros!')x=[x zer matlab中solve语句y=input('please input relativeroughness:');z=input('please input Re:');[x]=solve('1/sqrt(x)=1.74-2*log10(2*y+18.7/(z*sqrt(x)))','x');x=subs(x); fprintf('沿程损失系数是%15.14f ',x)当y=0.01,z=8e7结果x=0但是把数直接 关于matlab定义函数我定义的函数:function function_fun();A=input('请输入状态矩阵A:');B=input('请输入状态矩阵B:');C=input('请输入状态矩阵C:');D=input('请输入状态矩阵D:');sys=ss(A,B,C,D);运行后:? f 请问我这个matlab程序哪里错了啊,Q=input('请输人泄漏源强(mg/s):Q=');H=input('输人计算风速(m/s):H=');d=input('请输人计算精度(m):d=');Z0=input('请输人地面粗糙长度(m):Z0:');Yj=meshgrid(50:d:1000,-100:d:100);% matlab求解直线与椭圆交点方程出的问题syms tD=input('输入射线源到旋转轴距离 D ');d1=input('输入任一点到中心探测器的距离 d1 ');d2=input('输入任一点到z轴的距离d2 ');h=input('输入射线源与y轴夹 matlab中调用函数,不想直接输入数据,编完程序再输入怎么办?每次都是一个个输入>> x=input('x=');x=4>> y=input('y=');y=7怎么才能编玩程序再输入数据?例如:>> x=input('x=');>> y=input('y=');>>x=?>>y=? input return input是什么意思 output += input[input.Length - int input = input.nextInt(); MATLAB怎样设置一个format short g变量>> format short g :aError using formatToo many input arguments.>> format short g aError using formatToo many input arguments.>> format shortaUndefined function or variable 'a'.