% a quick demo of Horner's method and its effects
clear all
close all
% first a comparison of ways to compute
x = 0.988:.0001:1.012;
y1 = x.^7-7*x.^6+21*x.^5-35*x.^4+35*x.^3-21*x.^2+7*x-1;
plot(...
1x3−2x−5dx,
(from 0 to 1)
write a function myfun that computes theintegrand:
function y = myfun(x)
y = 1./(x.^3-2*x-5);
Then pass @myfun, a function handle to myfun,to
quad, along with the ...
Matlab workshops
Table of Contents
1. Examples
1.1. find – matlab
1.2. reshape of averaged 2D data
1.3. average vector from multiple files–Matlab
1.4. radial profiles of mean stre...
x=input('输入');
a=mod(x,10);
b=mod(fix(x/10),10);
c=mod(fix(x/100),10);
d=mod(fix(x/1000),10);
a
b
c
d
num=mod(((a-7)+10),10)+mod(((b-7)+10),10)*10+mod(((c-7)+10),10)*100+mod(((d...
function[l]= Gray(I) % I: The name of image A=imread(I);m=0;n=0;[m,n]= size(A);Hproj=zeros(m,1);Vproj=zeros(1,n);for h=1:m Hproj(h) = sum(A(h,:)); end;%hf=figure('NumberTitle','off','name','水平...