close







MATLAB程式設計問題1




立即點擊


下列數據是量測某一熱水龍頭,在t=0時打開後的水溫:t(sec)0,1,2,3,4,5,6,7,8,9,10T(F)72.5,78.1,86.4,92.3,110.6,111.5,109.3,110.2,110.5,109.9,110.2(1)繪出這些數據點分佈圖(2)並同時在每兩點之間,繪出nearest,linear,spline,cubic四種內插法所建立的曲線(3)分別用nearest,linear,spline,cubic四種內插法,分別預測時間t=0.6,2.5,4.7,8.9時的溫度(4)分別用linear,spline...顯示更多下列數據是量測某一熱水龍頭,在t=0時打開後的水溫:t(sec)0,1,2,3,4,5,6,7,8,9,10T(F)72.5,78.1,86.4,92.3,110.6,111.5,109.3,110.2,110.5,109.9,110.2(1)繪出這些數據點分佈圖(2)並同時在每兩點之間,繪出nearest,linear,spline,cubic四種內插法所建立的曲線(3)分別用nearest,linear,spline,cubic四種內插法,分別預測時間t=0.6,2.5,4.7,8.9時的溫度(4)分別用linear,spline二種內插法,分別預測要到?溫度T=75,85,90,105所需的時間拜託各位大大們!拜託!





(1) t=[0,1,2,3,4,5,6,7,8,9,10]; T=[72.5,78.1,86.4,92.3,110.6,111.5,109.3,110.2,110.5,109.9,110.2]; plot(t,T,'-ok');hold on;XLABEL('Time');YLABEL('F'); (2) t_interp=(0.5:1:9.5) T_nearest=interp1(t,T,t_interp,'nearest'); T_linear=interp1(t,T,t_interp,'linear'); T_spline=interp1(t,T,t_interp,'spline'); T_cubic=interp1(t,T,t_interp,'cubic'); plot(t_interp,T_nearest,':xg'); plot(t_interp,T_linear,':+r'); plot(t_interp,T_linear,':*c'); plot(t_interp,T_cubic,':sb'); (3) t_per=[0.6, 2.5, 4.7, 8.9]; T_nearest=interp1(t,T,t_per,'nearest'); T_linear=interp1(t,T,t_per,'linear'); T_spline=interp1(t,T,t_per,'spline'); T_cubic=interp1(t,T,t_per,'cubic'); (4) T_per=[75, 85, 90, 105]; t2=[t(1:10) 9.9999]; T2=[T(1:10) interp1(t,T,t2(11),'linear')]; t_linear=interp1(T2,t2,T_per,'linear') T2=[T(1:10) interp1(t,T,t2(11),'spline ')]; t_spline=interp1(T2,t2,T_per,'spline ')








以上文章來自奇摩知識家,如有侵犯請留言告知


https://tw.answers.yahoo.com/question/index?qid=20060612000012KK13360

C902071D09AF7660
arrow
arrow

    一根頭髮 發表在 痞客邦 留言(0) 人氣()