TAILIEUCHUNG - Learning MATLAB Version 6 (Release 12) phần 4

Bạn có thể đã nhận thức được rằng các tính chất đặc biệt của một hình vuông ma thuật đã làm với nhiều cách khác nhau của tổng hợp các yếu tố của nó. Nếu bạn có số tiền dọc theo hàng hoặc cột, hoặc dọc theo một trong hai đường chéo chính, bạn sẽ luôn luôn nhận được cùng một số. Hãy xác minh rằng việc sử dụng MATLAB. Câu lệnh đầu tiên để thử | 5 Graphics Basic Editing Plots .5-14 Mesh and Surface Images .5-24 Printing Handle Graphics User 5 Graphics Basic Plotting MATLAB has extensive facilities for displaying vectors and matrices as graphs as well as annotating and printing these graphs. This section describes a few of the most important graphics functions and provides examples of some typical applications. For More Information Graphics and 3-D Visualization provide in-depth coverage of MATLAB graphics and visualization tools. Access these from Help. Creating a Plot The plot function has different forms depending on the input arguments. If y is a vector plot y produces a piecewise linear graph of the elements of y versus the index of the elements of y. If you specify two vectors as arguments plot x y produces a graph of y versus x. For example these statements use the colon operator to create a vector of x values ranging from zero to 2 n compute the sine of these values and plot the result. x 0 pi 100 2 pi y sin x plot x y Now label the axes and add a title. The characters pi create the symbol n. xlabel x 0 2 pi ylabel Sine of x title Plot of the Sine Function FontSize 12 5-2 Basic Plotting Multiple Data Sets in One Graph Multiple x-y pair arguments create multiple graphs with a single call to plot. MATLAB automatically cycles through a predefined but user settable list of colors to allow discrimination between each set of data. For example these statements plot three related functions of x each curve in a separate distinguishing color. y2 sin y3 sin plot x y x y2 x y3 The legend command provides an easy way to identify the individual plots. legend sin x sin sin .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.