How can I change a simple matlab code to python

조회 수: 1 (최근 30일)
Debelaw Kediro
Debelaw Kediro 2022년 1월 20일
댓글: Debelaw Kediro 2022년 1월 20일
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)

답변 (1개)

jessupj
jessupj 2022년 1월 20일
learn python, and probably the numpy library.. this isn't the place for help with that.

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by