Hi,
This release contains an important thread-safety bug fix to
SpecialMath. It affects only the beta and gamma function-related
methods. To gain a performance advantage when calling the beta/gamma
functions from different threads, you should try to arrange it so that
calls with the same (p,q) degrees occur in the same thread.
Regards,
Mark
Hi Mark:
Did you figure out what the problem is?? Is it a bug or am I using
wrong classes & methods?
Thanks
Pavan
--- In jsci@yahoogroups.com, Mark Hale <mj_hale@...> wrote:
>
> Hi,
>
> Yes, you are using the right method. It could be a
> bug. I'll look into it.
>
> Regards,
>
> Mark
>
>
> --- avspavan <pavan@...> wrote:
>
> > Hi:
> >
> > I am using Jsci package to parse mathml (Convert
> > mathml to JSci
> > objects). This works fine for the mathml document
> > that has only one
> > set of <apply> tags. I have explained taking two
> > math expressions below:
> >
> > For example: x^2
> >
> > Its mathml form:
> >
> > "<apply>
> > <power/>
> > <ci>x</ci>
> > <cn type='integer'>2</cn>
> > </apply>
> > </annotation-xml>
> > </semantics>
> > </math>"
> >
> > and: exp(x^2)
> >
> > Its mathml form:
> >
> > "<apply>
> > <power/>
> > <exponentiale/>
> > <apply>
> > <power/>
> > <ci>x</ci>
> > <cn type='integer'>2</cn>
> > </apply>
> > </apply>
> > </annotation-xml>
> > </semantics>
> > </math>"
> >
> > The x^2 expression is parsed well and good. But when
> > it comes to
> > exp(x^2) expression it parses only the inner most
> > <apply> tagged math
> > form. So in second form only x^2 is parsed. The
> > exponential
> > information is lost.
> >
> > Could someone help me in using the right functions
> > to parse the
> > complete mathml form??
> >
> > I have posted the code below ( Thanks to herbert for
> > the help!!!)
> >
> >
> > Thanks in advance
> > Pavan
> >
> >
> >
> > public static void main(String[] args) throws
> > SAXNotRecognizedException, SAXNotSupportedException
> > {
> > MathMLParser parser = new MathMLParser();
> >
> > try {
> >
> >
> >
>
parser.parse("D:\\Purdue_project\\ProjectsFrom14thJuly20061.40PM\\PharmaInformat\
ics\\test.xml");
> > //System.out.println("This is the
> > parser.toString() output" +
> > parser.toString());
> > //System.out.println("This is the
> > translate.toString() output" +
> > parser.translateToJSciObjects());
> >
> >
> > } catch (Exception e) {
> > System.out.println(e.getMessage());
> > }
> >
> >
> > Object parseList[] =
> > parser.translateToJSciObjects();
> >
> >
> > Object list[] = parser.translateToJSciCode();
> >
> > System.out.println("This is the length of the list
> > "+ list.length);
> > System.out.println("This is the length of the
> > Parse list "+
> > parseList.length);
> >
> > for(int i=0;i<list.length;i++){
> > System.out.println("This is in list " +
> > list[i].toString());
> > }
> >
> >
> >
> > for (int i = 0; i < parseList.length; i++) {
> > JSci.io.MathMLExpression test =
> > (JSci.io.MathMLExpression)
> > parseList[i];
> >
> >
> > System.out.println("This is test.evaluate()"
> > +test.evaluate());
> > System.out.println("This is test.getOperation() "
> > +test.getOperation());
> > System.out.println("This is test.getArgument()
> > "+test.getArgument(1).toString());
> > System.out.println("This is test.getClass()
> > "+test.getClass());
> > System.out.println("This is test.length()
> > "+test.length());
> > System.out.println("This is test.toString()
> > "+test.toString());
> > System.out.println("This is hashCode "
> > +test.hashCode());
> >
> >
> >
> > }
> > }
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
>
>
> ___________________________________________________________
> Copy addresses and emails from any email account to Yahoo! Mail -
quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
>
Hi,
Yes, you are using the right method. It could be a
bug. I'll look into it.
Regards,
Mark
--- avspavan <pavan@...> wrote:
> Hi:
>
> I am using Jsci package to parse mathml (Convert
> mathml to JSci
> objects). This works fine for the mathml document
> that has only one
> set of <apply> tags. I have explained taking two
> math expressions below:
>
> For example: x^2
>
> Its mathml form:
>
> "<apply>
> <power/>
> <ci>x</ci>
> <cn type='integer'>2</cn>
> </apply>
> </annotation-xml>
> </semantics>
> </math>"
>
> and: exp(x^2)
>
> Its mathml form:
>
> "<apply>
> <power/>
> <exponentiale/>
> <apply>
> <power/>
> <ci>x</ci>
> <cn type='integer'>2</cn>
> </apply>
> </apply>
> </annotation-xml>
> </semantics>
> </math>"
>
> The x^2 expression is parsed well and good. But when
> it comes to
> exp(x^2) expression it parses only the inner most
> <apply> tagged math
> form. So in second form only x^2 is parsed. The
> exponential
> information is lost.
>
> Could someone help me in using the right functions
> to parse the
> complete mathml form??
>
> I have posted the code below ( Thanks to herbert for
> the help!!!)
>
>
> Thanks in advance
> Pavan
>
>
>
> public static void main(String[] args) throws
> SAXNotRecognizedException, SAXNotSupportedException
> {
> MathMLParser parser = new MathMLParser();
>
> try {
>
>
>
parser.parse("D:\\Purdue_project\\ProjectsFrom14thJuly20061.40PM\\PharmaInformat\
ics\\test.xml");
> //System.out.println("This is the
> parser.toString() output" +
> parser.toString());
> //System.out.println("This is the
> translate.toString() output" +
> parser.translateToJSciObjects());
>
>
> } catch (Exception e) {
> System.out.println(e.getMessage());
> }
>
>
> Object parseList[] =
> parser.translateToJSciObjects();
>
>
> Object list[] = parser.translateToJSciCode();
>
> System.out.println("This is the length of the list
> "+ list.length);
> System.out.println("This is the length of the
> Parse list "+
> parseList.length);
>
> for(int i=0;i<list.length;i++){
> System.out.println("This is in list " +
> list[i].toString());
> }
>
>
>
> for (int i = 0; i < parseList.length; i++) {
> JSci.io.MathMLExpression test =
> (JSci.io.MathMLExpression)
> parseList[i];
>
>
> System.out.println("This is test.evaluate()"
> +test.evaluate());
> System.out.println("This is test.getOperation() "
> +test.getOperation());
> System.out.println("This is test.getArgument()
> "+test.getArgument(1).toString());
> System.out.println("This is test.getClass()
> "+test.getClass());
> System.out.println("This is test.length()
> "+test.length());
> System.out.println("This is test.toString()
> "+test.toString());
> System.out.println("This is hashCode "
> +test.hashCode());
>
>
>
> }
> }
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy
and free. http://uk.docs.yahoo.com/trueswitch2.html
Hi,
The zip file distribution contains a basic developers
guide as well as the API.
Regards,
Mark
--- avspavan <pavan@...> wrote:
> Hi:
>
> Is there a documentation available for Jsci
> packages?? I use the API
> online but if there is any other documentation/help
> files available
> that will be very useful.
>
> Thanks
> Pavan
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
___________________________________________________________
Yahoo! Messenger - with free PC-PC calling and photo sharing.
http://uk.messenger.yahoo.com
Hi:
Is there a documentation available for Jsci packages?? I use the API
online but if there is any other documentation/help files available
that will be very useful.
Thanks
Pavan
Hi:
I am using Jsci package to parse mathml (Convert mathml to JSci
objects). This works fine for the mathml document that has only one
set of <apply> tags. I have explained taking two math expressions below:
For example: x^2
Its mathml form:
"<apply>
<power/>
<ci>x</ci>
<cn type='integer'>2</cn>
</apply>
</annotation-xml>
</semantics>
</math>"
and: exp(x^2)
Its mathml form:
"<apply>
<power/>
<exponentiale/>
<apply>
<power/>
<ci>x</ci>
<cn type='integer'>2</cn>
</apply>
</apply>
</annotation-xml>
</semantics>
</math>"
The x^2 expression is parsed well and good. But when it comes to
exp(x^2) expression it parses only the inner most <apply> tagged math
form. So in second form only x^2 is parsed. The exponential
information is lost.
Could someone help me in using the right functions to parse the
complete mathml form??
I have posted the code below ( Thanks to herbert for the help!!!)
Thanks in advance
Pavan
public static void main(String[] args) throws
SAXNotRecognizedException, SAXNotSupportedException {
MathMLParser parser = new MathMLParser();
try {
parser.parse("D:\\Purdue_project\\ProjectsFrom14thJuly20061.40PM\\PharmaInformat\
ics\\test.xml");
//System.out.println("This is the parser.toString() output" +
parser.toString());
//System.out.println("This is the translate.toString() output" +
parser.translateToJSciObjects());
} catch (Exception e) {
System.out.println(e.getMessage());
}
Object parseList[] = parser.translateToJSciObjects();
Object list[] = parser.translateToJSciCode();
System.out.println("This is the length of the list "+ list.length);
System.out.println("This is the length of the Parse list "+
parseList.length);
for(int i=0;i<list.length;i++){
System.out.println("This is in list " + list[i].toString());
}
for (int i = 0; i < parseList.length; i++) {
JSci.io.MathMLExpression test = (JSci.io.MathMLExpression)
parseList[i];
System.out.println("This is test.evaluate()" +test.evaluate());
System.out.println("This is test.getOperation() "
+test.getOperation());
System.out.println("This is test.getArgument()
"+test.getArgument(1).toString());
System.out.println("This is test.getClass() "+test.getClass());
System.out.println("This is test.length() "+test.length());
System.out.println("This is test.toString() "+test.toString());
System.out.println("This is hashCode " +test.hashCode());
}
}
--- In jsci@yahoogroups.com, Mark Hale <mj_hale@...> wrote:
>
> It could be a numerical instability problem, post the
> actual matrix so I can take a look.
>
Thank you for replying my message.
Here is one example I get NaN as the result of determinant.
a 3 by 3 matrix of 1s.
1.0 1.0 1.0
1.0 1.0 1.0
1.0 1.0 1.0
Thanks a lot
It could be a numerical instability problem, post the
actual matrix so I can take a look.
--- taiji810327 <zhoufeng0116@...> wrote:
> Hello, everyone in this group.
> I encoutered a square matrix determinant problem on
> 1 October and
> posted a message to get some help on that date.
> Until now, I am still
> not quite sure why sometimes I get NaN. Could
> someone please give me
> an answer for that?
> Thanks a lot.
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
___________________________________________________________
All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.
http://uk.docs.yahoo.com/nowyoucan.html
Hello, everyone in this group.
I encoutered a square matrix determinant problem on 1 October and
posted a message to get some help on that date. Until now, I am still
not quite sure why sometimes I get NaN. Could someone please give me
an answer for that?
Thanks a lot.
Pavan (Akkisetty Venkata Sai Pavan Kumar) wrote:
> I am not sure if evaluate( )-mathod will do non-numeric evaluations. I
> see that your mathml is non-numeric in nature (I mean symbolic).
> This is the output I get if I use Mathematica to interpret your mathml.
Ok, that was a confusing example. The following should be possible to compute:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<sum/>
<bvar><ci>i</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>100</cn></uplimit>
<apply>
<power/>
<cn>2</cn>
<ci>i</ci>
</apply>
</apply>
</math>
Now there's an exception: "Exception in thread "main"
java.lang.ClassCastException: java.lang.String"
> I am also trying to use JSci to convert mathml to Jsci objects. Can you
> send me an example code if you have any?? I couldn't understand how to
> use MathMLDOMimpl library.
Yes, it's really difficult to see how the library works.
import JSci.mathml.MathMLApplyElementImpl;
import JSci.io.MathMLExpression;
public class TestJSci {
/**
* @param args
*/
public static void main(String[] args) {
JSci.io.MathMLParser parser = new JSci.io.MathMLParser();
try {
parser.parse("test.mml");
} catch (Exception e) {
System.out.println(e.getMessage());
}
Object parseList[] = parser.translateToJSciObjects();
for (int i = 0; i < parseList.length; i++) {
JSci.io.MathMLExpression test = (JSci.io.MathMLExpression) parseList[i];
System.out.println(test.evaluate());
System.out.println(test.getOperation());
}
}
}
Regards, Herbert
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
I am not sure if evaluate( )-mathod will do non-numeric evaluations. I
see that your mathml is non-numeric in nature (I mean symbolic).
This is the output I get if I use Mathematica to interpret your mathml.
I am also trying to use JSci to convert mathml to Jsci objects. Can you
send me an example code if you have any?? I couldn't understand how to
use MathMLDOMimpl library.
-Pavan
Herbert Kluge wrote:
Pavan (Akkisetty Venkata Sai Pavan Kumar) wrote:
As far as I understand, this(mathml) is just the representation of the (math)information. There is no solver attached to it. You have to send this information to a solver to get the calculation made.
Pavan (Akkisetty Venkata Sai Pavan Kumar) wrote:
> As far as I understand, this(mathml) is just the representation of the
> (math)information. There is no solver attached to it. You have to send
> this information to a solver to get the calculation made.
But a MathML equation just with <times/>, <plus/>, <minus/>, ... can be
computed with the evaluate()-method.
Am I wrong or is the computation of <sum/> missing?
Regards,
Herbert
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
hi Mark:
Are there any examples available for this implementation? (Mathml to
JSci Objects)?? I didn't find any such example in JSci package.
Thanks
Pavan
Mark Hale wrote:
>
> Hi,
>
> jsci-mathmlimpl is an implementation of the DOM MathML API. There is
> also a higher level JSci.io.MathMLParser which converts the DOM API
> directly into JSci objects. See documentation/JSci.io.html for more
> information. What you need to do is write a converter from the DOM, or
> the JSci objects into the Matlab API/representation.
>
> XML -> DOM (-> JSci) -> Mathlab
>
> I´m not familar with the matlab API, so I don´t know what sort of
> object representation it has. But at a guess, I assume it can evaluate
> matlab strings, something like matlabEval("5^2+4"), so you probably
> need to convert the MathML DOM into the matlab textual representation,
> and send it to the matlab evaluation engine.
>
> ----- Original Message ----
> From: avspavan <pavan@... <mailto:pavan%40purdue.edu>>
> To: jsci@yahoogroups.com <mailto:jsci%40yahoogroups.com>
> Sent: Monday, 27 November, 2006 5:49:30 PM
> Subject: [jsci] Mathml to Java Classes
>
> Hi:
>
> I am interested in sending mathml to Matlab through Java and solving
> the equations. But matlab inherently doesn't understand Mathml.
>
> I have come across the package (Jsci-mathmlimpl) which seems like will
> help me. I would like to know what exactly it does as I couldn't find
> any example that shows conversion of mathml to java objects?! Can Jsci
> convert given mathml to Java objects?? If so I think there are ways to
> make Matlab understand these Java objects and solve the equations and
> get the answer.
>
> Thanks
> Pavan
>
> Yahoo! Groups Links
>
> Send instant messages to your online friends
> http://uk.messenger.yahoo.com <http://uk.messenger.yahoo.com>
>
>
--
********************************************************************************\
*
Pavan (Akkisetty Venkata Sai Pavan Kumar)
Graduate Research Assistant
2008 FRNY Chemical Engineering
Purdue University
Office Phone:765-494-4083
310 N.Salisbury, Apt 3
West Lafayette
Indiana-47906
Cell Phone:765-413-8559
Hi Herbert:
As far as I understand, this(mathml) is just the representation of the
(math)information. There is no solver attached to it. You have to send
this information to a solver to get the calculation made.
Pavan
Herbert Kluge wrote:
> Hello!
>
> Why is the computation of a sum not working?
>
> <math xmlns="http://www.w3.org/1998/Math/MathML">
> <apply>
> <sum/>
> <bvar><ci>i</ci></bvar>
> <lowlimit><cn>0</cn></lowlimit>
> <uplimit><cn>100</cn></uplimit>
> <apply>
> <power/>
> <ci>x</ci>
> <ci>i</ci>
> </apply>
> </apply>
> </math>
>
> Did I made a fault or is the computation of sums not implemented yet?
>
> Regards, Herbert
>
>
>
>
>
>
>
>
> ___________________________________________________________
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
http://mail.yahoo.de
>
>
>
> Yahoo! Groups Links
>
>
>
>
--
********************************************************************************\
*
Pavan (Akkisetty Venkata Sai Pavan Kumar)
Graduate Research Assistant
2008 FRNY Chemical Engineering
Purdue University
Office Phone:765-494-4083
310 N.Salisbury, Apt 3
West Lafayette
Indiana-47906
Cell Phone:765-413-8559
Hello!
Why is the computation of a sum not working?
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<sum/>
<bvar><ci>i</ci></bvar>
<lowlimit><cn>0</cn></lowlimit>
<uplimit><cn>100</cn></uplimit>
<apply>
<power/>
<ci>x</ci>
<ci>i</ci>
</apply>
</apply>
</math>
Did I made a fault or is the computation of sums not implemented yet?
Regards, Herbert
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
http://mail.yahoo.de
Hi!
Thank you for your answer. I read this document. If the translation is
successful is there any chance to get the type of the elements without
testing with instanceof against every type?
Regards,
Herbert
Mark Hale wrote:
> Hi,
>
> The MathMLParser can translate MathML into Java JSci objects or code, i.e.
> <cn>45</cn> ---> new MathDouble(45)
>
> There is some information in the jsci guide, documentation/jsci.io.html.
>
> No, not really, jscience is something similar but separate.
>
>
> ----- Original Message ----
> From: herbertkluge <herbertkluge@...>
> To: jsci@yahoogroups.com
> Sent: Monday, 4 December, 2006 12:15:15 PM
> Subject: [jsci] MathMLParser
>
>
> Hello!
>
> What's the MathMLParser for? Are there any further information?
>
> Sincerely yours, Herbert
>
> P.S. Is there any relationship to jscience.org?
>
>
>
>
> Yahoo! Groups Links
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
>
>
> Yahoo! Groups Links
>
>
>
>
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Hi,
jsci-mathmlimpl is an implementation of the DOM MathML API. There is also a
higher level JSci.io.MathMLParser which converts the DOM API directly into JSci
objects. See documentation/JSci.io.html for more information. What you need to
do is write a converter from the DOM, or the JSci objects into the Matlab
API/representation.
XML -> DOM (-> JSci) -> Mathlab
I´m not familar with the matlab API, so I don´t know what sort of object
representation it has. But at a guess, I assume it can evaluate matlab strings,
something like matlabEval("5^2+4"), so you probably need to convert the MathML
DOM into the matlab textual representation, and send it to the matlab evaluation
engine.
----- Original Message ----
From: avspavan <pavan@...>
To: jsci@yahoogroups.com
Sent: Monday, 27 November, 2006 5:49:30 PM
Subject: [jsci] Mathml to Java Classes
Hi:
I am interested in sending mathml to Matlab through Java and solving
the equations. But matlab inherently doesn't understand Mathml.
I have come across the package (Jsci-mathmlimpl) which seems like will
help me. I would like to know what exactly it does as I couldn't find
any example that shows conversion of mathml to java objects?! Can Jsci
convert given mathml to Java objects?? If so I think there are ways to
make Matlab understand these Java objects and solve the equations and
get the answer.
Thanks
Pavan
Yahoo! Groups Links
Send instant messages to your online friends http://uk.messenger.yahoo.com
Hi,
The MathMLParser can translate MathML into Java JSci objects or code, i.e.
<cn>45</cn> ---> new MathDouble(45)
There is some information in the jsci guide, documentation/jsci.io.html.
No, not really, jscience is something similar but separate.
----- Original Message ----
From: herbertkluge <herbertkluge@...>
To: jsci@yahoogroups.com
Sent: Monday, 4 December, 2006 12:15:15 PM
Subject: [jsci] MathMLParser
Hello!
What's the MathMLParser for? Are there any further information?
Sincerely yours, Herbert
P.S. Is there any relationship to jscience.org?
Yahoo! Groups Links
Send instant messages to your online friends http://uk.messenger.yahoo.com
Hi,
The mathml DOM implementation in JSci, I believe, can parse them. That is you
can access them from the DOM tree. But the high-level JSci object parser doesn´t
currently support them. Mainly because the JSci package currently lacks object
representations of ODEs and PDEs. So, XML -> MathML DOM is ok, but currently not
MathML DOM -> JSci objects.
Regards,
Mark
----- Original Message ----
From: avspavan <pavan@...>
To: jsci@yahoogroups.com
Sent: Thursday, 30 November, 2006 1:33:10 PM
Subject: [jsci] Mathml Parser for PDEs/ODEs
Hi:
I have my mathinfo of PDEs(Partial Differential Equations) and
ODEs(Ordinary Differential Equations) in mathml. Can this be parsed
using the existing Jsci framework? I dont see the PDE/ODE mathml nodes
parsed in the existing JSci MathmlParser. Please let me know if this
is possible.
Thanks
Pavan
Yahoo! Groups Links
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy
and free. http://uk.docs.yahoo.com/trueswitch2.html
Hi:
I have my mathinfo of PDEs(Partial Differential Equations) and
ODEs(Ordinary Differential Equations) in mathml. Can this be parsed
using the existing Jsci framework? I dont see the PDE/ODE mathml nodes
parsed in the existing JSci MathmlParser. Please let me know if this
is possible.
Thanks
Pavan
Hi:
I am interested in sending mathml to Matlab through Java and solving
the equations. But matlab inherently doesn't understand Mathml.
I have come across the package (Jsci-mathmlimpl) which seems like will
help me. I would like to know what exactly it does as I couldn't find
any example that shows conversion of mathml to java objects?! Can Jsci
convert given mathml to Java objects?? If so I think there are ways to
make Matlab understand these Java objects and solve the equations and
get the answer.
Thanks
Pavan
Hi,
Thanks for your email. There exists the following methods for changing the
number formatting (defined in Graph2D):
setNumberFormat (all axes)
setXNumberFormat
setYNumberFormat
Regards,
Mark
----- Original Message ----
From: damiaan_persyn <damiaan.persyn@...>
To: jsci@yahoogroups.com
Sent: Friday, 17 November, 2006 5:00:09 PM
Subject: [jsci] DecimalFormat
Hi;
let me first thank you for this great piece of software, I'm enjoing
testing its possibilities and learning some Java in the course.
Being new at Java this question is probably really dumb, but anyway...
I was trying to get two numbers after the decimal point in a
linegraph, in stead of one. (My data consists of stock option prices,
which tick mostly by 0.05 or 0.01 cents, so that's why.)
My approach so far:
1/ unpacked the jsci-xtra.jar file
2/ downloaded Graph2D.java from cvs and changed line 37 to
protected NumberFormat xNumberFormat = new DecimalFormat("##0.00");
in stead of
protected NumberFormat xNumberFormat = new DecimalFormat("##0.0");
3/ made a new classfile running javac Graph2D.java
4/ ran "jar cf jsci-xtra.jar Jsci", copied the new jsci-xtra.jar file
to /usr/share/java (which is in my $CLASSPATH).
5/ recompiled my applet, restarted my browser.
As this all didn't work started deleting stuff from the ~/.java cache,
robooted, did the above for JGraph2D.java as well, changed all
appearances of .0f to .00f... but all to no good.
So am I wrong in how I changed the code, in the recompilation, or is
there maybe some annoying cache issue keeping the old jar's in use?
Btw, why did I had to change line 28 in Graph2D.java to "public" to
get it compile?
(public Graph2D.DataMarker dataMarker = Graph2D.DataMarker.NONE;)
This number formatting seems pretty hard-coded. I guess a
method for setting it would be a nice feature (at least for me :)
Many thanks,
Damiaan
Yahoo! Groups Links
Send instant messages to your online friends http://uk.messenger.yahoo.com
Hi;
let me first thank you for this great piece of software, I'm enjoing
testing its possibilities and learning some Java in the course.
Being new at Java this question is probably really dumb, but anyway...
I was trying to get two numbers after the decimal point in a
linegraph, in stead of one. (My data consists of stock option prices,
which tick mostly by 0.05 or 0.01 cents, so that's why.)
My approach so far:
1/ unpacked the jsci-xtra.jar file
2/ downloaded Graph2D.java from cvs and changed line 37 to
protected NumberFormat xNumberFormat = new DecimalFormat("##0.00");
in stead of
protected NumberFormat xNumberFormat = new DecimalFormat("##0.0");
3/ made a new classfile running javac Graph2D.java
4/ ran "jar cf jsci-xtra.jar Jsci", copied the new jsci-xtra.jar file
to /usr/share/java (which is in my $CLASSPATH).
5/ recompiled my applet, restarted my browser.
As this all didn't work started deleting stuff from the ~/.java cache,
robooted, did the above for JGraph2D.java as well, changed all
appearances of .0f to .00f... but all to no good.
So am I wrong in how I changed the code, in the recompilation, or is
there maybe some annoying cache issue keeping the old jar's in use?
Btw, why did I had to change line 28 in Graph2D.java to "public" to
get it compile?
(public Graph2D.DataMarker dataMarker = Graph2D.DataMarker.NONE;)
This number formatting seems pretty hard-coded. I guess a
method for setting it would be a nice feature (at least for me :)
Many thanks,
Damiaan
Every square matrix should have its determinant. However, when I use
the det() method in class DoubleSquareMatrix, I sometimes get NaN. For
instance, if I ask for the determinant of a 3 by 3 matrix of 1s, I get
NaN. Is there any special settings?
Cheers
OK, thanks, I will make a note in the javadocs.
----- Original Message ----
From: alkottke <alkottke@...>
To: jsci@yahoogroups.com
Sent: Friday, 25 August, 2006 5:23:42 PM
Subject: [jsci] Re: inverse Fourier Transform
Turns out it is easy to create a transfer function using the other
notation, just use the conjugate.
--- In jsci@yahoogroups.com, "alkottke" <alkottke@...> wrote:
>
> Hello,
>
> So I found out the issue. Matlab uses -2pi in the transform and 2pi
> in the inverse, whereas JSci uses 2pi in the transform and -2pi in the
> inverse transform. If I recall correctly, the difference between +/-
> 2pi is a matter of convention, but I don't know how to create a
> transfer function in the frequency domain when the -2pi convention is
> applied. Mathworld also uses the -2pi transform, 2pi inverse
> convention: http://mathworld.wolfram.com/FourierTransform.html
>
> --- In jsci@yahoogroups.com, Mark Hale <mj_hale@> wrote:
> >
> > Hi,
> >
> > As the data is increasing positive, increasing negative then you
> don't need the first initial sort, ie inverseTransform(data), if you
> want the output in sequential time order, then you need the last sort,
> ie sort(inverseTransform(data)).
> >
> > If you still have problems, send me some test data and a screen
> shot of the results in matlab.
> >
> > Regards,
> >
> > Mark
> >
> >
> > ----- Original Message ----
> > From: alkottke <alkottke@>
> > To: jsci@yahoogroups.com
> > Sent: Thursday, 24 August, 2006 8:22:58 PM
> > Subject: [jsci] inverse Fourier Transform
> >
> > I had some problems getting the inverse Fourier Transform to work. I
> > have a Fourier Amplitude Spectrum (FAS) that with increasing positive
> > frequencies, the Nyquist frequency, and the increasing negative
> > frequencies. I tried using sort(inverseTransform(sort(...))) to
> > compute the time history, but the results don't make any sense. I
> > also tried with and without the both of the sort() commands. Which is
> > appropriate?
> >
> > Right now I decided to use another FFT library because the results
> > that it produces match the results I compute using matlab. However, I
> > would like to use JSci to simplify the libraries.
> >
> > Can anyone explain to me how to properly use inverseTransform()?
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
>
Yahoo! Groups Links
Turns out it is easy to create a transfer function using the other
notation, just use the conjugate.
--- In jsci@yahoogroups.com, "alkottke" <alkottke@...> wrote:
>
> Hello,
>
> So I found out the issue. Matlab uses -2pi in the transform and 2pi
> in the inverse, whereas JSci uses 2pi in the transform and -2pi in the
> inverse transform. If I recall correctly, the difference between +/-
> 2pi is a matter of convention, but I don't know how to create a
> transfer function in the frequency domain when the -2pi convention is
> applied. Mathworld also uses the -2pi transform, 2pi inverse
> convention: http://mathworld.wolfram.com/FourierTransform.html
>
> --- In jsci@yahoogroups.com, Mark Hale <mj_hale@> wrote:
> >
> > Hi,
> >
> > As the data is increasing positive, increasing negative then you
> don't need the first initial sort, ie inverseTransform(data), if you
> want the output in sequential time order, then you need the last sort,
> ie sort(inverseTransform(data)).
> >
> > If you still have problems, send me some test data and a screen
> shot of the results in matlab.
> >
> > Regards,
> >
> > Mark
> >
> >
> > ----- Original Message ----
> > From: alkottke <alkottke@>
> > To: jsci@yahoogroups.com
> > Sent: Thursday, 24 August, 2006 8:22:58 PM
> > Subject: [jsci] inverse Fourier Transform
> >
> > I had some problems getting the inverse Fourier Transform to work. I
> > have a Fourier Amplitude Spectrum (FAS) that with increasing positive
> > frequencies, the Nyquist frequency, and the increasing negative
> > frequencies. I tried using sort(inverseTransform(sort(...))) to
> > compute the time history, but the results don't make any sense. I
> > also tried with and without the both of the sort() commands. Which is
> > appropriate?
> >
> > Right now I decided to use another FFT library because the results
> > that it produces match the results I compute using matlab. However, I
> > would like to use JSci to simplify the libraries.
> >
> > Can anyone explain to me how to properly use inverseTransform()?
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
>