[Scilab-users] discrete cosine transform
grivet
grivet at cnrs-orleans.fr
Fri Aug 9 14:11:23 CEST 2013
Hello,
I have found a strange and, for me annoying, behavior of the dct funtion
(discrete cosine transform). A minimal example follows.
clear;
imax1 = 128; imax2 = 64;
sig = rand(imax1,imax2);
for i1 = 1:imax1
sig1(i1,:) = fft(sig(i1,:));
end
for i2 = 1:imax2
spc(:,i2) = dct(real(sig1(:,i2)),"dct1");
end
This program executes without a hitch; however, it fails when I choose
imax1 = imax2 (whatever the value), with error message
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dct" function.
Save your data and restart Scilab.
end
!--error 115
Problème de pile détecté pendant une boucle.
Une fonction primitive a été appelée avec un nombre erroné d'arguments
de sortie.
Aucun test sur les arguments de sortie n'a pu être effectué dans cette
fonction.
Veuillez rapporter ce bug :
http://bugzilla.scilab.org/
at line 9 of exec file called by :
exec(%fileToExec); disp(msprintf(gettext("Execution done.
while executing a callback
i find it surprising that Scilab's behavior is somewhat random: the
error message is not always the same and a fresh Scilab can
behave differently than when is runs the program several times in a row.
I have also seen the following message
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dct" function.
Save your data and restart Scilab.
!--error 10000
L'affectation d'une chaîne de caractères dans une matrice de nombres
n'est pas implémentée.
at line 7 of function %c_i_s called by :
spc(:,i2) = dct(real(sig1(:,i2)),"dct1");
at line 10 of exec file called by :
exec(%fileToExec); disp(msprintf(gettext("Execution done.\n"))
while executing a callback
I would be grateful to learn about a workaround.
Thank you in advance
JP Grivet
More information about the users
mailing list