A question about usage of ndgrid
2 views (last 30 days)
Show older comments
Hello,
I am relatively new to MATLAB so would like to know if there is a way to invoke the ndgrid function with a set of values rather than a range, as specified in the documentation? For instance, if I had to plot five dimensions with five values like 0.5 0.3 0.675 0.987 0.1100, would I be able to do it with ndgrid? Alternatively, is there any other MATLAB function that could help me to generate a grid plot for n random data dimensions?
Greatly appreciate your thoughts.
TIA Vinod
0 Comments
Answers (1)
Walter Roberson
on 19 Apr 2014
Yes, no problem. ndgrid does not ever really take ranges: the examples you look at are using operators that create sets of values from ranges and pass those sets into ndgrid.
[A, B, C, D, E] = ndgrid([0.5 0.3 0.675 0.987 0.1100]);
3 Comments
Walter Roberson
on 19 Apr 2014
How do you want the 4th and 5th dimensions to be represented on the plot? Use color for the 4th dimension, and time (animation) for the 5th dimension?
See Also
Categories
Find more on 2-D and 3-D 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!