Plot the Solution in the PDE Modeler App
To plot a solution property, use the Plot menu.Use the Plot Selection dialog box to select whichproperty to plot, which plot style to use, and several other plotparameters. If you have recorded a movie (animation) of the solution,you can export it to the workspace.
To open the Plot Selection dialog box, select Parameters from the Plot menu or click the button.
Parameters opens a dialog box containingoptions controlling the plotting and visualization.
The upper part of the dialog box contains four columns:
Plot type (far left) containsa row of six different plot types, which can be used for visualization:
Color. Visualization of a scalarproperty using colored surface objects.
Contour. Visualization of a scalarproperty using colored contour lines. The contour lines can also enhancethe color visualization when both plot types (Color and Contour)are checked. The contour lines are then drawn in black.
Arrows. Visualization of a vectorproperty using arrows.
Deformed mesh. Visualizationof a vector property by deforming the mesh using the vector property.The deformation is automatically scaled to 10% of the problem domain.This plot type is primarily intended for visualizing x-and y-displacements (u and v)for problems in structural mechanics. If no other plot type is selected,the deformed triangular mesh is displayed.
Height (3-D plot). Visualizationof a scalar property using height (z-axis) in a3-D plot. 3-D plots are plotted in separate figure windows. If the Color and Contour plottypes are not used, the 3-D plot is simply a mesh plot. You can visualizeanother scalar property simultaneously using Color and/or Contour,which results in a 3-D surface or contour plot.
Animation. Animation of time-dependentsolutions to parabolic and hyperbolic problems. If you select thisoption, the solution is recorded and then animated in a separate figurewindow using the MATLAB®
movie
function.
A color bar is added to the plots to map the colors in the plotto the magnitude of the property that is represented using color orcontour lines.
Property contains four pop-upmenus containing lists of properties that are available for plottingusing the corresponding plot type. From the first pop-up menu youcontrol the property that is visualized using color and/or contourlines. The second and third pop-up menus contain vector valued propertiesfor visualization using arrows and deformed mesh, respectively. Fromthe fourth pop-up menu, finally, you control which scalar propertyto visualize using z-height in a 3-D plot. Thelists of properties are dependent on the current application mode.For the generic scalar mode, you can select the following scalar properties:
u. The solution itself.
abs(grad(u)). The absolute valueof ∇u, evaluated at the center of each triangle.
abs(c*grad(u)). The absolutevalue of c · ∇u,evaluated at the center of each triangle.
user entry. A MATLAB expressionreturning a vector of data defined on the nodes or the triangles ofthe current triangular mesh. The solution
u
, itsderivativesux
anduy
, the x and y componentsof c · ∇u,cux
andcuy
,andx
andy
are all availablein the local workspace. You enter the expression into the edit boxto the right of the Property pop-up menuin the User entry column.Examples:
u.*u, x+y
See AlsoOur rover is equipped with a radio telescope to search for extraterrestrial life in the cosmos. The microwave background radiation is a constant radio "buzz" across a wide range of frequencies that can be measured in all directions. This background radiatControl Tutorials for MATLAB and SimulinkUsing MATLAB, Plot Bode Diagrams Of G1(s) And G2(s) Given Below: G1(s)=1+s/1+2s G(s) = 1-s/1-2s Note
The vector property pop-up menus contain the following propertiesin the generic scalar case:
-grad(u). The negative gradientof u, –∇u.
-c*grad(u). c timesthe negative gradient of u, –c ·∇u.
user entry. A MATLAB expression
[px;py]
returning a 2-by-ntri matrix of datadefined on the triangles of the current triangular mesh (ntri isthe number of triangles in the current mesh). The solutionu
,its derivativesux
anduy
, the x and y componentsof c · ∇u,cux
andcuy
,andx
andy
are all availablein the local workspace. Data defined on the nodes is interpolatedto triangle centers. You enter the expression into the edit fieldto the right of the Property pop-up menuin the User entry column.Examples:
[ux;uy], [x;y]
For the generic system case, the properties available for visualizationusing color, contour lines, or z-height are u,v, abs(u,v), and a user entry. For visualization usingarrows or a deformed mesh, you can choose (u,v)or a user entry. For applications in structural mechanics, u and v arethe x- and y-displacements,respectively.
The variables available in the local workspace for a user enteredexpression are the same for all scalar and system modes (the solutionis always referred to as u and, in the system case, v
).
User entry contains four editfields where you can enter your own expression, if you select theuser entry property from the corresponding pop-up menu to the leftof the edit fields. If the user entry property is not selected, thecorresponding edit field is disabled.
Plot style contains three pop-upmenus from which you can control the plot style for the color, arrow,and height plot types respectively. The available plot styles forcolor surface plots are
Interpolated shading. A surfaceplot using the selected colormap and interpolated shading, i.e., eachtriangular area is colored using a linear, interpolated shading (thedefault).
Flat shading. A surface plotusing the selected colormap and flat shading, i.e., each triangulararea is colored using a constant color.
You can use two different arrow plot styles:
Proportional. The length of thearrow corresponds to the magnitude of the property that you visualize(the default).
Normalized. The lengths of allarrows are normalized, i.e., all arrows have the same length. Thisis useful when you are interested in the direction of the vector field.The direction is clearly visible even in areas where the magnitudeof the field is very small.
For height (3-D plots), the available plot styles are:
Continuous. Produces a “smooth”continuous plot by interpolating data from triangle midpoints to themesh nodes (the default).
Discontinuous. Produces a discontinuousplot where data and z-height are constant on each triangle.
A total of three properties of the solution—two scalar properties and one vector field—can be visualized simultaneously. If the Height (3-D plot) option is turned off, the solution plot is a 2-D plot and is plotted in the main axes of the PDE Modeler app. If the Height (3-D plot) option is used, the solution plot is a 3-D plot in a separate figure window. If possible, the 3-D plot uses an existing figure window. If you would like to plot in a new figure window, simply type figure
at the MATLAB command line.
Additional Plot Control Options
In the middle of the dialog box are a number of additional plotcontrol options:
Plot in x-y grid. If you selectthis option, the solution is converted from the original triangulargrid to a rectangular x-y grid.This is especially useful for animations since it speeds up the processof recording the movie frames significantly.
Show mesh. In the surface plots,the mesh is plotted using black color if you select this option. Bydefault, the mesh is hidden.
Contour plot levels. For contourplots, the number of level curves, e.g.,
15
or20
canbe entered. Alternatively, you can enter a MATLAB vector of levels.The curves of the contour plot are then drawn at those levels. Thedefault is 20 contour level curves.Examples:
[0:100:1000]
,logspace(-1,1,30)
Colormap. Using the Colormap pop-upmenu, you can select from a number of different color maps:
cool
,gray
,bone
,pink
,copper
,hot
,jet
,hsv
,prism
,andparula
.Plot solution automatically.This option is normally selected. If turned off, there will not bea display of a plot of the solution immediately upon solving the PDE.The new solution, however, can be plotted using this dialog box.
For the parabolic and hyperbolic PDEs, the bottom right portionof the Plot Selection dialog box contains the Time for plot parameter.
Time for plot. A pop-up menu allows youto select which of the solutions to plot by selecting the correspondingtime. By default, the last solution is plotted.
Also, the Animation plot type is enabled.In its property field you find an Options button.If you press it, an additional dialog box appears. It contains parametersthat control the animation:
Animation rate (fps). For theanimation, this parameter controls the speed of the movie in framesper second (fps).
Number of repeats. The numberof times the movie is played.
Replay movie. If you select thisoption, the current movie is replayed without rerecording the movieframes. If there is no current movie, this option is disabled.
For eigenvalue problems, the bottom right part of the dialog box contains a drop-down menu with all eigenvalues. The plotted solution is the eigenvector associated with the selected eigenvalue. By default, the smallest eigenvalue is selected.
You can rotate the 3-D plots by clicking the plot and, whilekeeping the mouse button down, moving the mouse. For guidance, a surroundingbox appears. When you release the mouse, the plot is redrawn usingthe new viewpoint. Initially, the solution is plotted using -37.5degrees horizontal rotation and 30 degrees elevation.
If you click the Plot button, the solutionis plotted immediately using the current plot setup. If there is nocurrent solution available, the PDE is first solved. The new solutionis then plotted. The dialog box remains on the screen.
If you click the Done button, the dialogbox is closed. The current setup is saved but no additional plottingtakes place.
If you click the Cancel button, the dialogbox is closed. The setup remains unchanged since the last plot.
Tooltip Displays for Mesh and Plots
In mesh mode, you can use the mouse to display the node numberand the triangle number at the position where you click. Press theleft mouse button to display the node number on the information line.Use the left mouse button and the Shift key to displaythe triangle number on the information line.
In plot mode, you can use the mouse to display the numericalvalue of the plotted property at the position where you click. Pressthe left mouse button to display the triangle number and the valueof the plotted property on the information line.
The information remains on the information line until you releasethe mouse button.
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 简体中文
- English
- 日本 (日本語)
- 한국 (한국어)
Contact your local office