- If your data is consistent and you know where some data for a variable is missing, try using interpolation functions (‘interp1’ or ‘interp2’ as per your requirement) which would help you to fill in the missing values and make the vectors to be of equal length.
- Fill the missing data points with ‘NaN’ to make the vectors of equal length and then plot it.
2D Graph Map
1 回表示 (過去 30 日間)
古いコメントを表示
Good afternoon. I have to do a graphic where the x,y data are the temperature and the energy, and the z is the intensity of a signal at that temperature/energy point. Problem is, i don't know how to do it properly becouse the three vectors don't have the same lenght.
0 件のコメント
回答 (1 件)
Prajit T R
2018 年 2 月 8 日
Hi Federico,
I understand that you are trying to plot a graph with three vectors x,y and z with different lengths. As far as I know, the usage of the ‘plot’ function or ‘surf’ function is not supported when you have vectors with differing lengths.
I can suggest two possible workarounds for this:
I hope this workaround helps.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!