A B Repeat
This function computes the integral "I" via Simpson's rule in the interval [a,b] with n+1 equally spaced pointsSyntax: I = simpsons(f,a,b,n)Where, f= can either be an anonymous function (e.g. f=@(x) sin(x)) or a vector containing equally spaced values of the function to be integrated a= Initial...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): Simpson's Rule Integration Download |
SUBSPACE(A,B) finds the largest angle between two subspaces specified by the columns of A and B. If A and B are vectors of unit length, this is the same as COS(ABS(A'*B)) in exact arithmetic. This is a replacement for MATLAB's SUBSPACE.m Rev. 5.5-5.8 that fails to provide correct answers for...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (42): subspace.m Download |
Syntax::::power2(a,b)where,a=baseb=exponentMatlab function power's result if more than 9 digits,give theresult as in exp.(e) terms.This power2 gives the resultto as much digits as is the exact answer.This program calculates the power of any number with any exponentto show the answer with all digits.
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (39): POWER2:Calculates the power of any no. with any exponent to give exact answer with all digits Download |
For fixed integers a and b such that D = a^2 + 4*b is nonnegative, the sequence V_n = GeneralizedLucas(n,a,b) satisfies the recurrenceV_n = V_{n-1} + V_{n-2} and the initial conditions V_0 = 2 and V_1 = a. When a=b=1, this is the Lucas sequence.
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (42): GeneralizedLucas.m Download |
plotcdfkuiper(x,a,b,cdf,varargin)Plot the cumulative probability distribution for a set of variates x between limits a,b and compare with the theoretical cumulative distribution function using the Kuiper test.cdf = handle for cumulative distribution functionvarargin contains parameters for...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): plotcdfkuiper Download |
% Add 2 big INTERGER a b, e.g with 100 digits% algorithms will add each group of nbit digits% of a and b. nbit(default)=6% S = add(a,b), return S = a+b%-----------------------% Example% na = 3+ round(10*rand);% nb =5+ round(10*rand);% a = round(10^na*rand)% b = round(10^nb*rand)% s =...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (45): Adding 2 big interger, e.g 100 digits Download |
How to use tritrig:tritrig is in the form 'tritrig(a,b,c,A,B,C)' where a b c A B C are theangles and the lengths of a triangle. If your triangle has a right anglein it, it must be 'C' and the hypotenuse must be 'c'. The angles andlengths that you do not know must be typed as...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): tritrig Download |
PFQ Generalized Hypergeometric Function pFq [Y,TT,NTERMS] = PFQ(A,B,Z,D) returns the Generalized Hypergeometric Function pFq with numerator parameters A, denominator parameters B, evaluated at the values in Z, with respect to derivatives D. PFQ(A,B,Z) returns the values evaluated at Z Inputs: A...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (39): Generalized Hypergeometric Function (vectorized) Download |
S=MINKSUM(A,B) produces the Minkowski sum of two sets A and B in Euclidean space, the result being the addition of every element of A to every element of B. [S,D]=MINKSUM(A,B) returns the Minkowski sum S, and also the multiplicity of each element in S. The number of columns represent the...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): Minkowski Sum Download |
B = CELL2STR(C) returns a B such that C = EVAL(B).This is the same as NUM2STR, except it works on cell arrays that contain strings and numeric arrays. C must be a 2D cell array. B will be a string that can be evaluated. to return a cell array identical (up to numerical accuracy) to C.Optional...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (40): cell2str Download |
[a,b,c] = InverseKinematicsAM(x,y,z)This function finds the joint configurations for the waist, shoulder and elbow of the RA-01 robotic arm made by Images SI, Inc. It takes in three inputs which are the specifications of the x, y and z positions of the centre of the gripper of the robotic arm....
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (41): Inverse Kinematics for RA-01 Robotic Arm by Olawale Akinwale Download |
FINDARRAY Find one array within another I = FINDARRAY(A,B,'first') for the array B returns an index array of the same size as B containing the smallest absolute index in A for each element of B which is a member of A and 0 if there is no such index. FINDARRAY(A,B) is the same as...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (42): FINDARRAY Download |
function plot_ellipse(a,b,cx,cy,angle,color)%a: width in pixels%b: height in pixels%cx: horizontal center%cy: vertical center%angle: orientation ellipse in degrees%color: color code (e.g., 'r' or [0.4 0.5 0.1])
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (39): Simple ellipse plotting function Download |
The function computes parameters a, b, and c of the weighted orthogonal least squares fit of line ax+by+c=0 to a set of 2D points with coordinates given by x and y and weights w.n=100;x=1:n;y=2.5*x + (5+300./x).*randn(1,n);plot(x,y,'.k')hold onw=1:n;[a b c] = wols(x,y,w);plot([0,n],[-c/b,-c/b -...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 20.48 KB | Download (43): Weighted Orthogonal Least Squares Download |
% C = CIRCONV(A,B,N) performs the N-point circular convolution% of vectors A and B. C is returned as a row vector. A and B% must be vectors, but may be of different lengths. N must be% a positive, non-zero integer. The results of CIRCONV will% match that of CONV if N>=( length(A) + length(B) -...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 20.48 KB | Download (43): N-point circular convolution Download |
[a, b] = FOURIERexp2cossin(c)Calculate the cos (a) & sin (b) coefficients of the exponentialFourier coefficients (c) returned by fft(x)/size(x,1),while isreal(x) = trueneeds the unshifted coefficients as inputc = FOURIERcossin2exp(a, b)Calculate the exponential Fourier coefficients (c) of thecos...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (46): Fourier Coefficient Conversion Download |
Determine the reaction order of a chemical reaction of the form: rate = Ao*[A]^a*[B]^b*exp(-Ea/R*T)kinetic order determination by wide area search and model-data error minimizationkinfit attempts to determine the optimal order of reaction (a and b) of the form rate = Ao * [A]^a * [B]^b *...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (46): Kinetic Order Determination Download |
OBJECTIVE: Identify BCD inputs A,B,C,D (which correspond to numbers 1,2,4,8 randomly).about: BCD input consists of A, B, C and D which are accidentally jumbled during the design phase. States of A, B, C and D can be used by clicking on them and the corresponding 7-Segment display is shown....
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 20.48 KB | Download (46): BCD to 7-Segment Decoder Download |
When publishing a paper, you need to label your subplots with "a)", "b)", etc in the upper left corner. This routine does it for you with no fuss or muss.
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): sublabel Download |
plot_lines(xin) - Plots vertical lines at points defined on the x-axis using red solid lines and the current y-axis limits using a single line handleplot_lines(xin,[a b]) - Plots the lines from a to bplot_lines(xin,[],lntype) - Plots the lines using the current y-axis limits using the line type...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (40): PLOT_LINES Download |