MATLAB?????? - PowerPoint PPT Presentation

1 / 46
About This Presentation
Title:

MATLAB??????

Description:

MATLAB 2( ) set(h,'Markersize',13); 2( ) set(h,'MarkerEdgeColor','k'); ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 47
Provided by: Cheloan
Category:
Tags: matlab

less

Transcript and Presenter's Notes

Title: MATLAB??????


1
MATLAB??????
  • ??????

2
??
  • MATLAB ??????????,??????????????????
  • MATLAB ??????????????,???????????,?????????????
  • MATLAB ??????,?????????????,??????????????????

3
MATLAB??????
  1. ????????
  2. plot ??
  3. ????????????
  4. ??????
  5. ??????
  6. ?? axis ??
  7. ????????
  8. ??????

4
????????
  • ??????????plot
  • ??plot(y,line_style)
  • y ?????????????

  • line_style ????????????

5
plot ??????
plot?? ???? RGB?
b ??(blue) (0,0,1)
g ??(green) (0,1,0)
r ??(red) (1,0,0)
c ???(cyan) (0,1,1)
m ???(magenta) (1,0,1)
y ??(yellow) (1,1,0)
k ??(black) (0,0,0)
w ??(while) (1,1,1)
6
plot ??????(?)
7
plot?????????
plot ?? ????
none ???(???)
. ??(point)
o ??(circle)
x ??(x-mark)
??(plus)
??(star)
s ??(square)
d ??(diamond)
v ?????(triangle (down))
?????(triangle (up))
lt ?????(triangle (left))
gt ?????(triangle (right))
p ????(pentagram)
h ????(hexagram)
8
plot?????????(?)
9
plot?????????(?)
10
plot?????????(?)
11
plot?????????
plot ?? ????
- ??(???)(solid)
??(dotted)
-. ???(dash dot)
-- ??(dashed)
(none) ???(no line)
12
plot?????????(?)
13
????????(?)
  • ????????????
  • ????? (scalar)
  • ?? (vector)
  • ?? (matrix)

14
????????(?)
  • scalar

15
????????(?)
  • vector

16
????????(?)
  • matrix

17
???????1
?? ?? ??
title title(name) ????????
xlabel xlabel(name) ?x??????
ylabel ylabel(name) ?y??????
text text(x,y,word) ?????(x,y)??
gtext gtext(word) ??????????
legend legend(h, word,...) ??????????
grid grid on ??????
grid grid off ??????(??)
box box on ??????(??)
box box off ???????????
18
???????1(?)
  • title(?????)

19
???????1(?)
  • xlabel(2008/12/012008/12/12)
  • ylabel(??)

20
???????1(?)
  • text(3,37.15,??????)

21
???????1(?)
  • gtext(?????)

22
???????1(?)
  • legend(3, ???, ??, ???)

23
???????1(?)
  • grid on

24
???????1(?)
  • box off

25
???????1(?)
  • legend

26
???????2
  • set (?????????)

?? ?? ??
gca set(gca,) ?????????
xtick set(gca,xtick,) ?x?????????
xticklabel set(gca,xticklabel,) ?x?label??????
color set(h,color,) ??????
linestyle set(linestyle) ??????
linewidth set(h,linewidth) ??????
Marker set(h,marker) ?????
MarkerSize set(h,MarkerSize) ??????
MarkerEdgeColor set(h,MarkerEdgeColor) ????????
MarkerFaceColor set(h,MarkerFaceColor) ????????
gcf set(gcf,) ?????????
name set(gcf,name,) ??????
27
???????2(?)
  • Example

28
???????2(?)
  • yticktmp 2045
  • set(gca,ytick yticktmp)

29
???????2(?)
  • set(gca,'xticklabel','12/1','12/2','12/3','12/4',
    '12/5','12/8','12/9','12/10','12/11','12/12')

30
???????2(?)
  • hplot(y,'ro-')
  • set(h,'color','g')

31
???????2(?)
  • set(h,'linestyle','-.')

32
???????2(?)
  • set(h,'linewidth',3)

33
???????2(?)
  • set(h,'Marker','s')

34
???????2(?)
  • set(h,'Markersize',13)

35
???????2(?)
  • set(h,'MarkerEdgeColor','k')

36
???????2(?)
  • set(h,'MarkerFaceColor','r')

37
???????2(?)
  • set(gcf,name,12?????????')

38
??????
  • subplot(RowNum,ColumnNum,Num)

39
?? axis ??
?? ??
axis(Xmin, Xmax, Ymin, Ymax) ??x?y???????
axis(auto) ?Matlab????
axis(axis) ???????,????????
axis(xy) ???????(Cartesian Coordinate)
axis(ij) ?????,?????????
axis(square) ??????(??????)
axis(equal) x?y????
axis(normal) ??Matlab??
axis off ???????
axis on ??????(??)
40
?? axis ??(?)
  • axis

41
???????????
  • colordef
  • ????????????
  • ??? colordef ??,?? plot ???????????

?? ??
colordef white ???????,????????
colordef block ???????,????????
colordef none ???????,???????
42
????????(?)
  • plotyy??
  • ????????y?

43
????????(?)
  • fplot ??
  • ??????????????

44
????????(?)
  • Semilogx??
  • ? x ??????,???????

45
?????????
?? ?? ??
bar bar(X,Y) ???
comel comet(X,Y) ?????(X(i),Y(i)) ?i?????????
compass compass(X,Y) ? ,????????????????Z(??????,???????)
errorbar errorbar(X,Y,L,U) ?(X(i),Y(i))???,????(X(i),Y(i)U(i)) ,????(X(i),Y(i)-L(i)) ,???????????L(i)U(i)???????,??????
feather feather(X,Y) ? ,?X??????,??????????Z()
hist hist(Y) ?Y??????????????
polar polar(theta,r) ????????,??theta,r??????????????????
rose rose(theta) ?theta ??????????,???????
stairs stairs(X,Y) ???
stem stem(X,Y) ???
46
?????????(?)
Write a Comment
User Comments (0)
About PowerShow.com