sheen
sheen

Reputation: 3

How to create a 3d plot with vectors of unequal length?

How to create a 3d plot with vectors of unequal length? for example x = [1:20], y = [-10:5:10] and z is a 20x5 matrix with different values. I am able to plot it using surf and mesh. but surf and mesh represents continuous data. these functions connect the discrete data. I want to represent this data in 3d as discrete, like stem() plots.

Upvotes: 0

Views: 1591

Answers (1)

am304
am304

Reputation: 13876

Unless I'm missing something, can you not simply do:

stem3(x,y,z)

Update: you need to make sure that x, y and z are of the same size though...

Upvotes: 1

Related Questions