interp1 stop-end condition
3 views (last 30 days)
Show older comments
Hi,
I would like to put a condition on the interp1 function. The following function Vx in inserted in another function in which there is a for cycle of n data and for each of them x has a maximum value. The maximum of column stor(:, 1) varies for each i, so if it reaches the maximum of stor(:,1) I should write zero. Instead the interpolation continue also outside the interval...
volx = Vx(ddbsi, x, organ, std_dose)
stor = choose(organ, ddbsi, std_dose);
md = max(stor(:, 1));
[v, i] = union(1 - cumsum(stor(:, 2)), []);
volx = interp1([stor(i, 1); inf], [v; 0], x, 'linear', 1);
Can I resolve? Thanks a lot
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!