what is the equivalent of 'improfile' in octave?

4 ビュー (過去 30 日間)
BA
BA 2022 年 7 月 27 日
回答済み: the cyclist 2022 年 7 月 27 日
imshow(matrix(:,:,1))
%identify axes
[x, y] = ginput(2);
% preallocate matrices
cog = zeros(size(matrix,3),1);
% loop start
for i = 1:size(matrix,3)
I = matrix(:,:,i);
%what to do to make this code works in octave
test = improfile(I,[x(1) x(2)],[y(1) y(2)]);
cog(i) = sum((1:length(test)).*test')/sum(test);
% loop end
end
scog = (cog - min(cog)) / (max(cog) - min(cog));

採用された回答

the cyclist
the cyclist 2022 年 7 月 27 日
This Octave wiki page suggests that the improfile function is missing from Octave.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOctave についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by