Plotting specific data points from a vector/double

41 ビュー (過去 30 日間)
Matthew Peoples
Matthew Peoples 2021 年 5 月 11 日
回答済み: Walter Roberson 2021 年 5 月 11 日
Hello there,
I hage a 1 256 double/vector with a histogram distribution of values from 0 to 255 (representing the frequency of certain color pixels in a greyscale image). Essentially, I need to remove the plot points at 105 and 106 i.e. plot 1:104 and 107:255 on the same graph. Any ideas on how to do this? I am getting errors trying:
plot(face_orig(1:104, 107:255));
% I also tried below, but it didn't give the correct result
plot(face_orig(1:104)); hold on; plot(face_orig(107:225)); hold off;

採用された回答

Walter Roberson
Walter Roberson 2021 年 5 月 11 日
plot(face_orig([1:104, 107:255]));
However, this would give you a result as-if the entry at 107 were from 105. You should more likely do something like
x = [1:104, 107:255];
plot(x, face_orig(x))

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by