Any quick way to generate coordinates (by 3or more independent variables) and plot them?

I can plot this p=[u;v;0]; using ezmesh(p(1),p(2),p(3),[0,2,0,2],10);
but how to plot this? p=[u;v;t]; for all u,v,t =0:0.1:1 Is that i have to use for loops for each point and plot them out one by one?

Answers (2)

These two are a little different. ezmesh treats the first 3 inputs as functions, so the fact you have three scalars there just means that they are constant functions. On the other hand, when all your inputs are vectors, ezmesh does not know how to interpret them. The question is really what you want because your u,v,t are all vectors. Are they specifying a curve in 3D space? If you want to use a mesh plot, then you t should be a function of u and v, i.e., you need to have a value of t for each combination of u and v.

2 Comments

Sorry about the confusion of using mesh as an example. I just want to know is there a built-in function that can plot points in 3d space which uses functions of more than 2 variables.
Yes:
If you have a function, f, that accepts (x,y,z) and returns V, you can plot this using: isosurface() or slice() amongst others.

This question is closed.

Asked:

on 30 Apr 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!