Hey all - this is my first post on the forum but I've browsed for help for a really long time on other topics. Any help would be greatly appreciated!(adsbygoogle = window.adsbygoogle || []).push({});

So I have a function, called stability.m that takes in two independent variables, say x and y, as input and outputs either a 1 or a 0 for each pairing of x and y. I would like to set up a plot as x versus y that plots each pairing as a colored dot (simply all 1's = black and all 0's = red, for instance). I would more or less rather like a grid/matrix so I can easily see what each possible pairing would represent for broad ranges of x and y (IE, x and y = 1x100 vectors).

I was wondering if this is even possible. I have read through tons of tutorials regarding mesh plots, scatter plots, etc and have found most to say that functions of two variables can only be plotted on a 3d graph. Is this true?

Thanks for the help

- etothex

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB Plot function of two variables on 2D Grid

Loading...

Similar Threads for MATLAB Plot function |
---|

MATLAB Plotting Coordinate Transformations in Matlab |

MATLAB Plotting animations (time-evolution) |

MATLAB Does anyone had this plotting problem with MATLAB? |

MATLAB Matlab's plot command |

MATLAB Matlab -- how to make a smooth contour plot? |

**Physics Forums | Science Articles, Homework Help, Discussion**