Sensitivity Plots in MATLAB

  • MATLAB
  • Thread starter physicsCU
  • Start date
202
1

Main Question or Discussion Point

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?

example:

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:

Answers and Replies

80
0
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
plot(t,n)
 
202
1
yes, i know about mtimes

it was simply an example. i guess i want to graph the max t at each x.
 

Related Threads for: Sensitivity Plots in MATLAB

  • Last Post
Replies
8
Views
5K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
1
Views
8K
  • Last Post
Replies
1
Views
7K
  • Last Post
Replies
6
Views
104K
  • Last Post
Replies
7
Views
3K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
2
Views
2K
Top