Plotting 3D surface for a variable dependent on 2 variables but the 2 variables are not monotically increasing function
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sandeep Nair
am 17 Okt. 2020
Beantwortet: Walter Roberson
am 17 Okt. 2020
Can anyone help me in plotting a surface for a function which is dependent on two independent variables but the two independent variables are not monotically
increasing variable.Hence am facing issue in plotting the dependent variable based on independent variable.Can somebody please help
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 17 Okt. 2020
N = 100;
xvec = linspace(min(FirstIndependent), max(FirstIndependent), N);
yvec = linspace(min(SecondIndependent), max(SecondIndependent), N);
[X, Y] = ndgrid(xvec, yvec);
F = scatteredInterpolant(FirstIndependent(:), SecondIndependent(:), Dependent(:));
Z = F(X, Y);
surf(X, Y, Z);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!