ich hab da nen Problem! ich hab da nen Matlab code und den möchte ich gerne in Python haben! Komm aber nicht weiter! Könnt ihr mir helfen?
mein mom. Programm:
Code: Alles auswählen
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
from pylab import *
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
X=[600,700,800];
Y=[30,60,90];
Z= array[[0.3168,0.1638,0.0742]
[0.2843,0.1515,0.04867]
[0.2575,0.1187,0.05717]]
ax.plot_wireframe(X, Y, Z)
plt.show()
Matlab:
Code: Alles auswählen
X=[600,700,800];
Y=[30,60,90];
Z=[0.3168 0.1638 0.0742;
0.2843 0.1515 0.04867
0.2575 0.1187 0.05717];
%% Interpolation
[xi,yi] = meshgrid(600:10:800 ,30:1:90);
zi= interp2(X,Y,Z,xi,yi);
%% Surfaceplot
surf(xi,yi,zi)
shading faceted
xlabel('Temperatur [grad C]');
ylabel('Zeit [min]');
zlabel('Verzug [mm]');
title('Ofen','fontsize',16);
view([112 30]);