📄 demosicmod.m
字号:
function demoSiCmod
% demoSiCmod Least squares fit of bulk modulus of SiC versus temperature
%
% Synopsis: demoSiCmod
%
% Input: none
%
% Output: Plot of line fit to data
[t,D,labels] = loadColData('SiC.dat',6,5);
g = D(:,1); % bulk modulus (GPa) in first column
[c,R2] = linefit(t,g);
fprintf('\nLine fit to Bulk Modulus of SiC versus temperature\n');
fprintf('\tc(1) = %14.6e\n\tc(2) = %14.6e\n\tR2 = %6.4f\n',c,R2)
tfit = [ min(t) max(t)]; gfit = c(1)*tfit + c(2); % evaluate fit function
plot(t,g,'o',tfit,gfit,'-');
xlabel('T {}^\circ C'); ylabel('Bulk Modulus GPa');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -