linear Interpolation using matlab
显示 更早的评论
Hi,
I am trying to interpolate using if loops. The time is in 30min intervals for 24hrs. I have attached the txt file that I am using, i have read the file in using
fid= fopen('ifng.txt','r');
format longg;
A = textscan(fid, ['%s', repmat('%f', 1 , 25)], 'HeaderLines', 1);
e= [A{2:end}];
So far I have
if(t<30)
{E=((t-t0)/(t1-t0))*e1-((t1-t)/(t1-t0)e0)}
elseif(t<60)
{E=((t-t1)/(t2-t1))*e2-((t2-t)/(t2-t1)e1)}
end
I am just wanting to know if I am along the correct lines or if I have missed out any steps. I know that the code isn't finished but just checking of I'm along the right lines as I am new to matlab.
Thanks
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!