How can I change a simple matlab code to python
2 次查看(过去 30 天)
显示 更早的评论
n = 1000;
std = 1;
x = std.*randn(n,1);
figure(1)
plot(x,'.')
grid on ;
histogram(x,50)
y = cos(x);
figure(2)
plot(y,'.' );
grid on ;
figure(3)
histogram(y,50)
y_mean = mean(y)
y_variance = var(y)
0 个评论
回答(1 个)
jessupj
2022-1-20
learn python, and probably the numpy library.. this isn't the place for help with that.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!