matlab内存不足,如何解决?
MATLAB在trmatlab1
(第172行)中显示错误,
f1=1./(19.42.*(1./t)+1./((1./2)+sqrt((1./4)-(1.918./(40.^2)).*t)));
我的目标是使用分段函数f1
和f2
:
%data:
p_2 = [ 0.0210
0.0180
0.3280
1.3720
1.8330
1.8780
2.0400
2.0670
2.0400
0.1460
0.1450
0.1450];
eta=[0.0020
0.0020
0.5200
0.5020
0.4840
0.4640
0.4440
0.4260
0.4240
0.4230];
figure(1);
%Messwerttabelle geplottet:
plot(p_2, eta, '+');
grid on;
%parameter t:
t=(0:1:1e8);
%positive root of the piecewise function f1
f1=1./(19.42.*(1./t)+1./((1./2)+sqrt((1./4)-(1.918./(40.^2)).*t)));
%negative root of the piecewise function f1
f2=1./(19.42.*(1./t)+1./((1./2)-sqrt((1./4)-(1.918./(40.^2)).*t)));
hold on;
plot(f1,f2);
MATLAB displays the error in TRmatlab1
(line 172)
f1=1./(19.42.*(1./t)+1./((1./2)+sqrt((1./4)-(1.918./(40.^2)).*t)));
My goal is to fit the ambiguous data with a piecewise function f1
and f2
:
%data:
p_2 = [ 0.0210
0.0180
0.3280
1.3720
1.8330
1.8780
2.0400
2.0670
2.0400
0.1460
0.1450
0.1450];
eta=[0.0020
0.0020
0.5200
0.5020
0.4840
0.4640
0.4440
0.4260
0.4240
0.4230];
figure(1);
%Messwerttabelle geplottet:
plot(p_2, eta, '+');
grid on;
%parameter t:
t=(0:1:1e8);
%positive root of the piecewise function f1
f1=1./(19.42.*(1./t)+1./((1./2)+sqrt((1./4)-(1.918./(40.^2)).*t)));
%negative root of the piecewise function f1
f2=1./(19.42.*(1./t)+1./((1./2)-sqrt((1./4)-(1.918./(40.^2)).*t)));
hold on;
plot(f1,f2);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论