Converting an array slicer to Python
6 ビュー (過去 30 日間)
表示 古いコメント
I have this code in MATLAB (attached below) and wondered how I'd go about converting it to Python seeing as it keeps giving me an error "TypeError: only integer scalar arrays can be converted to a scalar index"
l0= -200
hi = 20
x = ones(27000, 1);
udata = ones(27000, 10);
x1 = x((x>lo)&(x<hi));
u1 = udata((x>lo)&(x<hi), :);
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!