Smoluchowski equation matlab free

fimplicit

Description

example

plots the implicit symbolic equation or function over the default interval for and.

plots over the interval <

example

plots over the interval <

example

uses to set the line style, marker symbol, and line color.

example

specifies line properties using one or more pair arguments. Use this option with any of the input argument combinations in the previous syntaxes. pair settings apply to all the lines plotted. To set options for individual lines, use the objects returned by.

plots into the axes specified by instead of the current axes.

Examples

collapse all

Plot Implicit Symbolic Equation

Plot the hyperbola by using. The function uses the default interval of for and.

syms xy fimplicit (x ^ 2 - y ^ 2 == 1)

Plot Implicit Symbolic Function

Plot the hyperbola described by the function by first declaring the symbolic function using. The function uses the default interval of for and.

syms f (x, y) f (x, y) = x ^ 2 - y ^ 2 - 1; fimplicit (f)

Specify plotting interval

Plot half of the circle by using the intervals and. Specify the plotting interval as the second argument of.

syms xy circle = x ^ 2 + y ^ 2 == 3; fimplicit (circle, [-4 0 -2 2])

Plot Multiple Implicit Equations

You can plot multiple equations either by passing the inputs as a vector or by using to successively plot on the same figure. If you specify and Name-Value arguments, they apply to all lines. To set options for individual plots, use the function handles returned by.

Divide a figure into two subplots by using. On the first subplot, plot and using vector input. On the second subplot, plot the same inputs by using.

syms xy circle1 = x ^ 2 + y ^ 2 == 1; circle2 = x ^ 2 + y ^ 2 == 3; subplot (2,1,1) fimplicit ([circle1 circle2]) title ('Multiple Equations Using Vector Input') subplot (2,1,2) fimplicit (circle1) hold on fimplicit (circle2) title ('Multiple Equations Using hold on Command ') hold off

Change Line Properties and Display Markers

Plot three concentric circles of increasing diameter. For the first line, use a line width of. For the second, specify a dashed red line style with circle markers. For the third, specify a cyan, dash-dot line style with asterisk markers. Display the legend.

syms xy circle = x ^ 2 + y ^ 2; fimplicit (circle == 1, 'Linewidth', 2) hold on fimplicit (circle == 2, '--or') fimplicit (circle == 3, '-. * c') legend ('show', 'Location ',' best ') hold off

Modify Implicit Plot After Creation

Plot. Specify an output to make return the plot object.

syms xy eqn = y * sin (x) + x * cos (y) == 1; fi = fimplicit (eqn)
fi = ImplicitFunctionLine with properties: Function: [1x1 sym] Color: [0 0.4470 0.7410] LineStyle: '-' LineWidth: 0.5000 Show all properties

Change the plotted equation to by using dot notation to set properties. Similarly, change the line color to red and line style to a dash-dot line. The horizontal and vertical lines in the output are artifacts that should be ignored.

fi.Function = x / cos (y) + y / sin (x) == 0; fi.Color = 'r'; fi.LineStyle = '-.';

Add Title and Axis Labels and Format Ticks

Plot over the interval and. Add a title and axis labels. Create the x-axis ticks by spanning the x-axis limits at intervals of. Display these ticks by using the property. Create x-axis labels by using to apply to. Display these labels by using the property. Repeat these steps for the y-axis.

To use LaTeX in plots, see.

syms xy eqn = x * cos (y) + y * sin (x) == 1; fimplicit (eqn, [-2 * pi 2 * pi]) grid on title ('x cos (y) + y sin (x) for -2 \ pi

When you zoom into a plot, re-evaluates the plot automatically. This re-evaluation on zoom can reveal hidden detail at smaller scales.

Divide a figure into two by using. Plot in both the first and second subplots. Zoom into the second subplot by using. The zoomed subplot shows detail that is not visible in the first subplot.

syms xy eqn = x * cos (y) + y * sin (1 / x) == 0; subplot (2,1,1) fimplicit (eqn) subplot (2,1,2) fimplicit (eqn) zoom (2)

Input arguments

collapse all

- Implicit equation or function to plot
symbolic equation | symbolic expression | symbolic function

Implicit equation or function to plot, specified as a symbolic equation, expression, or function. If the right-hand side is not specified, then it is assumed to be.

- Plotting range for and
[-5 5] (default) | vector of two numbers

Plotting range for and, specified as a vector of two numbers. The default range is.

- Plotting range for and
[-5 5 -5 5] (default) | vector of four numbers

Plotting range for and, specified as a vector of four numbers. The default range is.

- Axes object
axes object

Axes object. If you do not specify an axes object, then uses the current axes.

- Line style, marker, and color
character vector | string

Line style, marker, and color, specified as a character vector or string containing symbols. The symbols can appear in any order. You do not need to specify all three characteristics (line style, marker, and color). For example, if you omit the line style and specify the marker, then the plot shows only the marker and no line.

Example: is a red dashed line with circle markers

Line styleDescription
Solid line
Dashed line
Dotted line
Dash dot line
markerDescription
Circle
Plus sign
Asterisk
Point
Cross
Horizontal line
Vertical line
Square
Diamond
Upward-pointing triangle
Downward pointing triangle
Right-pointing triangle
Left-pointing triangle
Pentagram
Hexagram
ColorDescription
yellow
magenta
cyan
red
green
blue
white
black

Name-Value Pair Arguments

Specify optional comma-separated pairs of arguments. is the argument name and is the corresponding value. must appear inside quotes. You can specify several name and value pair arguments in any order as.

Example:

The function line properties listed here are only a subset. For a complete list, see ImplicitFunctionLine Properties.

- Number of evaluation points per direction
151 (default) | number

Number of evaluation points per direction, specified as a number. The default is.

- Line color
(default) | RGB triplet | hexadecimal color code | | | | ...

Line color, specified as an RGB triplet, a hexadecimal color code, a color name, or a short name.

For a custom color, specify an RGB triplet or a hexadecimal color code.

  • An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range; for example, .

  • A hexadecimal color code is a character vector or a string scalar that starts with a hash symbol () followed by three or six hexadecimal digits, which can range from to. The values ​​are not case sensitive. Thus, the color codes,,, and are equivalent.

Alternatively, you can specify some common colors by name. This table lists the named color options, the equivalent RGB triplets, and hexadecimal color codes.

Color nameShort nameRGB tripletHexadecimal Color CodeAppearance

Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB® uses in many types of plots.

RGB tripletHexadecimal Color CodeAppearance

Example:

Example:

Example:

- Line style
(default) | | | |

Line style, specified as one of the options listed in this table.

Line styleDescriptionResulting Line
Solid line
Dashed line
Dotted line
Dash-dotted line
No lineNo line

- Line width
(default) | positive value

Line width, specified as a positive value in points, where 1 point = 1/72 of an inch. If the line has markers, then the line width also affects the marker edges.

The line width cannot be thinner than the width of a pixel. If you set the line width to a value that is less than the width of a pixel on your system, the line displays as one pixel wide.

- marker symbol
(default) | | | | | ...

Marker symbol, specified as one of the values ​​listed in this table. By default, the object does not display markers. Specifying a marker symbol adds markers at each data point or vertex.

ValueDescription
Circle
Plus sign
Asterisk
Point
Cross
Horizontal line
Vertical line
or Square
or Diamond
Upward-pointing triangle
Downward pointing triangle
Right-pointing triangle
Left-pointing triangle
or Five-pointed star (pentagram)
or Six-pointed star (hexagram)
No markers

- Marker outline color
(default) | RGB triplet | hexadecimal color code | | | | ...

Marker outline color, specified as, an RGB triplet, a hexadecimal color code, a color name, or a short name. The default value of uses the same color as the property.

For a custom color, specify an RGB triplet or a hexadecimal color code.

  • An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range; for example, .

  • A hexadecimal color code is a character vector or a string scalar that starts with a hash symbol () followed by three or six hexadecimal digits, which can range from to. The values ​​are not case sensitive. Thus, the color codes,,, and are equivalent.

Alternatively, you can specify some common colors by name. This table lists the named color options, the equivalent RGB triplets, and hexadecimal color codes.

Color nameShort nameRGB tripletHexadecimal Color CodeAppearance
Not applicableNot applicableNot applicableNo color

Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB uses in many types of plots.

RGB tripletHexadecimal Color CodeAppearance

- Marker fill color
(default) | | RGB triplet | hexadecimal color code | | | | ...

Marker fill color, specified as, an RGB triplet, a hexadecimal color code, a color name, or a short name. The value uses the same color as the property.

For a custom color, specify an RGB triplet or a hexadecimal color code.

  • An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range; for example, .

  • A hexadecimal color code is a character vector or a string scalar that starts with a hash symbol () followed by three or six hexadecimal digits, which can range from to. The values ​​are not case sensitive. Thus, the color codes,,, and are equivalent.

Alternatively, you can specify some common colors by name. This table lists the named color options, the equivalent RGB triplets, and hexadecimal color codes.

Color nameShort nameRGB tripletHexadecimal Color CodeAppearance
Not applicableNot applicableNot applicableNo color

Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB uses in many types of plots.

RGB tripletHexadecimal Color CodeAppearance

Example:

Example:

Example:

- Marker size
(default) | positive value