關於我自己

我的相片
Welcome to discuss about : Chinese Traditional Medicine and Acupuncture Please send me the email: tccnchsu@gmail.com Chih-Yu Hsu

最新消息

總網頁瀏覽量

2008年9月27日 星期六

朝陽課程-數值分析

ED304330 - General Variable Skill, Computer Programming and Mathematics.
http://eric.ed.gov/ERICWebPortal/custom/portlets/recordDetails/detailmini.jsp?_nfpb=true&_&ERICExtSearch_SearchValue_0=ED304330&ERICExtSearch_SearchType_0=no&accno=ED304330
relation mathematics computer programming
http://www.google.com.tw/search?hl=zh-TW&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=relation+mathematics+computer+programming&spell=1
-------------------------------------------------------------
如何將數值分析這門課
讓數學基礎不穩固的研究生能夠聽的懂?
這是很重要的課題

先從兩個未知數的聯立方程組的產生說起
以父子問題和雞兔同籠問題來了解出題的思維
再以"加減消去法"及"代入法"來解父子問題和雞兔同籠問題
ax+by=c
dx+ey=f

x=(ce-bf)/(ae-bd);y=(af-dc)/(ae-bd) (公式)

設計Matab程式,利用公式法來求解兩個未知數的聯立方程組:
x+y=2
x-y=0
的答案 。

%利用公式法來求解兩個未知數的聯立方程組
%x+y=2
%x-y=0
%的答案
%----------------------------------------------------------------------------

% Input
a=1;
b=1;
c=2;
d=1;
e=-1;
f=0;
% Process
x=(c*e-b*f)/(a*e-b*d);
y=(a*f-d*c)/(a*e-b*d) ;
% Output
x
y
%----------------------------------------------------------------------------

作業
利用高斯消去法求三個未知數的聯立方程組的解法
並設計設計Matab程式。
已交作業名單
9630614
9627636
9730619
9730601
9730626
9730608
9727622
9730620
期中報告
歐龍謙
王朝棨
高富斌


參考網站
http://www.dyu.edu.tw/~lhuang/class/numerical/
roundoff error
http://www.google.com.tw/search?complete=1&hl=zh-TW&q=roundoff+error+%E4%BD%8D%E6%95%B8%E5%B0%87%E8%A2%AB%E6%8D%A8%E6%A3%84&meta=&aq=f&oq=
truncation error
http://www.google.com.tw/search?hl=zh-TW&q=truncation+error&meta=&aq=1&oq=truncation+
-------------------------------------------------------------------------------------
y=f(x)
y是x的函數
例 y=sin(x)
Matlab程式設計
-------------------------------------------------------------------------------------
angles=[0:0.01*pi:2*pi]
y=sin(angles)
plot(angles,y)
-------------------------------------------------------------------------------------

66 則留言:

許志宇(Chih-Yu Hsu) 提到...

請將您的演算法及程式回應
請註明學號及第幾次作業

Charlie 提到...

第四週作業一
高斯消去法求三個未知數的聯立方程組
CYUT-9630614-Charlie-HW1-Gauss
第四週作業二
已知級數S,求m,n
CYUT-9630614-Charlie-HW2-Series

許志宇(Chih-Yu Hsu) 提到...

http://www.gnu.org/software/octave/download.html


Latest Release

There are several different versions of Octave available for download:

stable
This version is well tested and is the recommended version for most users of Octave.
development
The most recent snapshot of the development sources (if one is available). Use this if you want the latest features and it doesn't bother you that you might run into a few problems. These snapshots are not regular Octave releases. They are only provided for testing purposes, for people who would rather not bother with getting sources from the Mercurial archive. If you do find problems in the development snapshots, please report them to the maintainers@octave.org mailing list (but first read the bug reporting guidelines). If you are interested in the absolutely-latest-up-to-the-minute changes, you may use the sources from the public Mercurial archive instead (see below for details).

Octave version label Version number Release Date

許志宇(Chih-Yu Hsu) 提到...

% sensor nodes generation
clear;
close all;
n = 100;
No_node=250;
xdata= ceil(n.*rand(No_node,1));
ydata= ceil(n.*rand(No_node,1));
cord_data(:,1)=xdata;
cord_data(:,2)=ydata;
plot(cord_data(:,1),cord_data(:,2),'o')

Spencer 提到...
作者已經移除這則留言。
Spencer 提到...
作者已經移除這則留言。
匿名 提到...
作者已經移除這則留言。
Spencer 提到...

作業一:http://docs.google.com/Doc?id=dcxcmfgf_0f75tf7fs

作業二:
http://docs.google.com/Doc?id=dcxcmfgf_1cscwzvcp

阿哲 提到...

班級:資通所 學號:9730626

作業2 :
6+8+10+...+50 ,若ai=2+2(i-1)
則級數中 m = ? ; n = ?
ans:
set ai=2+2(i-1)=6
i=m=3
m = 3
n = 25

Spencer 提到...

利用matlab 隨機產生1~26數字

學號:9730602

9730602利用matlab 隨機產生1~26數字

邱條 提到...
作者已經移除這則留言。
邱條 提到...

CYUT_9730624_tiaoerh_隨機產生1至26個隨機變數

邱條 提到...

CYUT_9730624_tiaoerh_三個未知數之聯絡方程式_加減消去法

Unknown 提到...
作者已經移除這則留言。
邱條 提到...

CYUT_9730624_tiaoerh_級數從6+8+10+…+50,求m、n=?

Unknown 提到...

9630619 作業一與作業二
CYUT-9630619-HW1&HW2

阿哲 提到...

作業3.
隨機產生1~26數字
http://docs.google.com/Doc?id=df5qt95f_0fwkgf8dq

匿名 提到...

作業一
三個未知數的Matlab程式和演算法
作業一
作業二
作業二
作業三
隨機產生1至26個數字
作業三

高培 提到...

數值分析作業

資通朔一A 9730625

http://docs.google.com/Doc?id=dfppzf8n_0sbj522hb

嗶嗶伊恩希 提到...
作者已經移除這則留言。
大忙人的生活日記 提到...
作者已經移除這則留言。
嗶嗶伊恩希 提到...

第四週作業
網通二A 陳靖筠
http://docs.google.com/Doc?id=dfb9v6w9_0dpw6n4fh

大忙人的生活日記 提到...

學號:9730612



作業1





作業2





作業3

Unknown 提到...

9630611陳建霖
作業1
http://docs.google.com/Doc?id=ddkth6pv_0fkskjqzc&hl=en

Unknown 提到...

9630611陳建霖
作業2
http://docs.google.com/Doc?id=ddkth6pv_1cbm7mrdm&hl=en

Unknown 提到...

作業一的matlab
http://docs.google.com/Doc?id=ddkth6pv_5g62mk9g2

Unknown 提到...
作者已經移除這則留言。
weichech 提到...

數值分析第一次作業 9727622 林尉傑
http://docs.google.com/Doc?id=dchrjjr_1f32wcqhd

Unknown 提到...

http://docs.google.com/Doc?id=dgndkpjn_1dkkv2pgb&hl=en

9730619

weichech 提到...

數值分析第二次作業 林尉傑 9727622
http://docs.google.com/Edit?id=dchrjjr_2f3jn6gcz

Unknown 提到...

9730617
方程式求解&等差級數求m,n
http://docs.google.com/Doc?id=dphcq57_5fgbhxhg3

9627636 提到...

班級:資工碩二A 9627636 黃郁誠
第二次作業
http://docs.google.com/Doc?id=dchrjjr_1f32wcqhd

9627636 提到...

班級:資工碩二A 9627636 黃郁誠
第二次作業第二題http://docs.google.com/Doc?id=dchrjjr_2f3jn6gcz&hl=en

賴慶家 提到...

數值分析第二次作業:

http://docs.google.com/Doc?id=dfx8h4tm_4c9x43fdd

內有兩題

Unknown 提到...

http://docs.google.com/Doc?id=dcbjwqt3_0cq2k6mf3
9730621

匿名 提到...

資通所一A 陳彥儒 9730608
10/20課後作業:設計Matlab程式求x,y,z,w,t

作業

但是執行結果都為0
之後參考其他程式後修改結果

修改後的程式

阿哲 提到...

班級:資通所1A 學號:9730626
作業:設計Matlab程式求解x.y.z.w.t

作業

Spencer 提到...
作者已經移除這則留言。
Spencer 提到...

資通一A,連思斌 9730602
使用matlab 求x、y、z、w、t;五個未知數

http://docs.google.com/Doc?id=dcxcmfgf_3cxwj8ngg

weichech 提到...
作者已經移除這則留言。
weichech 提到...

資工碩一A 9727622 林尉傑
http://docs.google.com/Doc?docid=dchrjjr_3gtjrd3k9&hl=zh_TW

9627636 提到...

資工碩二A 9627636 黃郁誠

http://docs.google.com/Doc?docid=dddd8srg_0c5p8bngr&hl=zh_TW

邱條 提到...

學號:9730624
作業:解五個未知數之聯立方程式
http://docs.google.com/Doc?id=d7k394w_3czxmxhg4

Unknown 提到...

http://docs.google.com/Doc?id=dphcq57_9f29g4nd2

D9482578

Unknown 提到...

9630611陳建霖
http://docs.google.com/Doc?id=ddkth6pv_6f6x477dw

Unknown 提到...

http://docs.google.com/Doc?id=dc43fbgn_0d5dq3qdp

賴慶家 提到...

第五週作業
求五個未知數:

http://docs.google.com/Doc?id=dfx8h4tm_8c6m3snfh

Charlie 提到...

第七週作業
設計Matlab解聯立方程組
CYUT-9630614-HW-20081020

Charlie 提到...

第八週作業一
求truncation error |Sn-S|, n=100,1000,10000
CYUT-9630614-20081027-HW1

第八週作業二
比較Sn和sin(1)
CYUT-9630614-20081027-HW2

第八週作業三
使用Matlab畫圖y=x^2+2*x+1並比較改變公差後,圖之差異
CYUT-9630614-20081027-HW3
本題因x使用矩陣來表示,因此在程式中應修改y=x^2+2*x+1為y=x.^2+2.*x+1
公差越小圖越平滑,反之越尖銳
另我使用subplotb讓輸出的圖片中同時顯示四張小圖片

第八週作業四
Taylor's series解|Sn(x)-sin(x)|, n=100,1000,10000
CYUT-9630614-20081027-HW4
其中表為改變n與x後之差異

賴慶家 提到...

第八週作業:

作業一,|Sn-S|,n=100,1000,10000,
http://docs.google.com/Doc?id=dfx8h4tm_9cb7mkzgh

作業二,比較Sn與sin(1)
http://docs.google.com/Doc?id=dfx8h4tm_10hcb7t2g7

作業三,改變公差,比較不同地方
http://docs.google.com/Doc?id=dfx8h4tm_11ftvw2rc8

朝陽資通系碩士班 提到...
作者已經移除這則留言。
Spencer 提到...

補交利用高斯求解
連思斌,9730602

http://docs.google.com/Doc?id=dcxcmfgf_4dpx4jxc6

大忙人的生活日記 提到...

9730612

week 8

1.http://docs.google.com/Doc?id=d6grdzf_20cq28zmc2
2.http://docs.google.com/Doc?id=d6grdzf_19g59ht5fm
3. http://docs.google.com/Doc?id=d6grdzf_21g4h26tpm

Spencer 提到...

連思斌 9730602

第六周作業

http://docs.google.com/Doc?id=dcxcmfgf_5chwdsthh

泰勒級數 |Sn(x)-sin(x)|, n=100,1000,10000 and x=1,pi/2

http://docs.google.com/Doc?id=dcxcmfgf_6hbpgj3kq

Find the truncation error |Sn-S|, n=100,1000,10000 最小誤差

朝陽資通系碩士班 提到...
作者已經移除這則留言。
朝陽資通系碩士班 提到...

20081027作業繳交~資通碩日二A(9630624)
**修正錯誤~更正版**
Home 1:
y=f(x)=x^2+2x+1=(x+1)^2多項式函數圖形
比較不同公差,圖有何不同
matlab 程式
x=[-10:1:9]
y= x^2+2*x+1;
plot(x,y);

Ans:
clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
x=[-10:1:8];
y=x.^2+2.*x+1;
subplot(2,2,1);%將圖形分成兩列兩行其中第一列第一行之圖形
fill(x,y,'r')%將y變數產生的圖形塗上紅色
title('公差=1時')%顯示標題文字

z=[-10:3:8];
y=z.^2+2.*z+1;
subplot(2,2,2);%將圖形分成兩列兩行其中第一列第二行之圖形
fill(z,y,'g')%將y變數產生的圖形塗上綠色
title('公差=2時')%顯示標題文字

w=[-10:6:8];
y=w.^2+2.*w+1;
subplot(2,2,3);%將圖形分成兩列兩行其中第二列第一行之圖形
fill(w,y,'m')%將y變數產生的圖形塗上紫色
title('公差=3時')%顯示標題文字

u=[-10:9:8];
y=u.^2+2.*u+1;
subplot(2,2,4);%將圖形分成兩列兩行其中第二列第二行之圖形
fill(u,y,'b')%將y變數產生的圖形塗上藍色
title('公差=4時')%顯示標題文字

Home 2:
求truncation error
|Sn-S|=|1-(1/2^n)/(1/2)- S|,
n=100,1000,10000
abs(Sn-S)
Ans:
sn.m
-----------------------------------
function s=sn(n,x)
s=0;
for i=1:1:n
s=s+(1-(1/2^n)/(1/2));
end
-----------------------------------
%matlab 主程式
clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=100;
x1=abs(sn-s)

clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=1000;
x1=abs(sn-s)

clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=10000;
x1=abs(sn-s)

Home 3:
比較Sn和sin(1)
Ans:
sn.m
-----------------------------------
function s=sn(n,x)
s=0;
for i=1:1:n
s=s+(-1)^(i-1)*x^(2*i-1)/factorial(2*i-1);
end
-----------------------------------

%matlab 主程式
clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=2;
x1=abs(sn(n,x)-sin(1))


Home 4:
1. x=1,計算|Sn(n)-sin(x)|
n=100,1000,10000
2. x=π/2,計算|Sn(n)-sin(x)|
n=100,1000,10000

Ans:

sn.m
-----------------------------------
function s=sn(n,x)
s=0;
for i=1:1:n
s=s+(-1)^(i-1)*x^(2*i-1)/factorial(2*i-1);
end
-----------------------------------

%matlab 主程式
clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=100;
x=pi/2;
x1=abs(sn(n,x)-sin(1))
sum=abs(sn(n,x)-sin(x))

clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=1000;
x=pi/2;
x1=abs(sn(n,x)-sin(1))
sum=abs(sn(n,x)-sin(x))

clc;%將command windows 之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
n=10000;
x=pi/2;
x1=abs(sn(n,x)-sin(1))
sum=abs(sn(n,x)-sin(x))

Unknown 提到...
作者已經移除這則留言。
Unknown 提到...

9630619 第五週作業


CYUT-9630619-HW

Unknown 提到...

9630619 第六週作業

CYUT-9630619-HW4

高培 提到...

證明一元二次方程式公式解
http://docs.google.com/Doc?id=dfppzf8n_1mhxtv9cp

學生: 9730625 高培

9627636 提到...

第六週作業
9627636黃郁誠
http://docs.google.com/Doc?id=dddd8srg_1gtdv6pcq&hl=zh_TW

賴慶家 提到...

指數函數Matlab尋『根』

http://docs.google.com/Doc?id=dfx8h4tm_142gtfkqds

Unknown 提到...

指數函數作業
http://docs.google.com/Doc?docid=ddkth6pv_7cwj6s8gh&hl=en

Unknown 提到...

求指數作業
http://docs.google.com/Doc?id=dc43fbgn_4gqcpjsdg

朝陽資通系碩士班 提到...

HOME:指數函數exp1~exp10
clc;%將command windows之畫面變成空白
clear all; %清除所有變數
close all; %關閉之前所有的圖
x(1)=0;
for I=1:10
I
x(I+1)=exp(-x(I));
end
x

Spencer 提到...

求exp的根
http://docs.google.com/Doc?id=dcxcmfgf_9hj2j95cw