计算方法课以kepler运动的演示结束。课程结束在高潮。 今年提前一周结课,有些话没来得及讲。 计算方法给人的印象是就是要获得数字。其实不然。牛人Hamming曾说,the purprose of computation is not numbers, but insight. 我们很多时候关心的不是数字本身,而是背后的规律。计算很多时候是理论家的实验。有门专门的数 ...
monte carlo是摩纳哥的一个赌城 =================== clear all; close all; clc; N = 1e9; in = 0; for s = 1 : N x = rand; y = rand; if x^2 + y^2 1 in = in +1 ; end end estimate = 4* in/ ...
clear all; close all; clc; a = 0.5; N = 100; xlist = zeros(1, N); xlist(1) = 0.3; for s = 2 : N xlist(s) = a * xlist(s-1) * (1 - xlist(s-1)); end h1 = figure; plot(xlist,'-*') title( ) a = 1.5; N = 100; xlist = zeros(1, N); xlist(1) = 0.3; for s = ...
牛人hamming曾讲,the purpose of computing is insight, not numbers(计算的目的是洞见,而不是数字)。 有了计算机,学会了编程,我们能做的不仅仅是获得数字。计算机是理论家的实验室,我们可以在计算机上编程检验理论猜想,或者积累数据总结规律。 举一个例子。 在线性代数中,有这样一个习题。假设A为n1*n2的任意 ...