Sie sind auf Seite 1von 14

/

MATLAB Drive

Current Folder

WORKSPACE

Size Date Modified Type


Name
Published(my site) 17/3/2020 12.45 Folder

myfigure.fig 116 KB 17/3/2020 12.45 fig

images.jpg 65 KB 17/3/2020 12.06 jpg

jodoh.png 153 KB 17/3/2020 11.46 png

Welcome.mlx 639 KB 17/3/2020 11.43 mlx

Size
Date Modified
Type

Prototype

New to MATLAB? See resources for ​Getting Started​.

>> b=imread(​'images.jpg'​);
>> whos ​b
Name Size Bytes Class Attributes b 640x640x3 1228800 uint8
>> b=imread(​'images.jpg'​);
>> b1=imadd(b,128);
>> imshow(b1)
>>
>> b=imread(​'images.jpg'​);
>> b1=imsubtract(b,128);
>> imshow(b),figure,imshow(b1)
>>
>> b=imread(​'images.jpg'​);
>> b1=immultiply(b,2);
>> b1=immultiply(b,4);
>> imshow(b),figure,imshow(b1),figure,imshow(b2)
Unrecognized function or variable 'b2'.
>> b2=immultiply(b,4);
>> imshow(b),figure,imshow(b1),figure,imshow(b2)
>> imshow(b),figure,imshow(b1),figure,imshow(b2)
>>
>> b=imread(​'images.jpg'​);
>> b1=imdivide(b,2);
>> b2=imdivide(b,4);
>> imshow(b),figure,imshow(b1),figure,imshow(b2)
>>
>> b=imread(​'images.jpg'​);
>> b1=128-b;
>> imshow(b1)
>>
>> b=imread(​'images.jpg'​);
>> imshow(b),figure,imhist(b),axis ​tight
>>
>> t=imread(​'images.jpg'​);
>> th=imadjust(t,[],[],0.5);
>> imshow(t),figure,imshow(th)
>>
>> t=imread(​'images.jpg'​);
>> th=imadjust(t,[],[],0.5);
>> imshow(t),figure,imshow(th)
>> plot(t,th,​'.'​),axis ​tight
Error using ​plot
Data cannot have more than 2 dimensions.
plot​ Linear plot.
plot​(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
then the vector is plotted versus the rows or columns of the matrix,
whichever line up. If X is a scalar and Y is a vector, disconnected
line objects are created and plotted as discrete points vertically at
X.
plot​(Y) plots the columns of Y versus their index.
If Y is complex, ​plot​(Y) is equivalent to ​plot​(real(Y),imag(Y)).
In all other uses of ​plot​, the imaginary part is ignored.
Various line types, plot symbols and colors may be obtained with
plot​(X,Y,S) where S is a character string made from one element
from any or all the following 3 columns:
b blue . point - solid
g green o circle : dotted
r red x x-mark -. dashdot
c cyan + plus -- dashed
m magenta * star (none) no line
y yellow s square
k black d diamond
w white v triangle (down)
^ triangle (up)
< triangle (left)
> triangle (right)
p pentagram
h hexagram
For example, ​plot​(X,Y,'c+:') plots a cyan dotted line with a plus
at each data point; ​plot​(X,Y,'bd') plots blue diamond at each data
point but does not draw any line.
plot​(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,...) combines the plots defined by
the (X,Y,S) triples, where the X's and Y's are vectors or matrices
and the S's are strings.
For example, ​plot​(X,Y,'y-',X,Y,'go') plots the data twice, with a
solid yellow line interpolating green circles at the data points.
The ​plot​ command, if no color is specified, makes automatic use of
the colors specified by the axes ColorOrder property. By default,
plot​ cycles through the colors in the ColorOrder property. For
monochrome systems, ​plot​ cycles over the axes LineStyleOrder property.
Note that RGB colors in the ColorOrder property may differ from
similarly-named colors in the (X,Y,S) triples. For example, the
second axes ColorOrder property is medium green with RGB [0 .5 0],
while ​plot​(X,Y,'g') plots a green line with RGB [0 1 0].
If you do not specify a marker type, ​plot​ uses no marker.
If you do not specify a line style, ​plot​ uses a solid line.
plot​(AX,...) plots into the axes with handle AX.
plot​ returns a column vector of handles to lineseries objects, one
handle per plotted line.
The X,Y pairs, or X,Y,S triples, can be followed by
parameter/value pairs to specify additional properties
of the lines. For example, ​plot​(X,Y,'LineWidth',2,'Color',[.6 0 0])
will create a plot with a dark red line width of 2 points.
Example
x = -pi:pi/10:pi;
y = tan(sin(x)) - sin(tan(x));
plot(x,y,'--rs','LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',10)
See also ​plottools​, ​semilogx​, ​semilogy​, ​loglog​, ​plotyy​, ​plot3​, ​grid​,
title​, ​xlabel​, ​ylabel​, ​axis​, ​axes​, ​hold​, l​ egend​, ​subplot​, ​scatter​.
Documentation for plot
Other functions named plot
>> plot(t,th,​'g'​),axis ​tight
Error using ​plot
Data cannot have more than 2 dimensions.
>> plot(t,th,​'g+:'​),axis ​tight
Error using ​plot
Data cannot have more than 2 dimensions.
>> plot(t,th,​'g+c'​),axis ​tight
Error using ​plot
Data cannot have more than 2 dimensions.
>>
>> t=imread(​'images.jpg'​);
>> th=histeq(t);
>> imshow(t),figure,imshow(th)
>>
>> t=imread(​'images.jpg'​);
>> th=hiseq(t);
Unrecognized function or variable 'hiseq'.
Did you mean:
>> th=histeq(t);
>> th=histeq(t);
>> imshow(t),figure,imshow(th)
>> imhist(th),axis ​tight
>>
>> t=imread(​'images.jpg'​);
>> td=imdivide(t,4);
>> te=histeq(td);
>> imshow(td),figure,imshow(te)
>>

imshow
Display image

imshowpair
Compare differences between images

###
Command Window

Stop

Figure 16###
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16

Current Folder

WORKSPACE

WORKSPACE



HOME
PLOTS
APPS
FIGURE

FILE

VARIABLE
CODE

ENVIRONMENT

RESOURCES

SELECTION

plot
2-D line graph using linear axes

Plot as multiple series


Plots each series on the same plot

Plot as multiple series vs. first input


Plots the second and later series against the first series on the same plot

area
Filled area plot

bar
Bar graph
scatter
Scatter/bubble plot

pie
Pie chart

histogram
Histogram

contour
Contour plot

surf
Display a matrix as a surface

mesh
3-D mesh surface

Select variable to plot


PLOTS

OPTIONS

Curve Fitting
Fit curves and surfaces to data (cftool)
Optimization
Set up and solve optimization problems (optimtool)

PID Tuner
Tune PID controllers (pidTuner)

Classification Learner
Train models to classify data using supervised machine learning (classificationLearner)

Regression Learner
Train regression models to make predictions using supervised machine learning
(regressionLearner)

Distribution Fitter
Fit probability distributions to data (distributionFitter)

Control System Designer


Design single-input, single-output (SISO) controllers (controlSystemDesigner)
APPS

FILE

X-label
Insert x-axis label
Y-Label
Insert y-axis label

Title
Insert title

Legend
Insert legend

Remove Legend
Remove all legends

Colorbar
Insert colorbar

Remove Colorbar
Remove all colorbars

Grid
Show grid lines

Remove Grid
Remove all grid lines

X-Grid
Show x-axis grid lines
Y-Grid
Show y-axis grid lines

Text Arrow
Add text arrow annotation
ANNOTATIONS

TOOLS

EDIT

Sign Out

matlab:matlab.internal.language.introspective.errorDocCallback('plot')

Clear Command Window

Evaluate Selection
F9

Open "1228800"
Ctrl+D

Help on "1228800"
F1

Find...
Ctrl+F

Select All
Ctrl+A

Open Selection

Save As...

Duplicate

Delete

Default
Set layout to default

Three Column
Set three column layout
Show

Command History

Popup

Closed

Left/Right

Top/Bottom
Single

Left/Right

Top/Bottom

Top

Bottom

Left

Right

Variables
Clear workspace variables

All Functions and Variables


Clear all functions and variables

Save

Save As
Generate Code...

Das könnte Ihnen auch gefallen