【发布时间】:2014-05-01 00:43:53
【问题描述】:
我有一个 matlab 曲线,我想从中绘制并找到 17 个不同时间样本的浓度值
以下是我想从中提取 17 个不同时间点的浓度值的曲线
以下是以分钟为单位的时间点
t = 0,0.25,0.50,1,1.5,2,3,4,9,14,19,24,29,34,39,44,49. minutes samples
以下是我为绘制上图而编写的函数
function c_t = output_function_constrainedK2(t, a1, a2, a3,b1,b2,b3,td, tmax,k1,k2,k3)
K_1 = (k1*k2)/(k2+k3);
K_2 = (k1*k3)/(k2+k3);
DV_free= k1/(k2+k3);
c_t = zeros(size(t));
ind = (t > td) & (t < tmax);
c_t(ind)= conv(((t(ind) - td) ./ (tmax - td) * (a1 + a2 + a3)),(K_1*exp(-(k2+k3)*t(ind)+K_2)),'same');
ind = (t >= tmax);
c_t(ind)= conv((a1 * exp(-b1 * (t(ind) - tmax))+ a2 * exp(-b2 * (t(ind) - tmax))) + a3 * exp(-b3 * (t(ind) - tmax)),(K_1*exp(-(k2+k3)*t(ind)+K_2)),'same');
plot(t,c_t);
axis([0 50 0 1400]);
xlabel('Time[mins]');
ylabel('concentration [Mbq]');
title('Model :Constrained K2');
end
如果可能的话,请给我一些想法,我可以如何改变上述函数,以便我可以得出上述 17 个不同时间点的浓度值
以下是我用来绘制曲线的输入值
output_function_constrainedK2(0:0.1:50,2501,18500,65000,0.5,0.7,0.3,3,8,0.014,0.051,0.07)
【问题讨论】:
-
为什么不在调用函数时将您想要的时间点作为
t输入参数输入? -
@David:对不起,我是 matlab 的初学者,我所拥有的是时间 t=50 分钟,这是扫描时间,我不可能更改该值,是的,我可以简单地输入不同的 t 值和调用该函数,但根据我目前的工作指南,它是不可接受的
标签: signal-processing matlab sampling