Surf plot is black
古いコメントを表示
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)')
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Blocked Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


