フィルターのクリア

How do I find the function corresponding to a graph image?

51 ビュー (過去 30 日間)
Karam Chehade
Karam Chehade 2020 年 4 月 7 日
編集済み: Mehmed Saad 2020 年 4 月 8 日
Dear MATLAB community,
I am trying to find the mathematical function corresponding to the following green curve (although I would be most thankful for suggestions for the blue one also). Unfortunately, I don't have the underlying data with which it was created. Can anyone help?
Thanks a lot in advance!
  1 件のコメント
darova
darova 2020 年 4 月 7 日
DO you have any ideas? Attempts?

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

採用された回答

Mehmed Saad
Mehmed Saad 2020 年 4 月 7 日
Extract Data
After that you can find mathematical function
  4 件のコメント
Karam Chehade
Karam Chehade 2020 年 4 月 8 日
Thanks a lot! Could you tell me how you converted it, in case I need to repeat the work with another file?
Mehmed Saad
Mehmed Saad 2020 年 4 月 8 日
編集済み: Mehmed Saad 2020 年 4 月 8 日
This is the code, but you have to convert the picture to this format i.e. remove the other parts ( i used microsoft word for that xD)
this is a long method, i copied this code i don't remeber from where
fullFileName ='C:\Users\PROJECT PC\Pictures\data1.png';
rgbImage = imread(fullFileName);
rgbImage = imresize(rgbImage,10);
[rows, columns, numberOfColorBands] = size(rgbImage);
fontSize = 36
subplot(2, 2, 1);
imshow(rgbImage);
axis on;
title('Original Color Image', 'FontSize', fontSize);
set(gcf, 'Units', 'Normalized', 'Outerposition', [0, 0, 1, 1]);
greenChannel = rgbImage(:, :, 2);
binaryImage = greenChannel < 200;
%
subplot(2, 2, 2);
imshow(binaryImage);
axis on;
title('Binary Image', 'FontSize', fontSize);
verticalProfile = sum(binaryImage, 2);
lastLine = find(verticalProfile, 1, 'last')
for col = 1 : columns
yy = lastLine - find(binaryImage(:, col), 1, 'first');
if isempty(yy)
y(col) = 0;
else
y(col) = yy;
end
end
subplot(2, 2, 3);
plot(1 : columns, y, 'b-', 'LineWidth', 3);
grid on;
title('Y vs. X', 'FontSize', fontSize);
ylabel('Y', 'FontSize', fontSize);
xlabel('X', 'FontSize', fontSize);
%%
y2 = y(174:5213);
t = 0:1/length(y2):1-1/length(y2);
y_norm = y2/max(y2);
figure,plot(t(1:100:end),y_norm(1:100:end))

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by