Creating a 3D plot! I have never done before

1 次查看(过去 30 天)
Hey Guys,
I have an cell-array
c -> 116x1 cell
and a Vector
d -> 116x1 double!
For example the data x = c{1,1}(:,1), y = c{1,1}(:,2) and z = d(1,1) belong together.
I tried things with a for-loop or simmiliar but all i get is errors and bullshit. I dont know if i have to work with meshgrid or which plot i exactly need. I hope you guys can help me with that problem.
I put an example Plot to show u what i need (it is just an example from the internet). And my plot is going to touch the "ground".
Thank you very much. Hope u guys can help me.
  8 个评论
Y. J.
Y. J. 2018-5-14
@Stephen Cobeldick: Thanks for your fast reply. The file I uploaded is just an example how the file i read from is formatted and how the data is structured. It wasn´t meant to be a exact example. Like I told in the opening i can´t upload the original file/data. The file is created by an device while measurement. Z represents the time it starts at 0.000 s and ends at a certain time. each data block corresponds to an time. The two columns represents the frequency and the acceleration of an specific device.
Do all blocks contain exactly the same X,Y pairs? No it don´t. Like in the text before it contains completely different data. Each data block is captured within a specific time.
Stephen23
Stephen23 2018-5-14
编辑:Stephen23 2018-5-14
@Y. J.: it would be much easier if you provided a file that really represents the data better, including data values that follow how the real files are arranged (e.g. the different X,Y pairs).
"It wasn´t meant to be a exact example"
Please give us an exact example. Use fake values if you don't want to give the real ones.
"What do you mean with rearrange into the matrices?"
The surf help explains what size the input X and Y matrices/vectors must be, relative to the Z matrix. It also shows how to use meshgrid to create them, so you can easily try it yourself on a small example and see what they look like.
"Can you please show me that on my example?"
Sure, once you give data that can be used to create a plot with.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by