Sie sind auf Seite 1von 14

x= ??? x= | {_Error: Expression or statement is incomplete or incorrect. }_ x=[0:.0001;10]; si=sin(x); plot(x,si);grid s=sin(x); plot(x,s);grid clc clear all x=[0:.

0001:100]; s=sin(x); plot(x,s);grid clear all clc x=[0:.0001:10]; s=sin(x); plot(x,s);grid c=cos(x); plot(x,c);grid t=tan(x); plot(x,t);grid z=exp(x)+tanh(x); plot(x,z);grid i=asin(x+2); plot(x,i);grid {_Warning: Imaginary parts of complex X and/or Y arguments ignored}_ y=atanh(x+8); plot(x,y);grid {_Warning: Imaginary parts of complex X and/or Y arguments ignored}_ y=exp(x)*sin(x); {_??? Error using ==> mtimes Inner matrix dimensions must agree. }_ y=exp(x)* sin(x); {_??? Error using ==> mtimes Inner matrix dimensions must agree. }_ y=exp(x).*sin(x); plot(x,y);grid y=sin(x).*cos(x); plot(x,y);grid y=tan(x)+2exp(x); ??? y=tan(x)+2exp(x); | {_Error: Unexpected MATLAB operator. }_ y=tan(x)+ 2exp(x); ??? y=tan(x)+ 2exp(x); | {_Error: Unexpected MATLAB operator. }_ y=tan(x).+2exp(x); ??? y=tan(x).+2exp(x); |

{_Error: Unexpected MATLAB operator. }_ y=tan(x)+2*exp(x); plot(x,y);grid y=exp(x); plot(x,y);grid stem(x,y);grid {_??? Error using ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\graphics\print.m',325,0)">print at 325</a> Invalid handle object. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\uitools\editmenufcn.m',76,0)">editmenufcn at 76</a> uimenufcn(hfig, 'EditCopyFigure') }_ stem(x,y);grid stem(x,y);grid ;xlabel('sd') y=sin(x); stem(x,y);grid ; {_??? Error using ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\graphics\print.m',325,0)">print at 325</a> Invalid handle object. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\uitools\editmenufcn.m',76,0)">editmenufcn at 76</a> uimenufcn(hfig, 'EditCopyFigure') }_ y=cos(x); stem(x,y);grid ; {_??? Error using ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\graphics\print.m',325,0)">print at 325</a> Need a handle to a Figure object. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\uitools\editmenufcn.m',76,0)">editmenufcn at 76</a> uimenufcn(hfig, 'EditCopyFigure') }_ y=tan(x); stem(x,y);grid ; {_??? Error using ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\graphics\print.m',325,0)">print at 325</a> Invalid handle object. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\uitools\editmenufcn.m',76,0)">editmenufcn at 76</a> uimenufcn(hfig, 'EditCopyFigure') }_ y=aexp(x); {_??? Undefined function or method 'aexp' for input arguments of type 'double'. }_ y=ae(x);

{_??? Undefined function or method 'ae' for input arguments of type 'double'. }_ y=exp(-x); stem(x,y);grid ; {_??? Error using ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\graphics\print.m',325,0)">print at 325</a> Invalid handle object. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\uitools\editmenufcn.m',76,0)">editmenufcn at 76</a> uimenufcn(hfig, 'EditCopyFigure') }_ subplot(2,2,1) plot(x,sin(x)) subplot(2,2,1); subplot(2,2,2); plot(x,sin(x)) subplot(2,2,1); plot(x,sin(x)) plot(x,sin(x));grid plot(x,sin(x));hold on plot(x,cos(x)); plot(x,tan(x));hold off subplot(2,2,1);hold on plot(x,cos(x)); plot(x,cos(x));hold on plot(x,cos(x)); subplot(2,2,3); plot(x,cos(x));clc y=sin((x); ??? y=sin((x); | {_Error: Unbalanced or unexpected parenthesis or bracket. }_ y=sin(x); z=cos(x); a=tan(x); subplot(2,2,1); plot(x,y);grid subplot(2,2,1); plot(x,y);grid subplot(2,2,2); plot(x,z);grid;hold on subplot(2,2,3); plot(x,a);grid subplot(2,2,4); plot(x,y);grid t=exp(-x); subplot(2,2,1); plot(x,t);grid;hold off plot(x,sin(x),'k',x,cos(x),'w',x,tan(x),'r',-x,exp(x),'g');legend('sin','cos','tan','exp') plot(x,sin(x),'k',x,cos(x),'w',x,tan(x),'r',-x,exp(x),'g');legend('sin','cos','tan','exp')

plot(x,sin(x),'k',x,cos(x),'m',x,tan(x),'r',-x,exp(x),'g');legend('sin','cos','tan','exp') plot(x,sin(x),'k',x,cos(x),'m',x,tan(x),'r',x,exp(x),'g');legend('sin','cos','tan','exp') plot(x,sin(x),'k',x,cos(x),'m',x,tan(x),'r',x,exp(x),'g');legend('sin','cos','tan','exp') plot(x,sin(x),'k',x,cos(x),'m',x,tan(x),'r',x,exp(-x),'g') t=[0:100]; y=cos(t); plot(t,y);grid;legend('t','y') {_Warning: Ignoring extra legend entries.}_ > In <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\scribe\legend.m',294,1)">legend at 294</a> t=[0:.1:100]; y=cos(t); plot(t,y);grid;legend('t','y') {_Warning: Ignoring extra legend entries.}_ > In <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\scribe\legend.m',294,1)">legend at 294</a> t=[0:.0001:100]; y=cos(t); plot(t,y);grid;legend('t','y') {_Warning: Ignoring extra legend entries.}_ > In <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\scribe\legend.m',294,1)">legend at 294</a> x=[0:.001:10]; y=sin(2*x+3); plot(t,y);grid;axis ( [xmin xmax ymin ymax] ) {_??? Error using ==> plot Vectors must be the same lengths. }_ {_??? Error using ==> plot Vectors must be the same lengths. }_ plot(x,y);grid;axis ( [0 5 -1 1] ) y=exp(-3/2*x)*sin(5*x+3) {_??? Error using ==> mtimes Inner matrix dimensions must agree. }_ y=exp(-3/2*x).*sin(5*x+3); plot(x,y);grid;axis ( [0 5 -1 1] ) linspace {_??? Input argument "n" is undefined. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\elmat\linspace.m',21,0)">linspace at 21</a> n = double(n); }_ linespace {_??? Undefined function or variable 'linespace'. }_ help\

??? help\ | {_Error: Expression or statement is incomplete or incorrect. }_ help linspace LINSPACE Linearly spaced vector. LINSPACE(X1, X2) generates a row vector of 100 linearly equally spaced points between X1 and X2. LINSPACE(X1, X2, N) generates N points between X1 and X2. For N < 2, LINSPACE returns X2. Class support for inputs X1,X2: float: double, single See also <a href="matlab:help logspace">logspace</a>, :. Overloaded methods: <a href="matlab:help cgvalue/linspace">cgvalue/linspace</a> Reference page in Help browser <a href="matlab:doc linspace">doc linspace</a> linespace(2,5,2) {_??? Undefined function or method 'linespace' for input arguments of type 'double'. }_ linespace(2,5,100) {_??? Undefined function or method 'linespace' for input arguments of type 'double'. }_ linespace(x,y,1) {_??? Undefined function or method 'linespace' for input arguments of type 'double'. }_ linespace(x,y,3) {_??? Undefined function or method 'linespace' for input arguments of type 'double'. }_ linspace(x,y,3) {_??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2009a\toolbox\matlab\elmat\linspace.m',22,0)">linspace at 22</a> y = [d1+(0:n-2)*(d2-d1)/(floor(n)-1) d2];}_ linspace(2,5,3) ans = 2.0000 3.5000 5.0000

linspace(2,100,3)

ans = 2 51 100

linspace(2,100,9) ans = Columns 1 through 8 2.0000 87.7500 Column 9 100.0000 linspace(2,100,2) ans = 2 100 14.2500 26.5000 38.7500 51.0000 63.2500 75.5000

linspace(2,100,1) ans = 100 linspace(2,100,5) ans = 2.0000 26.5000 51.0000 75.5000 100.0000

help fplot FPLOT Plot function FPLOT(FUN,LIMS) plots the function FUN between the x-axis limits specified by LIMS = [XMIN XMAX]. Using LIMS = [XMIN XMAX YMIN YMAX] also controls the y-axis limits. FUN(x) must return a row vector for each element of vector x. For example, if FUN returns [f1(x),f2(x),f3(x)] then for input [x1;x2] FUN should return [f1(x1) f2(x1) f3(x1); f1(x2) f2(x2) f3(x2)] FPLOT(FUN,LIMS,TOL) with TOL < 1 specifies the relative error tolerance. The default TOL is 2e-3, i.e. 0.2 percent accuracy. FPLOT(FUN,LIMS,N) with N >= 1 plots the function with a minimum of N+1 points. The default N is 1. The maximum step size is restricted to be (1/N)*(XMAX-XMIN).

FPLOT(FUN,LIMS,'LineSpec') plots with the given line specification. FPLOT(FUN,LIMS,...) accepts combinations of the optional arguments TOL, N, and 'LineSpec', in any order. [X,Y] = FPLOT(FUN,LIMS,...) returns X and Y such that Y = FUN(X). No plot is drawn on the screen. FPLOT(AX,...) plots into AX instead of GCA. Examples: fplot(@humps,[0 1]) fplot(@(x)[tan(x),sin(x),cos(x)], 2*pi*[-1 1 -1 1]) fplot(@(x) sin(1./x), [0.01 0.1], 1e-3) f = @(x,n)abs(exp(-1j*x*(0:n-1))*ones(n,1)); fplot(@(x)f(x,10),[0 2*pi]) See also <a href="matlab:help plot">plot</a>, <a href="matlab:help ezplot">ezplot</a>, <a href="matlab:help function_handle">function_handle</a>. Reference page in Help browser <a href="matlab:doc fplot">doc fplot</a> help mesh MESH 3-D mesh surface. MESH(X,Y,Z,C) plots the colored parametric mesh defined by four matrix arguments. The view point is specified by VIEW. The axis labels are determined by the range of X, Y and Z, or by the current setting of AXIS. The color scaling is determined by the range of C, or by the current setting of CAXIS. The scaled color values are used as indices into the current COLORMAP. MESH(X,Y,Z) uses C = Z, so color is proportional to mesh height. MESH(x,y,Z) and MESH(x,y,Z,C), with two vector arguments replacing the first two matrix arguments, must have length(x) = n and length(y) = m where [m,n] = size(Z). In this case, the vertices of the mesh lines are the triples (x(j), y(i), Z(i,j)). Note that x corresponds to the columns of Z and y corresponds to the rows. MESH(Z) and MESH(Z,C) use x = 1:n and y = 1:m. In this case, the height, Z, is a single-valued function, defined over a geometrically rectangular grid. MESH(...,'PropertyName',PropertyValue,...) sets the value of the specified surface property. Multiple property values can be set with a single statement. MESH(AX,...) plots into AX instead of GCA. MESH returns a handle to a surface plot object.

AXIS, CAXIS, COLORMAP, HOLD, SHADING, HIDDEN and VIEW set figure, axes, and surface properties which affect the display of the mesh. See also <a href="matlab:help surf">surf</a>, <a href="matlab:help meshc">meshc</a>, <a href="matlab:help meshz">meshz</a>, <a href="matlab:help waterfall">waterfall</a>. Reference page in Help browser <a href="matlab:doc mesh">doc mesh</a> help surf SURF 3-D colored surface. SURF(X,Y,Z,C) plots the colored parametric surface defined by four matrix arguments. The view point is specified by VIEW. The axis labels are determined by the range of X, Y and Z, or by the current setting of AXIS. The color scaling is determined by the range of C, or by the current setting of CAXIS. The scaled color values are used as indices into the current COLORMAP. The shading model is set by SHADING. SURF(X,Y,Z) uses C = Z, so color is proportional to surface height. SURF(x,y,Z) and SURF(x,y,Z,C), with two vector arguments replacing the first two matrix arguments, must have length(x) = n and length(y) = m where [m,n] = size(Z). In this case, the vertices of the surface patches are the triples (x(j), y(i), Z(i,j)). Note that x corresponds to the columns of Z and y corresponds to the rows. SURF(Z) and SURF(Z,C) use x = 1:n and y = 1:m. In this case, the height, Z, is a single-valued function, defined over a geometrically rectangular grid. SURF(...,'PropertyName',PropertyValue,...) sets the value of the specified surface property. Multiple property values can be set with a single statement. SURF(AX,...) plots into AX instead of GCA. SURF returns a handle to a surface plot object. AXIS, CAXIS, COLORMAP, HOLD, SHADING and VIEW set figure, axes, and surface properties which affect the display of the surface. See also <a href="matlab:help surfc">surfc</a>, <a href="matlab:help surfl">surfl</a>, <a href="matlab:help mesh">mesh</a>, <a href="matlab:help shading">shading</a>. Overloaded methods: <a href="matlab:help sweepset/surf">sweepset/surf</a> Reference page in Help browser <a href="matlab:doc surf">doc surf</a>

help counter counter not found. Use the Help browser Search tab to <a href="matlab:docsearch counter">search the documentation</a>, or type "<a href="matlab:help help">help help</a>" for help command options, such as help for methods. help conter conter not found. Use the Help browser Search tab to <a href="matlab:docsearch conter">search the documentation</a>, or type "<a href="matlab:help help">help help</a>" for help command options, such as help for methods. help contoer contoer not found. Use the Help browser Search tab to <a href="matlab:docsearch contoer">search the documentation</a>, or type "<a href="matlab:help help">help help</a>" for help command options, such as help for methods. help contour CONTOUR Contour plot. CONTOUR(Z) is a contour plot of matrix Z treating the values in Z as heights above a plane. A contour plot are the level curves of Z for some values V. The values V are chosen automatically. CONTOUR(X,Y,Z) X and Y specify the (x,y) coordinates of the surface as for SURF. The X and Y data will be transposed or sorted to bring it to MESHGRID form depending on the span of the first row and column of X (to orient the data) and the order of the first row of X and the first column of Y (to sorted the data). The X and Y data must be consistently sorted in that if the first element of a column of X is larger than the first element of another column that all elements in the first column are larger than the corresponding elements of the second. Similarly Y must be consistently sorted along rows. CONTOUR(Z,N) and CONTOUR(X,Y,Z,N) draw N contour lines, overriding the automatic value. CONTOUR(Z,V) and CONTOUR(X,Y,Z,V) draw LENGTH(V) contour lines at the values specified in vector V. Use CONTOUR(Z,[v v]) or CONTOUR(X,Y,Z,[v v]) to compute a single contour at the level v. CONTOUR(AX,...) plots into AX instead of GCA. [C,H] = CONTOUR(...) returns contour matrix C as described in CONTOURC and a handle H to a contourgroup object. This handle can be used as input to CLABEL. The contours are normally colored based on the current colormap and are drawn as PATCH objects. You can override this behavior

with the syntax CONTOUR(...,LINESPEC) to draw the contours with the color and linetype specified. See the help for PLOT for more information about LINESPEC values. The above inputs to CONTOUR can be followed by property/value pairs to specify additional properties of the contour object. Uses code by R. Pawlowicz to handle parametric surfaces and inline contour labels. Example: [c,h] = contour(peaks); clabel(c,h), colorbar See also <a href="matlab:help contour3">contour3</a>, <a href="matlab:help contourf">contourf</a>, <a href="matlab:help clabel">clabel</a>, <a href="matlab:help colorbar">colorbar</a>, <a href="matlab:help meshgrid">meshgrid</a>. Overloaded methods: <a href="matlab:help xregmodel/contour">xregmodel/contour</a> <a href="matlab:help xregarx/contour">xregarx/contour</a> <a href="matlab:help sweepset/contour">sweepset/contour</a> Reference page in Help browser <a href="matlab:doc contour">doc contour</a> help surface SURFACE Create surface. SURFACE(X,Y,Z,C) adds the surface in X,Y,Z,C to the current axes. SURFACE(X,Y,Z) uses C = Z, so color is proportional to surface height. See SURF for a complete description of the various forms that X,Y,Z,C can take. SURFACE returns a handle to a SURFACE object. SURFACEs are children of AXES objects. The arguments to SURFACE can be followed by parameter/value pairs to specify additional properties of the surface. The X,Y,Z,C arguments to SURFACE can be omitted entirely, and all properties specified using parameter/value pairs. AXIS, CAXIS, COLORMAP, HOLD, SHADING and VIEW set figure, axes, and surface properties which affect the display of the SURFACE. Execute GET(H), where H is a surface handle, to see a list of surface object properties and their current values. Execute SET(H) to see a list of surface object properties and legal property values. See also <a href="matlab:help surf">surf</a>, <a href="matlab:help line">line</a>, <a href="matlab:help patch">patch</a>, <a href="matlab:help text">text</a>, <a href="matlab:help shading">shading</a>. Overloaded methods:

<a href="matlab:help xregstatsmodel/surface">xregstatsmodel/surface</a> <a href="matlab:help xregmodel/surface">xregmodel/surface</a> <a href="matlab:help xregarx/surface">xregarx/surface</a> Reference page in Help browser <a href="matlab:doc surface">doc surface</a> doc mesh Overloaded functions or methods (ones with the same name in other directories) <a href="matlab:doc fixedpoint/mesh">doc fixedpoint/mesh</a>

clc cla help surf SURF 3-D colored surface. SURF(X,Y,Z,C) plots the colored parametric surface defined by four matrix arguments. The view point is specified by VIEW. The axis labels are determined by the range of X, Y and Z, or by the current setting of AXIS. The color scaling is determined by the range of C, or by the current setting of CAXIS. The scaled color values are used as indices into the current COLORMAP. The shading model is set by SHADING. SURF(X,Y,Z) uses C = Z, so color is proportional to surface height. SURF(x,y,Z) and SURF(x,y,Z,C), with two vector arguments replacing the first two matrix arguments, must have length(x) = n and length(y) = m where [m,n] = size(Z). In this case, the vertices of the surface patches are the triples (x(j), y(i), Z(i,j)). Note that x corresponds to the columns of Z and y corresponds to the rows. SURF(Z) and SURF(Z,C) use x = 1:n and y = 1:m. In this case, the height, Z, is a single-valued function, defined over a geometrically rectangular grid. SURF(...,'PropertyName',PropertyValue,...) sets the value of the specified surface property. Multiple property values can be set with a single statement. SURF(AX,...) plots into AX instead of GCA. SURF returns a handle to a surface plot object. AXIS, CAXIS, COLORMAP, HOLD, SHADING and VIEW set figure, axes, and surface properties which affect the display of the surface. See also <a href="matlab:help surfc">surfc</a>, <a href="matlab:help surfl">surfl</a>, <a href="matlab:help mesh">mesh</a>, <a href="matlab:help shading">shading</a>.

Overloaded methods: <a href="matlab:help sweepset/surf">sweepset/surf</a> Reference page in Help browser <a href="matlab:doc surf">doc surf</a> doc surf Overloaded functions or methods (ones with the same name in other directories) <a href="matlab:doc fixedpoint/surf">doc fixedpoint/surf</a> help counter counter not found. Use the Help browser Search tab to <a href="matlab:docsearch counter">search the documentation</a>, or type "<a href="matlab:help help">help help</a>" for help command options, such as help for methods. help contoer contoer not found. Use the Help browser Search tab to <a href="matlab:docsearch contoer">search the documentation</a>, or type "<a href="matlab:help help">help help</a>" for help command options, such as help for methods. help contour CONTOUR Contour plot. CONTOUR(Z) is a contour plot of matrix Z treating the values in Z as heights above a plane. A contour plot are the level curves of Z for some values V. The values V are chosen automatically. CONTOUR(X,Y,Z) X and Y specify the (x,y) coordinates of the surface as for SURF. The X and Y data will be transposed or sorted to bring it to MESHGRID form depending on the span of the first row and column of X (to orient the data) and the order of the first row of X and the first column of Y (to sorted the data). The X and Y data must be consistently sorted in that if the first element of a column of X is larger than the first element of another column that all elements in the first column are larger than the corresponding elements of the second. Similarly Y must be consistently sorted along rows. CONTOUR(Z,N) and CONTOUR(X,Y,Z,N) draw N contour lines, overriding the automatic value. CONTOUR(Z,V) and CONTOUR(X,Y,Z,V) draw LENGTH(V) contour lines at the values specified in vector V. Use CONTOUR(Z,[v v]) or CONTOUR(X,Y,Z,[v v]) to compute a single contour at the level v. CONTOUR(AX,...) plots into AX instead of GCA. [C,H] = CONTOUR(...) returns contour matrix C as described in CONTOURC and a handle H to a contourgroup object. This handle can be used as input to CLABEL. The contours are normally colored based on the current colormap

and are drawn as PATCH objects. You can override this behavior with the syntax CONTOUR(...,LINESPEC) to draw the contours with the color and linetype specified. See the help for PLOT for more information about LINESPEC values. The above inputs to CONTOUR can be followed by property/value pairs to specify additional properties of the contour object. Uses code by R. Pawlowicz to handle parametric surfaces and inline contour labels. Example: [c,h] = contour(peaks); clabel(c,h), colorbar See also <a href="matlab:help contour3">contour3</a>, <a href="matlab:help contourf">contourf</a>, <a href="matlab:help clabel">clabel</a>, <a href="matlab:help colorbar">colorbar</a>, <a href="matlab:help meshgrid">meshgrid</a>. Overloaded methods: <a href="matlab:help xregmodel/contour">xregmodel/contour</a> <a href="matlab:help xregarx/contour">xregarx/contour</a> <a href="matlab:help sweepset/contour">sweepset/contour</a> Reference page in Help browser <a href="matlab:doc contour">doc contour</a> doc contour Overloaded functions or methods (ones with the same name in other directories) <a href="matlab:doc fixedpoint/contour">doc fixedpoint/contour</a> help surface SURFACE Create surface. SURFACE(X,Y,Z,C) adds the surface in X,Y,Z,C to the current axes. SURFACE(X,Y,Z) uses C = Z, so color is proportional to surface height. See SURF for a complete description of the various forms that X,Y,Z,C can take. SURFACE returns a handle to a SURFACE object. SURFACEs are children of AXES objects. The arguments to SURFACE can be followed by parameter/value pairs to specify additional properties of the surface. The X,Y,Z,C arguments to SURFACE can be omitted entirely, and all properties specified using parameter/value pairs. AXIS, CAXIS, COLORMAP, HOLD, SHADING and VIEW set figure, axes, and surface properties which affect the display of the SURFACE. Execute GET(H), where H is a surface handle, to see a list of surface object properties and their current values. Execute SET(H) to see a list of surface object properties and legal property values.

See also <a href="matlab:help surf">surf</a>, <a href="matlab:help line">line</a>, <a href="matlab:help patch">patch</a>, <a href="matlab:help text">text</a>, <a href="matlab:help shading">shading</a>. Overloaded methods: <a href="matlab:help xregstatsmodel/surface">xregstatsmodel/surface</a> <a href="matlab:help xregmodel/surface">xregmodel/surface</a> <a href="matlab:help xregarx/surface">xregarx/surface</a> Reference page in Help browser <a href="matlab:doc surface">doc surface</a> diary off

Das könnte Ihnen auch gefallen