plotting surface as function of two variables
1 view (last 30 days)
Show older comments
I have a code that is a function of two variables below: How can I loop through the values of rpf and x and plot the function rdf as a surface?
I want to add something like this to my code below:
for rpf = 0:0.01:1
for x = 1:0.01:2
end
end
but how do I actually plot all this data?
close all; clear; clc;
rpf = 0:0.01:1;
x = 1:0.01:2;
function rdf = g(x,rpf)
rdf = x/((1+C(rpf)*(x-1)).^3);
end
function C_function = C(rpf)
B1 = 1.90322581;
B2 = 2.13209879;
B3 = -2.45289889;
C_function = (1.0+rpf*(B1+rpf*(B2+rpf*B3)))/(3.0*(1-rpf));
end
0 Comments
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots 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!