Saturday, July 25, 2009

Continued..

bvpval

Evaluate the numerical solution of a boundary value problem (BVP) using the output of bvp4c

    Note bvpval is obsolete and will be removed in the future. Please use deval instead.

Syntax

  • sxint = bvpval(sol,xint)

Description

sxint = bvpval(sol,xint) uses sol, the output of bvp4c, to evaluate the solution of a boundary value problem at each element of the vector xint. For each i, sxint(:,i) is the solution corresponding to xint(i).



calendar

Calendar

Syntax

  • c = calendar
    c = calendar(d)
    c = calendar(y,m)

    calendar(...)

Description

c = calendar returns a 6-by-7 matrix containing a calendar for the current month. The calendar runs Sunday (first column) to Saturday.

c = calendar(d), where d is a serial date number or a date string, returns a calendar for the specified month.

c = calendar(y,m), where y and m are integers, returns a calendar for the specified month of the specified year.

calendar(...) displays the calendar on the screen.

Examples

The command:

  • calendar(1957,10)

reveals that the Space Age began on a Friday (on October 4, 1957, when Sputnik 1 was launched).

  •                     Oct 1957
    S M Tu W Th F S
    0 0 1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30 31 0 0
    0 0 0 0 0 0 0
camdolly

Move the camera position and target

Syntax

  • camdolly(dx,dy,dz)
    camdolly(dx,dy,dz,'targetmode')
    camdolly(dx,dy,dz,'targetmode','coordsys')
    camdolly(axes_handle,...)

Description

camdolly moves the camera position and the camera target by the specified amounts.

camdolly(dx,dy,dz) moves the camera position and the camera target by the specified amounts (see "Coordinate Systems").

camdolly(dx,dy,dz,'targetmode') The targetmode argument can take on two values that determine how MATLAB moves the camera:

  • movetarget (default) - move both the camera and the target
  • fixtarget - move only the camera

camdolly(dx,dy,dz,'targetmode','coordsys') The coordsys argument can take on three values that determine how MATLAB interprets dx, dy, and dz:

Coordinate Systems

  • camera (default) - move in the camera's coordinate system. dx moves left/right, dy moves down/up, and dz moves along the viewing axis. The units are normalized to the scene.
  • For example, setting dx to 1 moves the camera to the right, which pushes the scene to the left edge of the box formed by the axes position rectangle. A negative value moves the scene in the other direction. Setting dz to 0.5 moves the camera to a position halfway between the camera position and the camera target
  • pixels - interpret dx and dy as pixel offsets. dz is ignored.
  • data - interpret dx, dy, and dz as offesets in axes data coordinates.

camdolly(axes_handle,...) operates on the axes identified by the first argument, axes_handle. When you do not specify an axes handle, camdolly operates on the current axes.

Remarks

camdolly sets the axes CameraPosition and CameraTarget properties, which in turn causes the CameraPositionMode and CameraTargetMode properties to be set to manual.

Examples

This example moves the camera along the x- and y-axes in a series of steps.

  • surf(peaks)
    axis vis3d
    t = 0:pi/20:2*pi;
    dx = sin(t)./40;
    dy = cos(t)./40;
    for i = 1:length(t);
    camdolly(dx(i),dy(i),0)
    drawnow
    end

camlight

Create or move a light object in camera coordinates

Syntax

  • camlight headlight
    camlight right
    camlight left
    camlight
    camlight(az,el)
    camlight(...`style')
    camlight(light_handle,...)
    light_handle = camlight(...)

Description

camlight('headlight') creates a light at the camera position.

camlight('right') creates a light right and up from camera.

camlight('left') creates a light left and up from camera.

camlight with no arguments is the same as camlight('right').

camlight(az,el) creates a light at the specified azimuth (az) and elevation (el) with respect to the camera position. The camera target is the center of rotation and az and el are in degrees.

camlight(...,'style') The style argument can take on the two values:

  • local (default) - the light is a point source that radiates from the location in all directions.
  • infinite - the light shines in parallel rays.

camlight(light_handle,...) uses the light specified in light_handle.

light_handle = camlight(...) returns the light's handle.

Remarks

camlight sets the light object Position and Style properties. A light created with camlight will not track the camera. In order for the light to stay in a constant position relative to the camera, you must call camlight whenever you move the camera.

Examples

This example creates a light positioned to the left of the camera and then repositions the light each time the camera is moved:

  • surf(peaks)
    axis vis3d
    h = camlight('left');
    for i = 1:20;
    camorbit(10,0)
    camlight(h,'left')
    drawnow;
    end

No comments:

Post a Comment