How can I get desired plot results from equation?
Show older comments
input is "initialFraction"
k(1) = initialFraction; % Fraction of liver mass remaining (N)
tStart = 0;
tEnd = 300;
n = 5;
m = 0:n;
N1 = k(1) + ((1-k(1)))./(((K)*t)*exp(m));
figure(1)
plot(t, N1, 'linewidth',2)
title('Hill Function');xlabel('Time');ylabel('Fraction of liver mass remaining');
legend('N','location','eastOutside')
set(gca,'fontsize',18,'linewidth',2); box off;
I am attempting to create a hill function that will plot from the input value up to 1 in order to represent complete liver mass reproduction. How can I change the values of "K" and "m" to create the desired visual plot?
1 Comment
jgg
on 19 Jul 2016
I don't understand what you're trying to do: are you trying to make a 3D plot of your N1 values against m and K? What does t do in this case?
The easiest way is usually to write a function:
N1 = @(m,K)(k(1) + ((1-k(1)))./(((K)*t)*exp(m)));
which takes the values you want then compute it for different combinations of your values, which is easy with meshgrid. You can then plot the values of the function evaluates at the mesh points.
Answers (0)
Categories
Find more on Grid Lines, Tick Values, and Labels 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!