Matlab through two point drawing line question &&plot,line usage and the difference.

Source: Internet
Author: User

First horse

1, line is not equal to plot, I have checked help, many properties are different. 2, on the problem with the outer frame, plot can use box control. Line no outer frame.

3, the problem of graphics deletion. Plot can be controlled with hold on or off. Line if use Delet. It is therefore recommended that you use plot, because when you are drawing in several functions or M files, if you use line, you must record the handle value of each thread, and you need to define it as a global variable before you can use delete.


Matlab through two point drawing line problem

Clear All
Clc
Close all


A=[0 1 0 1
3 4 5 6
9 5 3 8
];
Rows=size (a,1);
Figure
For K=1:rows
Temp=a (k,:);
Line ([Temp (1,1) temp (1,2)],[temp (1,3) temp (1,4)])
Hold on
End

The results are as follows:


Url:

Matlab uses line to draw lines
Http://www.ilovematlab.cn/thread-23655-1-1.html
(Source: Matlab Chinese forum)

Matlab through two point drawing line problem
Http://www.ilovematlab.cn/thread-167905-1-1.html
(Source: Matlab Chinese forum)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.