Surf plot is black
Afficher commentaires plus anciens
Hello everyone,
I am trying to make a 3D graph using the surf command, but all I get is a black surface. Does anyone know how to fix this? I have uploaded two excel files with the data for y (time) and z (concentration).
d_aem = 0.562*10^(-3);
K_m = 25;
hours = 2.2;
x = linspace(0,d_aem,K_m)';
y = t;
z = c_so4_aem;
figure(9)
surf(x,y,z);
ylabel('Time (s)')
zlabel('Concentration (mol m^-^3)')
title('Concentration of SO_4 in AEM (mol m^-^3)')
[Xq,Yq] = meshgrid((0:d_aem/K_m:d_aem),0:10:3600*hours);
Zq = interp2(x,y,z,Xq,Yq,'linear');
surf(Xq,Yq,Zq);
colorbar
xlabel('Membrane layer (m)')
ylabel('Time (s)')
zlabel('Concentration (mol m^-^3)')
figure(10)
[C,h] = contourf(Xq,Yq,Zq,15);
h.LevelList=round(h.LevelList,0);
clabel(C,h);
colorbar
colormap('Jet')
xlabel('Membrane layer (m)')
ylabel('Time (s)')
title('Concentration of SO_4 in AEM (mol m^-^3)')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Blocked Images dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


