Counting lines on the y axis

조회 수: 1 (최근 30일)
Eliot Sperling
Eliot Sperling 2018년 2월 7일
댓글: Jan 2018년 2월 16일
Hey, I want to count the lines on the y axis using the variables (A,B,C). Does anyone have a algorithm to do this with Matlab 2015?
Thanks
  댓글 수: 1
Jan
Jan 2018년 2월 7일
The question is not clear. Which lines on what kind of y axis? And how do 3 variables, especially with the names A,B,C help to solve this?

댓글을 달려면 로그인하십시오.

답변 (4개)

abuzer
abuzer 2018년 2월 7일
hi, Convert your data to binary image, and than you can count edges.
  댓글 수: 2
Eliot Sperling
Eliot Sperling 2018년 2월 14일
Hey, I want the algorithm to do it automatically
Jan
Jan 2018년 2월 14일
@Eliot: Even if you do it automatically, the question is still not clear.

댓글을 달려면 로그인하십시오.


Eliot Sperling
Eliot Sperling 2018년 2월 15일
Hey, I have three variables, A, B, C. each variable is a long list of numbers on Excel. If I plot these variables, they have let's say four y axis lines, the lines go up on the y axis. do you know a algorithm that automatically out the vertical y axis lines and then display it. Example, x=4 if there are 4 lines.
  댓글 수: 1
Jan
Jan 2018년 2월 16일
@Eliot: This is not clear: "each variable is a long list of numbers on Excel". If they are "on Excel", your question is off-topic in a Matlab forum. I assume, that it does not matter, if the "list" (maybe a "vector"?) is "long". But it does matter, what "they have let's say four y axis lines" means. Unfortunately this detail is not explained.

댓글을 달려면 로그인하십시오.


Eliot Sperling
Eliot Sperling 2018년 2월 15일
remember, i have matlab 2015
  댓글 수: 1
Jan
Jan 2018년 2월 16일
@Eliot: Please do not post information, which helps to understand the question, in the section for answers. Insert the to the original question, where the readers expect to find all required details.

댓글을 달려면 로그인하십시오.


Star Strider
Star Strider 2018년 2월 15일
I still have no idea what you’re asking.
See if one of these works for you:
x = 1:10;
y = rand(1, 10);
figure(1)
plot(x, y)
ytix = get(gca, 'YTick') % Values Of Y-Ticks
ytixnumber = numel(ytix) % Number Of Y-Ticks
figure(2)
plot(x, y)
ytix = get(gca, 'YTick'); % Values Of Y-Ticks
newytix = linspace(min(ytix), max(ytix), 4); % Define New Values For Y-Ticks, Set Number Of Y-Ticks To 4
newytixlabels = regexp(sprintf('%.2f\n',newytix), '\n','split'); % Format New Values For Y-Ticks
set(gca, 'YTick',newytix, 'YTickLabel',newytixlabels(1:end-1)) % Set New Values & Labels For Y-Ticks

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by