# How to plot time-spatial distribution of the data?

29 Ansichten (letzte 30 Tage)
d7366431 am 8 Mai 2020
Hi,
I am not so good in coding and would appreciate it if you could guide me a bit.
How with the matlab I can plot the results as shown below?
My input matrix for this chart is shown below. Yellow (time steps), Green (position along the measurement line), Grey (Data obtained at specific position and time).
Thank you!
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Antworten (2)

rajat aggarwal am 12 Mai 2020
You can use plot3() function available in matlab for this. This is 3d data as for particular value of position and time there is a specific value.
>> plot3(X,Y,Z) ;
where
Z is the matrix in grey for example z= [ 0 2.03E-08 .............; 0 -6.8E-08.....................; ... ]
X is row vector of position[] for example position[] = [y1 y2 y3 y4 ......]
Y is row vector of time[] for example time[] = [t1 t2 t3 ..... ]
As it is mentioned here that plot(p,q) will plot the coloumns of p corresponding to coloumns of q if both are matrices. If one of them is vector lets say p and length of p is equal to q(matrix) coloumn length then the function plots each matrix row versus the vector p.
Here in your example we have three arguments. Similar concept can be used there.
##### 1 KommentarKeine anzeigenKeine ausblenden
d7366431 am 14 Mai 2020

Melden Sie sich an, um zu kommentieren.

Sulaymon Eshkabilov am 25 Nov. 2022
For this exercise, it is better to use one of the following functions:
imagesc()
contourf()
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Find more on Bar Plots in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by