Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Question regarding data grid
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi I have a data set on a 0.5 grid, the dimension for x is 141, y is 71 and t is 38. I am trying to calculate the z score which I already did. I am trying to plot the the Z scores on a time series but since is greater than two dimensions is not possible to do it. Is there anyway to work around this without ruining the yearly data? Thanks in advance for your help
2 comentarios
Respuestas (2)
Cris LaPierre
el 23 de Oct. de 2019
The uploaded file contains a single variable with size 1x71x38. If that is correct, just use the squeeze function to remove the singleton dimension.
Z = squeeze(Z);
The new size of Z is 71x38.
From here you can create a line plot for each column
plot(Z)
or a 3D surface
surf(Z)
5 comentarios
Cris LaPierre
el 23 de Oct. de 2019
Editada: Cris LaPierre
el 23 de Oct. de 2019
I'm pretty sure this plot was created using the code
plot(Z(:))
Here, the values of X represent the index of the data point. The command Z(:) turns the entire array into a one-column vector. You can see that syntax described in this doc page. What that means is all the columns were placed head-to-tail. There are 71*38 data points, or 2698.
desert_scientist90
el 23 de Oct. de 2019
2 comentarios
Cris LaPierre
el 23 de Oct. de 2019
Yes, learning requires some practice. If you are brand new, have you gone through MATLAB Onramp? It might help introduce you in a guided, incremental way.
Cris LaPierre
el 23 de Oct. de 2019
I'm afraid I don't know enough about your data to tell you how you should combine the values to get a single line of data for all 38 years.
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!