摘要:
复合梯形法则:```function int_f = CompoundEchelon( f, a, b, m )% input : f : function handler% a : the lower limit of integral% b : the... 阅读全文
posted @ 2015-07-09 23:57
Wsine
阅读(2772)
评论(0)
推荐(0)
摘要:
高斯牛顿法:```function [ x_ans ] = GaussNewton( xi, yi, ri)% input : x = the x vector of 3 points% y = the y vector of 3 points% r = the ra... 阅读全文
posted @ 2015-07-09 23:51
Wsine
阅读(3409)
评论(0)
推荐(0)
摘要:
插值法实现sin函数:```%calculate and print the sine function%input: x%output: sin(x) similarfunction y = sin2(x)%save a copy of xx_temp = x;%calculate the int... 阅读全文
posted @ 2015-07-09 23:44
Wsine
阅读(1820)
评论(0)
推荐(0)
摘要:
共轭梯度法:```function [ x, r, k ] = CorGrant( x0, A, b ) x = x0; r = b - A * x0; d = r; X = ones(length(x), 1); k = 0; while 1 if... 阅读全文
posted @ 2015-07-09 23:30
Wsine
阅读(5603)
评论(0)
推荐(0)
摘要:
稀疏矩阵生成:```function [a, b] = aparsesetup(n) e = ones(n, 1); n2 = n / 2; a = spdiags([-e 3*e -e], -1:1, n, n); a(n2+1, n2) = -1; a(n2, n2+... 阅读全文
posted @ 2015-07-09 23:23
Wsine
阅读(1068)
评论(0)
推荐(0)
摘要:
朴素高斯消去法:```function x = GauElim(n, A, b) if nargin < 2 for i = 1 : 1 : n for j = 1 : 1 : n A(i, j) = 1 / (i + j - ... 阅读全文
posted @ 2015-07-09 23:17
Wsine
阅读(3435)
评论(0)
推荐(1)
摘要:
不动点迭代 牛顿法: 割线法: Stewart平台运动学问题求解: test our function at theta = pi / 4 and theta = pi / 4 阅读全文
posted @ 2015-07-09 23:13
Wsine
阅读(5489)
评论(0)
推荐(0)
摘要:
嵌套乘法的计算:$$ P(x) = 1 - x + x^2 - x^3 + ...+ x ^ {98} - x^{99} $$```function y = nest( d, c, x, b ) if nargin = 0 error('f(a)f(b) tol c =... 阅读全文
posted @ 2015-07-09 23:04
Wsine
阅读(1184)
评论(0)
推荐(0)
浙公网安备 33010602011771号