Solved

# Matkab ,draw line in 3d

Posted on 2013-02-01
481 Views
I need to draw a line in 3d using Matlab ,the reason for this is that I need to draw a model for
a line penetrating a surface ,for my students.

I just need to demonstrate to them how to find the angle between a line and a surface.
So how to do this using mesh() and meshgrid() ?

THNX
0
Question by:aboo_s
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 15

Accepted Solution

yuk99 earned 500 total points
ID: 38843389
Use plot3 function:
If you need a line together with surface put 'hold on' before print3 statement and 'hold off' after that not to start a new figure.
Alternatively you can use line function with X,Y,Z vectors as parameters.
0

LVL 10

Author Closing Comment

ID: 38862555
Thanks it worked!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

fix34  challenge 9 181
countHi challenge 25 194
allswap challenge 6 152
what is the main difference between git clone and fetch ann pull and push commands 2 131
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
###### Suggested Courses
Course of the Month4 days, 22 hours left to enroll