NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
November 15, 2019, 11:09:54 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"The mind is its own place, and in itself, can make heaven of Hell, and a hell of Heaven." ..."John Milton(1608-1674, English Poet)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: function plot  (Read 19110 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3083



WWW
«
Embed this message
on: October 07, 2006, 01:33:59 pm »

You can use this applet to draw y(x) or x(t),y(t) function plot
-*-

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1792


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: September 03, 2007, 11:14:42 pm »

can enable the load ejs applet xml file ?

i trying to learn how to make a quadratic equation  Grin

thanks
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3083



WWW
«
Embed this message
Reply #2 on: September 05, 2007, 12:17:38 am »

Sorry! I forgot to upload the xml file. It is done. You should be able to load it now.
I am working on another EJS web  interface so that it will be easy to read the EJS source (without loading the java and show similar interface). May be add editable function later on. It is a work in progress.
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1792


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: September 05, 2007, 12:46:21 am » posted from:Singapore,,Singapore

the current system you have is good, i have learned much here.

will give back to the community here  Grin

thanks
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1792


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: September 05, 2007, 01:21:44 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

strange, is the xml file working ?


Generating simulation file
  D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java ...
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:331: <identifier> expected
  public javax.swing.JPanel Y(x);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:331: ')' expected
  public javax.swing.JPanel Y(x);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:336: <identifier> expected
  public javax.swing.JLabel Y(x)=;
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:336: ')' expected
  public javax.swing.JLabel Y(x)=;
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:349: <identifier> expected
  public javax.swing.JPanel X(t),Y(t);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:349: ')' expected
  public javax.swing.JPanel X(t),Y(t);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:355: <identifier> expected
  public javax.swing.JLabel X(t);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:355: ')' expected
  public javax.swing.JLabel X(t);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:360: <identifier> expected
  public javax.swing.JLabel Y(t);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:360: ')' expected
  public javax.swing.JLabel Y(t);
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:558: illegal start of expression
  Y(x)= = (javax.swing.JLabel)
  ^
D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_apps\_examples\functionplot.app\functionplot.java:644: ';' expected
  X(t),Y(t) = (javax.swing.JPanel)
  ^
12 errors
Compilation produced an error!
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1792


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #5 on: September 05, 2007, 01:29:26 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

i did it!!!

need to rename the the "labels" for the panels.

after changing them, it works!!

think it is due to a stricter naming system employed by EJS 3.46 compared to 3.40.

the trick is look out for () =, the new naming convention in EJS 3.46 disallows Smiley

yeah!!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3083



WWW
«
Embed this message
Reply #6 on: September 06, 2007, 07:26:03 pm »

Ejs use the label for your element to define variable name for the created code.
So please use old standard name convention (beginning with an alphabetic character. and containing letters or numbers only.)

If you define a label as f(x) for a TextField. EJS will generate something like
TextField f(x);
The java will interprete f(x) as a function need to be called (instead of variable name).
That is why it produce error message when compiling the code.
Logged
Pages: [1]   Go Up
  Print  
"The mind is its own place, and in itself, can make heaven of Hell, and a hell of Heaven." ..."John Milton(1608-1674, English Poet)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Basic Function of an Oscilloscope « 1 2 »
Electromagnetics
Fu-Kwun Hwang 44 371627 Last post August 21, 2015, 02:40:05 pm
by aliciad234
Mathematic function F(x), F(y) plot
Examples for beginner who want to learn EJS
Fu-Kwun Hwang 2 16842 Last post December 04, 2015, 05:17:33 pm
by PhyllisGirton
module in Ejs that allow student to initiative inquiry of variables on the plot?
Questions related to EJS
lookang 2 4976 Last post April 09, 2010, 07:52:43 pm
by lookang
function plot
misc
ahmedelshfie 0 3834 Last post May 21, 2010, 06:04:56 pm
by ahmedelshfie
How to plot bode diagram with ejs?
Questions related to EJS
Rosehu 2 4612 Last post November 25, 2010, 10:22:51 pm
by Rosehu
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.054 seconds with 23 queries.since 2011/06/15