Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Beginner: need help generating the right graph.
조회 수: 4 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Christine Tobler
2015년 12월 22일
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
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!