如何用matlab 求面积?y=[0.04972,0.07812,0.13424,0.18009,0.21851,0.24797,0.26592,0.28132,0.29462,0.30413,0.31318];x=[0.00005,0.00439,0.00996,0.015,0.02009,0.02502,0.03005,0.03504,0.04007,0.04505,0.05004];y为压缩应力(Mpa),x为压缩位移
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/05 17:11:02
![如何用matlab 求面积?y=[0.04972,0.07812,0.13424,0.18009,0.21851,0.24797,0.26592,0.28132,0.29462,0.30413,0.31318];x=[0.00005,0.00439,0.00996,0.015,0.02009,0.02502,0.03005,0.03504,0.04007,0.04505,0.05004];y为压缩应力(Mpa),x为压缩位移](/uploads/image/z/6110574-6-4.jpg?t=%E5%A6%82%E4%BD%95%E7%94%A8matlab+%E6%B1%82%E9%9D%A2%E7%A7%AF%3Fy%3D%5B0.04972%2C0.07812%2C0.13424%2C0.18009%2C0.21851%2C0.24797%2C0.26592%2C0.28132%2C0.29462%2C0.30413%2C0.31318%5D%3Bx%3D%5B0.00005%2C0.00439%2C0.00996%2C0.015%2C0.02009%2C0.02502%2C0.03005%2C0.03504%2C0.04007%2C0.04505%2C0.05004%5D%3By%E4%B8%BA%E5%8E%8B%E7%BC%A9%E5%BA%94%E5%8A%9B%EF%BC%88Mpa%EF%BC%89%2Cx%E4%B8%BA%E5%8E%8B%E7%BC%A9%E4%BD%8D%E7%A7%BB)
如何用matlab 求面积?y=[0.04972,0.07812,0.13424,0.18009,0.21851,0.24797,0.26592,0.28132,0.29462,0.30413,0.31318];x=[0.00005,0.00439,0.00996,0.015,0.02009,0.02502,0.03005,0.03504,0.04007,0.04505,0.05004];y为压缩应力(Mpa),x为压缩位移
如何用matlab 求面积?
y=[0.04972,0.07812,0.13424,0.18009,0.21851,0.24797,0.26592,0.28132,0.29462,0.30413,0.31318];
x=[0.00005,0.00439,0.00996,0.015,0.02009,0.02502,0.03005,0.03504,0.04007,0.04505,0.05004];
y为压缩应力(Mpa),x为压缩位移(mm).数据是从excel表中抄下来的.压缩时每分钟3mm,0.1秒取1个数.上面取的x的11个数就是1秒内的压缩位移(从0-1秒),y是对应的压缩应力.求x,y组成的这条曲线与x轴围成的面积.(可以把它看做一个一个的梯形累加而成的,用cumsum.给个具体的程序吧,我不会编程,还有这个只是1秒的数据,如何应用到1分钟?2分钟?)
如何用matlab 求面积?y=[0.04972,0.07812,0.13424,0.18009,0.21851,0.24797,0.26592,0.28132,0.29462,0.30413,0.31318];x=[0.00005,0.00439,0.00996,0.015,0.02009,0.02502,0.03005,0.03504,0.04007,0.04505,0.05004];y为压缩应力(Mpa),x为压缩位移
N = length(x);
interv_x = zeros( 1,N - 1 );
mid_y = zeros( 1,N - 1);
for i = 2 :length(x)
mid_y(i-1) = ( y(i) + y(i-1) ) / 2;
interv_x(i - 1) = x(i) - x(i-1);
end
% 面积
area = interv_x * mid_y';
对于1分钟,2分钟的数据,直接调用这段代码都可以计算.