Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB plots

  1. Aug 31, 2009 #1
    I want to create a plot of a given function for all x values between negative infinite to negative R (for some given R value). How do I create an array for x so that my plot will include all the x values?
  2. jcsd
  3. Aug 31, 2009 #2
    You can't plot on a range [itex](-\infty,-R)[/itex] since Matlab won't accept Inf or NaN as valid points in the domain of a plot.

    Of course, you can overcome this simply by compactifying the domain of your function to a finite domain, and then plotting the rescaled function over the new domain.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - MATLAB plots Date
Matlab Plotting Coordinate Transformations in Matlab Feb 12, 2018
Matlab Plotting animations (time-evolution) Jan 17, 2018
Does anyone had this plotting problem with MATLAB? Dec 23, 2017
Matlab Matlab's plot command Nov 30, 2017
Matlab Matlab -- how to make a smooth contour plot? Jun 28, 2017