silikoncodes.blogg.se

Matlab polytool
Matlab polytool








Time’)> xlabel (‘Time’)> ylabel (‘Position’)16.62x MATLAB TutorialsMultiple Plots Multiple datasets on a plot> p1 = plot(xcurve, ycurve)> hold on> p2 = plot(Xpoints, Ypoints, ‘ro’)> hold off Subplots on a figure> s1 = subplot(1, 2, 1)> p1 = plot(time, velocity)> s2 = subplot(1, 2, 2)> p2 = plot(time, acceleration)MATLAB Data AnalysisPreparing DataBasic FittingCorrelation16.62x MATLAB TutorialsData Input / Output Import Wizard for data importFile->Import Data … File input with loadB = load(‘datain.txt’) File output with savesave(‘dataout’, ‘A’, ‘-ascii’)16.62x MATLAB TutorialsMissing Data Removing missing data Removing NaN elements from vectors> x = x(~isnan(x)) Removing rows with NaN from matrices > X(any(isnan(X),2),:) =  Interpolating missing dataYI = interp1(X, Y, XI, ‘method’)Methods: ‘spline’, ‘nearest’, ‘linear’, …16.62x MATLAB TutorialsData Statistics Figure window: Tools->Data Statistics16.62x MATLAB TutorialsCorrelation Correlation coefficient & confidence interval> = corrcoef(X) > = find(P Basic Fitting …16.62x MATLAB TutorialsPolynomials Evaluating polynomials> p = > t = > z = polyval(p, t) Fitting a polynomial> X = Y = > Pm = polyfit(X, Y, m)y = p1xn+ p2xn!1. , +, x, d Line styles: -, -, -., : Annotating graphs> legend (‘z = f(t)’)> title (‘Position vs. ^> Z = B = B =z12z221 116.62x MATLAB TutorialsBuilt-In Functions Matrices & vectors> = size(A)> n = length(X)> M1 = ones(n, m)> M0 = zeros(n, m)> En = eye(n)> N1 = diag(En) And many others …> y = exp(sin(x)+cos(t))16.62x MATLAB TutorialsGraphics 2D linear plots: plot> plot (t, z, ‘r-’) Colors: b, r, g, y, m, c, k, w Markers: o, *. lookfor regression Help Browser Help->Help MATLAB16.62x MATLAB TutorialsMATLAB Help Browser MATLAB+ Mathematics+ Data Analysis+ Programming+ Graphics Curve Fitting Toolbox Statistics Toolbox+ Linear Models+ Hypothesis Tests+ Statistical Plots16.62x MATLAB TutorialsVectors Row vector> R1 = > R2 = > R3 =  Column vector> C1 = > C2 = R2'16.62x MATLAB TutorialsMatrices Creating a matrix> A = > A =  Accessing elements> A(1,1)> A(1:2, 2:4)> A(:,2)16.62x MATLAB TutorialsMatrix Operations Operators + and -> X = Y = A = X+Y A = x1+y1 x2+y2 Operators *, /, and ^> Ainv = A^-1 Matrix math is default! Operators.

matlab polytool

MATLAB TutorialsVioleta Ivanova, Ph.D.Educational Technology ConsultantMIT Academic Experimental Projects16.62x MATLAB TutorialsThis Tutorial Class /acmath/matlab/16.62x Topics MATLAB Basics Review Data Analysis Statistics Toolbox Curve Fitting Toolbox16.62x MATLAB TutorialsOther References Mathematical Tools at /ist/topics/math Course16 Tutorials Unified MATLAB:/acmath/matlab/unified 16.06 &16.07 MATLAB & Simulink:/acmath/matlab/course16MATLAB Basics ReviewToolboxes & HelpMatrices & VectorsBuilt-In FunctionsGraphics16.62x MATLAB TutorialsHelp in MATLAB Command line help> help e.g.










Matlab polytool