d MATLAB Demo window MATLAB Demo de emo I-MATLAB I MATLAB is an integrated technical computing Desktop Environment environment that combines numeric computation Matrices advanced graphics and visualization, and a Numerics I high-level programming language Graphi Language MATLAB includes hundreds of functions for Gallery Data analysis and visualization More examples Numeric and symbolic computation +Toolboxes Engineering and scientific graphics +Blocksets +Real-Time work shop Choose a subtopic to see a list of demos +stateflow Close Flur
demo
Vectors and nd Plotting Setting Up Vectors
Vectors and Plotting Setting Up Vectors
Setting Up Vectors Ⅹ=[10.120.230.3 X=[10.1;20.2;30.3] =[10.1;20.2;30.3]; ⅹ=[10.120.230.3
Setting Up Vectors • X=[10.1 20.2 30.3] • X=[10.1; 20.2; 30.3] • X=[10.1; 20.2; 30.3]; • X=[10.1 20.2 30.3]
°X=[0.05.10.1520253035404550 55.60.65.70.75808590.951.0 I Dimension 21 mismatch" error 21 h=1/(n) 2. Efficient( memory h=1/(n-1) zeros(l, n) for k=l:n for k=: n x(k)=(k-1)*h; x(k)=(k-1)*h; d eno end
• X=[0 .05 .10 .15 .20 .25 .30 .35 .40 .45 .50 … .55 .60 .65 .70 .75 .80 .85 .90 .95 1.0] n=21; h=1/(n-1); for k=1:n x(k)=(k-1)*h; end n=21; h=1/(n-1); x=zeros(1,n); for k=1:n x(k)=(k-1)*h; end 1 "Dimension mismatch" error 2. Efficient(memory)
In matlab variables are not declared by the user but are created on a need-to-use basis by a memory manager. Moreover, from Matlab's point of view, every variable is a complex matrix indexed from unity
In Matlab, variables are not declared by the user but are created on a need-to-use basis by a memory manager. Moreover, from Matlab's point of view, every variable is a complex matrix indexed from unity