[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46910] Octave hangs and does not respond when
From: |
Shri |
Subject: |
[Octave-bug-tracker] [bug #46910] Octave hangs and does not respond when trying to print plots |
Date: |
Fri, 15 Jan 2016 19:49:01 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:43.0) Gecko/20100101 Firefox/43.0 |
URL:
<http://savannah.gnu.org/bugs/?46910>
Summary: Octave hangs and does not respond when trying to
print plots
Project: GNU Octave
Submitted by: theillusiveman
Submitted on: Fri 15 Jan 2016 19:49:00 GMT
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Crash
Status: None
Assigned to: None
Originator Name: Shri
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: Microsoft Windows
_______________________________________________________
Details:
Octave hangs and crashes when trying to save a particular plot that I needed.
I can see the graph, but as soon as the saveas command is used, it hangs. The
code is provided here and attached as well (along with the required data):
clear all;
close all;
clc;
pkg load optim;
path='PSD_Data_1\';
files=dir(sprintf('%s*.mat',path));
[r1,c1]=size(files);
fs=3000;
curveorder=1;
load(sprintf('%s%s',path,files(1).name));
l=length(data);
nfft=2^nextpow2(l);
f=0:fs/nfft:fs/2;
f2=f(2:end);
freqspec=abs(fft(data,nfft));
freqspec=freqspec(1:nfft/2+1);
powspec=1/(fs*nfft)*abs(freqspec).^2;
powspec(2:end-1)=2*powspec(2:end-1);
powspecdb=10*log10(powspec);
[alpha,c,rmsval]=expfit(curveorder,f(1),(fs/nfft),powspecdb);
curveval=(-exp(alpha*f))*c;
figure
semilogx(f,curveval);
hold on;
semilogx(f,powspecdb);
curvecoeff=polyfit(f',powspecdb,1);
curveval2=polyval(curvecoeff,f');
grid on;
hold off;
figure
semilogx(f,curveval2);
hold on
semilogx(f,powspecdb);
grid on;
hold off;
print(1,'PleaseDoNotCrash.png');
Additional Info: Octave 4.0.0, Windows 7 SP1 64 Bits.
N.B: Tried it with a few others, did not crash. Crashes with this particular
code.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 15 Jan 2016 19:49:00 GMT Name: testscr.m Size: 804B By:
theillusiveman
The code and data used to reproduce the issue.
<http://savannah.gnu.org/bugs/download.php?file_id=36050>
-------------------------------------------------------
Date: Fri 15 Jan 2016 19:49:00 GMT Name: PSD_Data_1.zip Size: 27kB By:
theillusiveman
The code and data used to reproduce the issue.
<http://savannah.gnu.org/bugs/download.php?file_id=36051>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46910>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #46910] Octave hangs and does not respond when trying to print plots,
Shri <=