plotting surface as function of two variables
2 views (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
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);
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));
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!