Info
This question is closed. Reopen it to edit or answer.
Beginner: need help generating the right graph.
4 views (last 30 days)
Show older comments
Hello, thanks for taking the time to look at my question.
I need to create a surface/topographical type graph, I have no idea where to even begin to get what I want.
1) I need to create a GRID structure which will later take on data. This grid should be a rectangular grid with an X axis that is 150 squares large by a Y axis that is 88 squares tall... I need a Z axis that is 7 squares.
2) this GRID stands for X (discrete events/time), Y (the 88 keys of a grand piano), Z (the energy of an attack/dynamic contour which can be at 7 different dynamic levels).
3) I then need to be able to enter XYZ data which I've compiled for about 150 different events (X axis) which would show the exact piano notes being played (Y axis/88 sized grid) while also showing the dynamic/attack contour of each entry.
That is all I need to do more or less, alongside a few other things like, color the Z axis on a scale from silence to very strong attack, etc.
Drawing this is pretty simple for me, but, being that I want to generate a few of these and that they will end up having a bunch of data points, I think it best to just figure our a way to move this into a program like MATLAB.
Any help is welcome!
0 Comments
Answers (1)
Christine Tobler
on 22 Dec 2015
I'm afraid I don't quite understand the question. It sounds like you have a 150x88 matrix containing integers from 1 to 7, which you would like to plot. This can be done as follows:
X = randi(7, 150, 88);
surf(X);
colorbar
(will look pretty bad because the numbers in my example are completely random). Was this your question, or is it about how to get the matrix into MATLAB?
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!