Changeset 135 for trunk/examples


Ignore:
Timestamp:
Nov 10, 2005, 7:45:00 PM (19 years ago)
Author:
dkearney
Message:

1) fixed children function in c++'s library module so users can now
search for children by type.
2) adjusted bindings dictionary module for storing lib's to allow caller
to set the key of the value being stored.
3) removed old targets for rappture_interface.o and rappture_fortran.o
from makefile
4) renamed matlab and octave binding functions names to match the module
they came from.
5) adjusted matlab/octave example in examples/app_fermi/matlab
6) added matlab and octave search paths environment variables to
gui/apps/rappture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/app-fermi/matlab/fermi_rp.m

    r122 r135  
    11% ----------------------------------------------------------------------
    2 %  EXAMPLE: Fermi-Dirac function in Matlab.
     2%  EXAMPLE: Fermi-Dirac function in Octave.
    33%
    4 %  This script represents a legacy application that will be left
    5 intact, but wrapped with a Rappture interface.
     4%  This script represents a newly written application with rappture
     5bindings and interface.
    66%
    77% ======================================================================
     
    2121% retrieve user specified data out of the input file
    2222% convert values to correct units.
    23 Ef = rpGetString(lib,"input.number(Ef).current");
    24 [Ef,err] = rpConvertDbl(Ef,"eV");
    25 T = rpGetString(lib,"input.number(temperature).current");
    26 [T,err] = rpConvertDbl(T,"K");
     23Ef = rpLibGetString(lib,"input.number(Ef).current");
     24[Ef,err] = rpUnitsConvertDbl(Ef,"eV");
     25T = rpLibGetString(lib,"input.number(temperature).current");
     26[T,err] = rpUnitsConvertDbl(T,"K");
    2727
    2828% do fermi calculations (science)...
     
    3636% prepare out output section
    3737% label graphs
    38 rpPutString(lib,"output.curve(f12).about.label","Fermi-Dirac Factor",0);
    39 rpPutString(lib,"output.curve(f12).xaxis.label","Fermi-Dirac Factor",0);
    40 rpPutString(lib,"output.curve(f12).yaxis.label","Energy",0);
    41 rpPutString(lib,"output.curve(f12).yaxis.units","eV",0);
     38rpLibPutString(lib,"output.curve(f12).about.label","Fermi-Dirac Factor",0);
     39rpLibPutString(lib,"output.curve(f12).xaxis.label","Fermi-Dirac Factor",0);
     40rpLibPutString(lib,"output.curve(f12).yaxis.label","Energy",0);
     41rpLibPutString(lib,"output.curve(f12).yaxis.units","eV",0);
    4242
    4343for j=1:200
    4444  putStr = sprintf('%12g  %12g\n', f(j), E(j));
    4545  % put the data into the xml file
    46   rpPutString(lib,"output.curve(f12).component.xy",putStr,1);
     46  rpLibPutString(lib,"output.curve(f12).component.xy",putStr,1);
    4747end
    4848
    4949% signal the end of processing
    50 rpResult(lib);
     50rpLibResult(lib);
Note: See TracChangeset for help on using the changeset viewer.