再问你个问题呗,在matlab中怎么建立y=b(1)*[x-b(2)]这个模型的M函数,代码怎么写啊?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/06/30 21:22:09
再问你个问题呗,在matlab中怎么建立y=b(1)*[x-b(2)]这个模型的M函数,代码怎么写啊?
呵呵 那个我知道了 不过还有个问题想麻烦您。我编的这个程序
clear all;
x=1:0.5:4.5;
y=[3.3 5.2 8.4 13.5 22 35.9 58.6 96];
beta=ones(2,3,1,2,3);
beta = nlinfit(x,y,@sd,beta);
结果出来yhat =
Columns 1 through 8 40.171 288.96 3289.9 60040 1.7697e+006 8.4654e+007 6.5941e+009 8.3839e+011
……
Function 'norm' is not defined for values of class 'double' and attributes 'full nd real'.
Error in ==> nlinfit at 204
if norm(step) < betatol*(sqrteps+norm(beta))怎么回事呢
呵呵 那个我知道了 不过还有个问题想麻烦您。我编的这个程序
clear all;
x=1:0.5:4.5;
y=[3.3 5.2 8.4 13.5 22 35.9 58.6 96];
beta=ones(2,3,1,2,3);
beta = nlinfit(x,y,@sd,beta);
结果出来yhat =
Columns 1 through 8 40.171 288.96 3289.9 60040 1.7697e+006 8.4654e+007 6.5941e+009 8.3839e+011
……
Function 'norm' is not defined for values of class 'double' and attributes 'full nd real'.
Error in ==> nlinfit at 204
if norm(step) < betatol*(sqrteps+norm(beta))怎么回事呢
函数写成
function y=testfun(x,b)
y=b(1)*(x-b(2));
就行了
你是要这个么
function y=testfun(x,b)
y=b(1)*(x-b(2));
就行了
你是要这个么
再问你个问题呗,在matlab中怎么建立y=b(1)*[x-b(2)]这个模型的M函数,代码怎么写啊?
在 matlab中比如x=1,y=2,要用m表示这个点的代码怎么写
怎么建立matlab模型
用MATLAB对y=a*x^b模型函数的拟合
matlab 这个X^2/a^2+Y^2/b^2=1 a=3,b=5;a=4,b=2 怎么写程序?
matlab 幂函数y=(1/2)^x这个函数用matlab怎么画图?我写的程序:t= 0:0.1:1 Rt=pow2(
matlab中函数raylrnd(B,M,N)的参数B是什么意思啊,怎么设置,
请问如何在Matlab中画出z=exp(x.^2+y.^2)的图像?请给出完整代码(M文件代码)
matlab画定积分图像,我的被积函数是y=sin(x*x) 从0-x画图怎么写代码,
MATLAB怎么画y=(sinx)^n,x在0到2π范围上.用最简单的代码
怎么用matlab求解Logistic模型中的两个参数Logistic模型的方程变为y=b/(1+((b-a)/a)*e
matlab 中这个计算公式怎么写代码?