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

Sensitivity Plots in MATLAB

  1. Sep 6, 2005 #1
    I wish to use a for loop i already made and replace a number with a variable defined as a range of numbers, then plot the max of another function that used the function with the new variable.

    How would I do this?


    x = [0:.5:1]
    r = 5*x
    t = 3/r

    new program:

    x = same
    n = [0:.25:.5]
    r = n*x
    t = 3/r

    for each value of n, i want to plot the cooresponding t, and plot n vs t
    Last edited: Sep 6, 2005
  2. jcsd
  3. Sep 7, 2005 #2
    I do not understand what it is you want to do. However your new program does not work. Try
    x = [0:.5:1]
    n = [0:.25:.5]
    r = n.*x
    t = 3./r

    One of your r's will of course be zero, so you have a small problem with one t. if you want to plot it
  4. Sep 7, 2005 #3
    yes, i know about mtimes

    it was simply an example. i guess i want to graph the max t at each x.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Sensitivity Plots in MATLAB
  1. Plotting in matlab (Replies: 0)

  2. MATLAB plots (Replies: 1)

  3. Matlab Plot (Replies: 2)

  4. Plotting in MATLAB (Replies: 8)

  5. Plotting with MATLAB (Replies: 1)