is this the proper way to convert your axis and graphs to square microns?

1 回表示 (過去 30 日間)
Chanille
Chanille 2023 年 3 月 5 日
コメント済み: Voss 2023 年 3 月 6 日
So I want to plot the graph in units of square microns, which I tried to do by calculating the area of each zone in square microns. I tried multiplying the area of each zone in pixels by the conversion factor, which i looked up and I think the conversion factor is the square of the pixel size in microns.
Assuming that the pixel size is 1 square micron:
% Define the pixel size in square microns
pixelSize = 1;
for m = 1 : numfiles
...
% Calculate the radius of each zone in pixels
radius = linspace(0, maxDistance, numZones+1);
area = diff(pi*radius.^2); % Area of each zone in pixels
% Convert area from pixels to square microns
area = area * pixelSize;
...
% Plot the profile
subplot(2, 2, 3);
plot(area, profileCounts, 'LineWidth', 2);
xlabel('Area (\mum^2)', 'FontSize', fontSize);
ylabel('Counts', 'FontSize', fontSize);
title('Counts/', 'FontSize', fontSize);
grid on;
end
So I tried to calculate the area of each zone in pixels using the diff function, which I THINK computes the differences between adjacent elements of a vector then I convert the area from pixels to square microns by multiplying it by the pixel size pixelSize. Is this correct?

採用された回答

Voss
Voss 2023 年 3 月 5 日
Seems ok, assuming that each zone is an annulus and that all zones are concentric.
  2 件のコメント
Chanille
Chanille 2023 年 3 月 6 日
@Voss Thank you big Voss. i appreicate it.
Voss
Voss 2023 年 3 月 6 日
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by