필터 지우기
필터 지우기

Is there a way in MATLAB to automatically recognize a pattern from the plotted signals? or automatically count the number of peaks? and after that take a decision

조회 수: 6 (최근 30일)
i have a code which record sound and plot it, and i want a way to automaticlly recognize the plotted figure and take a decision.
  댓글 수: 1
John D'Errico
John D'Errico 2023년 1월 7일
Computers are not super intelligent beings that can read your mind and know what you might want to do. Ok, yes they are in some movies. But not in real life. This means you need to program them to do what you want. They will do nothing automatically, unless you write the code.
So given a figure, you must have the numbers you plotted to create the figure. (Yes, you can extract the data from a MATLAB figure. But WHY? If you created the figure, you have the data already.) So use tools like findpeaks to identify the peaks. Then write the code to count the number of peaks found. That takes nothing more then using a tool like numel.
Automatically recognizing a pattern is far more complex, because it is far too vague a description. People automatically recognize things they think to be patterns all the time, and they are often proved to be completely wrong.

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

답변 (1개)

Image Analyst
Image Analyst 2023년 1월 7일
I'm not sure if there is a built-in way to do it. Some people might suggest cross correlation or normalized cross correlation and look for high signal values but that's not robust since you can get a high signal just because one signal is much higher than the other in some spot.
One way might be to use the median absolute deviation, mad, as you slide your test pattern along your reference signal.
Evidently you didn't read the Community Guidelines. If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by