Sysquake for LaTeX and the @ sign

7 views
Skip to first unread message

fromSpain

unread,
Feb 16, 2008, 2:25:00 PM2/16/08
to Sysquake
Hi all
I've been enjoying Sysquake but I'm consistently running into the
problem that using the @ seems to halt sysquake processing.
In one instance it works:
fplot(@sin,[-pi,pi],'r');
plots the sin function, no problem. But, if I try
fplot(@(x) x^2,[-pi,pi],'r');
it does not work and neither does
fplot(@x x^2,[-pi,pi],'r');
....???
BTW, it also doesn't work when applied in an fzero command, ...
any ideas?

jose

fromSpain

unread,
Feb 22, 2008, 6:08:30 AM2/22/08
to Sysquake
Hi all
I've been able to solve most of my problems by putting the function
definitions in a separate file which I call using the "use" command.
Nevertheless, I'm still getting problems with the @, e.g.
x = fzero(@(x) x^3-8,[0.100])

Does anybody else have this problem?
Thankx

jose

Yves Piguet

unread,
Feb 22, 2008, 6:26:41 AM2/22/08
to Sysquake
On Feb 22, 12:08 pm, fromSpain <almohab...@gmail.com> wrote:
> Nevertheless, I'm still getting problems with the @, e.g.
> x = fzero(@(x) x^3-8,[0.100])
>
> Does anybody else have this problem?

Not me. The following file works for me:

\documentclass[11pt]{report}
\usepackage{sysquake}
\begin{document}
\begin{sysquake}
x = fzero(@(x) x^3-8,[0.100])
\end{sysquake}
\end{document}

The typeset result is "x = 2".

Btw, you don't need brackets around 0.100. Do you mean [0,100] ? But
in this case, the result is the same anyway.

Yves

fromSpain

unread,
Feb 24, 2008, 2:09:59 PM2/24/08
to Sysquake
Thankx Yves, unfortunately it didn't work.
1) I did mean [0,100] but that wasn't the problem
2) this is what I did:
a) created test.tex with the code you suggest:
\documentclass[11pt]{report}
\usepackage{sysquake}
\begin{document}
\begin{sysquake}
x = fzero(@(x) x^3-8,[0,100])
\end{sysquake}
\end{document}
b) run pdflatex test.tex -enable-write18
c) I run the pdflatex command 5 times just to make sure

d) the output I get is:
This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.7)
entering extended mode
(test.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, dumylang,
nohyphenation, ge
rman, ngerman, french, loaded.
("C:\Program Files\Ofimatica\MikTeX\tex\latex\base\report.cls"
Document Class: report 2005/09/16 v1.4f Standard LaTeX document class
("C:\Program Files\Ofimatica\MikTeX\tex\latex\base\size11.clo"))
("C:\Program Files\Ofimatica\SysquakeForLaTeX\TexFiles\tex\latex
\sysquake.sty"
Sysquake for LaTeX
Calerga Sarl <http://www.calerga.com>
("C:\Program Files\Ofimatica\MikTeX\tex\latex\tools\verbatim.sty")
No file test.lmeout.
) (test.aux) [1{C:/Documents and Settings/All Users/Datos de programa/
MiKTeX/2.
7/pdftex/config/pdftex.map}] (test.aux) )<C:/Program Files/Ofimatica/
MikTeX/fon
ts/type1/bluesky/cm/cmbx10.pfb><C:/Program Files/Ofimatica/MikTeX/
fonts/type1/b
luesky/cm/cmr10.pfb>
Output written on test.pdf (1 page, 7725 bytes).
Transcript written on test.log.

e) the test.lme file contains:
_pragma line 4
sqlxstartfragment('i',-1,-1);
x = fzero(@(x) x^3-8,[0,100])
sqlxendfragment('i');

f) Just to make sure I edited the test.tex file so that it does a
simple calculation:
\documentclass[11pt]{report}
\usepackage{sysquake}
\begin{document}
\begin{sysquake}
x = 4^4
\end{sysquake}
\end{document}

The output was fine: x = 256

Do you have any idea what might be going on?
Thankx

jose
PS: I'm using the MikTeX 2.7 distribution (I had the 2.6 and also had
the same problems) for pdflatex and the latest sysquake for Latex
Reply all
Reply to author
Forward
0 new messages