Plotting specific data points from a vector/double

41 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by