3D Contour Plot with 3-independent variables.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a 3 Factor, 2 Level Experiment. I am trying to plot my regression model vs. Each Factor. I want X-axis to be my first Factor, Y-axis to be my second factor, and z-axis to be my third Factor. Then my regression model will be indicated by color. Is this possible? I know I can set one of my variables to it's average and plot with 2 factors and my output regression model, however I have to do this for three times, and It would be nice to have one 3d contour plot with all 3 independent variables.
1 Commento
Stefan Raab
il 21 Ott 2015
If you have a vector x (nx1) for your factor 1 and a vector y (mx1) for your factor 2 you can use the function [X,Y] = meshgrid(x,y); which will return a matrix X of dimension mxn (x-vector repeated m times) and a matrix Y of dimension mxn (y-vector repeated n times). You will also need a mxn matrix Z for your 3rd factor, where z11 is the value for x1 and y1, z12 is the value for x2 and y1, z1n is the value for xn and y1 and so on. Then you can plot the surface with the function surf(X,Y,Z);
Risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!