signal processing commands
Modérateur : xcasadmin
Re: signal processing commands
Sorry, I should have been more precise, I added sound_ as prefix, not sound, please replace {sound by {sound_
[Edit] Details now works!
I think it's time to release a 1.5.0-3, I hope tomorrow.
[Edit] Details now works!
I think it's time to release a 1.5.0-3, I hope tomorrow.
Re: signal processing commands
No problem, here's the corrected file.
- Pièces jointes
-
- signalprocessing-doc_fix4.zip
- (8.24 Kio) Téléchargé 164 fois
-
- Messages : 2
- Inscription : mer. oct. 04, 2017 8:02 pm
Re: signal processing commands
When building giac 1.5.0-21 with libsamplerate 0.1.9 and gcc 7.3 I get this error:
maybe because data.data_in is declared as a const float*.
Code : Tout sélectionner
signalprocessing.cc: In function 'giac::gen giac::_resample(const giac::gen&, const giac::context*)':
signalprocessing.cc:637:77: error: assignment of read-only location '*(data.SRC_DATA::data_in + ((sizetype)(((long unsigned int)((i * nc) + j)) * 4)))'
data.data_in[i*nc+j]=_evalf(chdata[j][i],contextptr).DOUBLE_val();
^
Re: signal processing commands
Indeed, const was missing in version 0.1.8. It's not data_in that should be allocated but a temporary float* instead. I'll fix that.
Re: signal processing commands
I committed a fix in my source at github here: https://github.com/marohnicluka/giac (the changed file is signalprocessing.cc, but the last revision also contains some fixes to graph theory manual and graphtheory.cc).
It should work now.
It should work now.
Re: signal processing commands
Hi!
You forgot to remove the code parts that are now in desolve.cc
cascmd_en.tex has changed, with the addition of Jay new 2d graphic section, I have merged the 2 files. Same for aide_cas.
Unstable tarball updated.
You forgot to remove the code parts that are now in desolve.cc
cascmd_en.tex has changed, with the addition of Jay new 2d graphic section, I have merged the 2 files. Same for aide_cas.
Unstable tarball updated.
Re: signal processing commands
Indeed, thanks for the reminder! I have updated my source just now (optimization .cc/.h, cascmd_en.tex, aide_cas). Please let me know if there's anything else to update.
Re: signal processing commands
Everything seems synchronized, thanks!
Re: signal processing commands
Hello,
I fixed several examples for some of my commands in aide_cas, there were some leading spaces missing so they weren't pasted correctly when clicked on. Fixes committed to my source.
I fixed several examples for some of my commands in aide_cas, there were some leading spaces missing so they weren't pasted correctly when clicked on. Fixes committed to my source.
Re: signal processing commands
Hello Bernard,
I have coded some new commands for signal processing:
1. boxcar, rect (rectangular function), tri (triangular function) and sinc (cardinal sine function), since they are often used;
2. fourier and ifourier, which compute continuous Fourier transforms;
3. convolution command can now accept real functions too, in which case it computes continuous convolution by integrating over the real line.
To enable computing Fourier transforms of unknown functions, I have added the command addtable which allows storing Fourier/Laplace transform pairs, such as f(x) -> F(s). I will also try to modify laplace command in that respect.
Changed files are signalprocessing.cc/h.
The updated aide_cas and cascmd_en.tex are in doc directory. I have put entries for fourier/ifourier in the "Fourier Transformation" chapter, the other commands are described in "Signal processing".
Finally, I have fixed some more bugs in extrema command, it is now prone to segfaults. Please update optimization.cc too.
I have coded some new commands for signal processing:
1. boxcar, rect (rectangular function), tri (triangular function) and sinc (cardinal sine function), since they are often used;
2. fourier and ifourier, which compute continuous Fourier transforms;
3. convolution command can now accept real functions too, in which case it computes continuous convolution by integrating over the real line.
To enable computing Fourier transforms of unknown functions, I have added the command addtable which allows storing Fourier/Laplace transform pairs, such as f(x) -> F(s). I will also try to modify laplace command in that respect.
Changed files are signalprocessing.cc/h.
The updated aide_cas and cascmd_en.tex are in doc directory. I have put entries for fourier/ifourier in the "Fourier Transformation" chapter, the other commands are described in "Signal processing".
Finally, I have fixed some more bugs in extrema command, it is now prone to segfaults. Please update optimization.cc too.
Re: signal processing commands
Thanks! It's now integrated in giac unstable.
Re: signal processing commands
Thank you! I have just added two more files in my repository, markup.cc/h. These contain routines for exporting to LaTeX and to presentation/content MathML. I'm aware that these features already exist in Giac, but I tried to improve them. These routines try to export to standard mathematical notation and typesetting whenever possible, keeping usage of parentheses at minimum. Could you please include these files to the Giac source tree in unstable version (I don't know how to do it) and use export_latex routine in _latex command (tex.cc) for inputs other than graphics and spreadsheets? That way I could easily test these algorithms and fix bugs if any.
Some details:
1. export_latex produces a string representing a math expression in LaTeX. amsmath and amssymb are required to typeset it. Using it as the standard LaTeX export would improve typesetting for interactive sessions in TeXmacs, for example.
2. export_mathml_presentation should work as an improved version of _mathml routine.
3. export_mathml_content exports to content MathML using OpenMath content dictionaries when possible. This could help applications which communicate with Giac through pipes to understand Giac expressions.
4. export_mathml produces a MathML block containing:
<semantics><PRESENTATION MATHML><annotation-xml><CONTENT MATHML></annotation-xml><annotation><GIAC PRINT></annotation></semantics>
Some details:
1. export_latex produces a string representing a math expression in LaTeX. amsmath and amssymb are required to typeset it. Using it as the standard LaTeX export would improve typesetting for interactive sessions in TeXmacs, for example.
2. export_mathml_presentation should work as an improved version of _mathml routine.
3. export_mathml_content exports to content MathML using OpenMath content dictionaries when possible. This could help applications which communicate with Giac through pipes to understand Giac expressions.
4. export_mathml produces a MathML block containing:
<semantics><PRESENTATION MATHML><annotation-xml><CONTENT MATHML></annotation-xml><annotation><GIAC PRINT></annotation></semantics>
Re: signal processing commands
Could you replace front() and back() call on strings with [0] and [s.size()-1]? Otherwise it does not compile with old gcc.
Re: signal processing commands
For inclusion in _latex, the best is probably that you declare a function returning false if you have some unsupported object (like a symbolic of sommet at_pnt), something like
bool has_improved_latex_export(const gen &g, string & s, GIAC_CONTEXT);
then I can insert in latex
...
if (has_improved_latex_export(g,s,contextptr)) return gen2string(s,false);
// old code
return string2gen(gen2tex(g,contextptr),false);
bool has_improved_latex_export(const gen &g, string & s, GIAC_CONTEXT);
then I can insert in latex
...
if (has_improved_latex_export(g,s,contextptr)) return gen2string(s,false);
// old code
return string2gen(gen2tex(g,contextptr),false);
Re: signal processing commands
Done! I have also renamed markup.cpp to markup.cc.