plotting surface as function of two variables

조회 수: 1 (최근 30일)
Benjamin
Benjamin 2019년 3월 26일
편집: Benjamin 2019년 3월 26일
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개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by