Function findpeaks freezes Matlab

I have an issue with the function findpeaks from the signal processing toolbox. Suddenly, it stopped working and each time it is run, it freezes Matlab (2017b, 2018a). The codes work fine on another machine. Reinstallation of the toolbox/Matlab software doesn't help. Would be grateful for any ideas what happened!

6 commentaires

Is it possible some other custom function with the same name is masking it? Could you check
which findpeaks
and see if it still points to the toolbox version?
HTH
Hi, it still does, no other custom function with the same name.
C:\Program Files\MATLAB\R2018a\toolbox\signal\signal\findpeaks.m
Greg Dionne
Greg Dionne le 4 Juin 2018
Does it happen when you assign a result, or only when you call it without arguments (making a plot)? Also, how big is the input vector?
It happens both when I call it with arguments and without.
[P,I] = findpeaks(line,'MinPeakHeight',threshold,'MinPeakDistance',mpd);
the line vector is pretty small: 1x3000
Chris Turnes
Chris Turnes le 4 Juin 2018
Can you post the data set that you are using? This may help us to reproduce the issue.
Thanks everyone for help. Seems it was some issue with printer connection. After 30 minutes of running findpeaks, Matlab displayed that message:
Warning: Printer startup is taking a long time. Check whether your default printer is online. Or set your
default printer to print to PDF.

Connectez-vous pour commenter.

Réponses (1)

Pengfei Chen
Pengfei Chen le 31 Oct 2018

1 vote

change your default printer under control panel will fix this problem.

1 commentaire

Michele Facchinelli
Michele Facchinelli le 14 Fév 2019
Modifié(e) : Michele Facchinelli le 14 Fév 2019
Another customer has reported that this step does indeed work.
The issue seems to be related to the printer settings. These other steps may be useful:
Please re-install your printer drivers to the newest version. If this still does not work please try these other workarounds:
  1. Remove the printer from your list of devices in your control panel. The printer would be located in the Devices and Printers control panel for most Windows OS's.
  2. End the print spooler/driver process inside of your Task manager and start MATLAB.
  3. Change your default printer to another printer, or to the generic printer that Windows automatically creates.

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by