Broncode documentatie MELISSA:
Manual pages matlab modules
ANY2WGS - convert coordinates to WG84 coordinate, truncate if needed
CALL:
WGS = ANY2WGS(crd_in, format)
INPUT:
crd_in: <array of float> coordinates to convert to RD
format: <string> (optional) possible values:
(default) 'RD' - RD coordinates
'E50' -
OUTPUT:
WSG: WGS84 coordinates
<TOOLBOX>
16-Aug-2008 11:08:19
1839 bytes
AnalyseModel - analyse tool voor een gekalibreerd model
CALL:
AnalyseModel(RegressieModel)
INPUT:
RegressieModel: <struct> zie emptystruct('regressie') met het model dat
geanalyseerd moet worden
OUTPUT:
geen directe uitvoer, een scherm wordt geopend met analysetools
<APPLICROOT>\melissa2006\MODELBEHEER
15-Aug-2008 18:45:32
13872 bytes
CalibrateModel - kalibreer een model CALL: [model, comment] = CalibrateModel(db, model) INPUT: C: <struct> met de Melissaconstantes db: model: OUTPUT: model: comment: <string> eventuele foutmelding logbook: <string> commentaar voor logbook See also: db2mat
<APPLICROOT>\melissa2006\MODELBEHEER
09-Oct-2007 22:28:20
4411 bytes
Cell2HtmlTable -
<APPLICROOT>\melissa2006\HULPFUNCTIES
21-Mar-2007 23:34:22
2301 bytes
ComposeDiaList - Make a list of DIA structures that can be displayed in a
Java table.
CALL:
Contents = ComposeDiaList(dialist, fields)
INPUT:
dialist:
Struct array with Donar data blocks, see emptyblok for the format.
fields:
Cellstring, information to be displayed in table, possible values:
- 'Locatiecode','Locatie'
- 'Parameter'
- 'Veldapparaat'
- 'Analysecode'
- 'Tijdstap'
- 'Begindatum'
- 'Einddatum'
OUTPUT:
Contents:
Structure with fields:
- header: Cellstring with columnnames.
- data: Cell array with data.
See also: jacontrol
<TOOLBOX>\diaroutines
18-Aug-2008 12:04:58
2440 bytes
ComposeDirList -
CALL:
Contents = ComposeDirList(dirlist,fields,dateformat)
INPUT:
dirlist:
fields:
dateformat:
OUTPUT:
Contents: <struct> met velden:
header - <cellstring> met kolomnamen
data - <cell array> met data
op grond waarvan een tabel gevuld kan worden
See also: jacontrol
<TOOLBOX>
22-Feb-2008 20:04:54
2577 bytes
ComposeList - genereer de lijst met data voor een bepaalde lijst CALL: Contents = ComposeList(db,type,fields) INPUT: OUTPUT: See also:
<APPLICROOT>\melissa2006\HULPFUNCTIES
18-Jul-2006 08:31:44
1539 bytes
Documentation utilities decomment - remove comments from file dirtree - list all subdirectories (recursive) in struct array doclist - list help documentation contents of directory and all subdirectories preparegif - aid to prepare vector map getcomment - output all comments from file to a character string guitool - utility to abalyze and document GUI's grepedit - grep for string and create menu to acces files showcall - plot graph that displays dependencies between files viewstrct - expand contents of structure in cha array melissadirs- list directories of Melissa version_compare - compare directory trees
<TOOLBOX>\docutool
22-Aug-2001 17:21:48
667 bytes
CrdCnv - convert coordinates
CALL
[crd_out,errorcode] = CrdCnv(crd_type_in,crd_in,crd_type_out)
INPUT
crd_type_in :<string> input coordinate type
crd_in : input coordinates (2 element vector)
crd_type_out:<string> output coordinate type
OUTPUT
crd_out: output coordinates (2 element vector)
errorcode: if error occurs, the errorcode from the C source is
returned
NOTE:
This function calls a mex file
To build:
mcc -x -d build CrdCnv crdcnv_external.c crdcnvmd.c
C prototype
CrdCnvMD ( char crd_type_in[4], long crd_in_1, long crd_in_2,
char crd_type_out[4], long *crd_out_1, long *crd_out_2,
long *error )
<TOOLBOX>
16-Aug-2008 18:47:24
1734 bytes
DefineModel - Definieer een nieuw schattingsmodel
CALL:
RegressieModel = DefineModel(RegressieModel)
INPUT:
RegressieModel: <struct> (optioneel) van het type 'regressie',
zie emptystruct('regressie')
RegressieModel kan leeg zijn of reeds
aangemaakt
OUTPUT:
RegressieModel: <struct> van het type 'regressie', zie
emptystruct('regressie')
RegressieModel is leeg als operatie is
afgebroken
See also: modelbeheer
<APPLICROOT>\melissa2006\MODELBEHEER
21-Jul-2008 07:54:34
27857 bytes
DiaInspector - start de DiaInspector applicatie CALL: DiaInspector(dia, ADVANCED) INPUT; dia: <struct> (optioneel) ADVANCED: <boolean> (optioneel) true -> activeer spectrum analyse menu OUTPUT: geen uitvoer
<APPLICROOT>\DIAINSPECTOR
29-Jul-2008 18:27:34
127419 bytes
DisplayModel - display model characteristics
<APPLICROOT>\melissa2006\MODELBEHEER
02-Apr-2007 12:35:34
2094 bytes
E2NE - genereer lege NE reeksen als kopieen van de E reeksen gedefinieerd
door index
CALL:
db = E2NE(db, index)
INPUT:
db: <undoredo object> met de centrale Melissa database
C: <struct> met de Melissa constantes
index: <vector of int> de te kopieren E reeksen uit de database db.blok
OUTPUT:
db: <undoredo object> met de centrale Melissa database
<leeg> als afgebroken
<APPLICROOT>\melissa2006\GETIJBEHEER
11-Feb-2007 23:19:16
1277 bytes
GetRowStatus -
CALL:
rowstatus = GetRowStatus(C, status)
INPUT:
C: <struct> met Melissa constanten, gebruikt worden de constante
waarden voor de status zoals C.OK, C.HIAAT,
C.ONBETROUWBAAR, C.MSWINTERP en C.NONOBSERVED
status: <double> met status van waarnemingen (waarden komen voor in de
constantes)
OUTPUT:
rowstatus: <uint8> vector met de de geagregeerde status van iedere rij
van de matrix met de status
<APPLICROOT>\melissa2006\FUNCTIES
10-Oct-2007 20:30:44
1210 bytes
GetTimeIndex - bepaal de index van posities van de dia in de tijdas
CALL:
[index isfound] = GetTimeIndex(taxis, dia)
INPUT:
taxis: <vector of datenum>
dia: <struct> zie emptyblok
OUTPUT:
index: <vector in integer> met de plaatsen van de met de dia
corresponderende elementen in de tijdas
See also: db2mat, mat2db, emptyblok
<APPLICROOT>\melissa2006\HULPFUNCTIES
22-Mar-2007 18:25:02
662 bytes
JarResources - importeer een jar archief met images, deze images kunnen op hun beurt weer geimporteerd worden met de methode 'getGifObject' CALL: jar = JarResources(jarname) INPUT: jarname: <string> naam van het te importeren jar archief OUTPUT: jar: <java object> nl.modelit.utils.jar.JarResources
<APPLICROOT>\Melissa2006
06-Aug-2006 10:48:14
481 bytes
MelissaDia2Blok - converteer Melissa element "dia" naar Donar "blok"
element
CALL:
blok = MelissaDia2Blok(dia)
INPUT:
dia: <struct> een Melissa element "dia"
OUTPUT:
blok: <struct> Donar "blok"
<APPLICROOT>\melissa2006\HULPFUNCTIES
01-Oct-2007 18:17:42
763 bytes
ModelbeheerListAction - Handel commandos af die te maken hebben met de
lijst met modellen in het modelbeheer scherm
CALL:
ModelbeheerListAction(obj,event,hlist,mode)
INPUT:
obj: <handle> van aanroepende uicontrol
event: <leeg> standaard matlab callback argument
hlist: <jacontrol> van het type sorttable
mode: <string> bepaald uit te voeren actie, mogelijke waarden:
- toevoegen
- verwijderen
- wijzigen
- kalibreren
- analyseren
- savestf
- savecoe
- wisresults
- exporteren
- simuleren
OUTPUT:
geen directe uitvoer
See also: modelbeheer
<APPLICROOT>\melissa2006\MODELBEHEER
09-Oct-2007 20:08:00
10997 bytes
StartDiaInspector - start de diainspector met reeksen of .dia bestand
CALL:
StartDiaInspector(obj,event,type,sorttable)
INPUT:
obj: <handle> van de aanroepende uicontrol
event: <leeg> standaard matlab callback argument
type: <string> uit te voeren actie, mogelijke waarden:
- 'reeks' open diainspector met een Melissa reeks
- 'dia' open diainspector met een .dia bestand
- 'validatie' open diainspector met een reeks en alle
validatie resultaten
sorttable: <jacontrol> (optioneel) van het type jxtable
OUTPUT:
geen uitvoer, de diainspector wordt gestart
<APPLICROOT>\melissa2006\HULPFUNCTIES
10-Jan-2007 22:56:24
3675 bytes
TestVars - test of de variabelen in het model aanwezig zijn in de
database
CALL:
result = TestModel(db, model)
INPUT:
db: <struct> de kopie van de centrale database (via db2mat)
model: <struct> met relevante velden
- invoer en
- uitvoer
OUTPUT:
result: <cellstring> met de namen van de elementen die niet
in de database zitten, leeg als alles ok
<APPLICROOT>\melissa2006\HULPFUNCTIES
09-Oct-2007 20:12:44
1597 bytes
aardappels - plot aardappelgrafiek
CALL:
aardappels(data)
INPUT:
data: <struct array> met de volgende velden
- loccode: stationsaanduiding
- TculmHW: culminatietijdstip (ruwe data) HW
- StandHW: voortschreidend gemiddelde/mediaan stand (ruwe data)HW
- HavengetHW: voortschreidend gemiddelde/mediaan havengetal(ruwe data)HW
- TculmLW: idem LW
- StandLW: idem LW
- HavengetLW: idem LW
- StandHWint: voortschreidend gemiddelde/mediaan stand
(geinterpoleerde data)HW
- HavengetHWint: voortschreidend gemiddelde/mediaan havengetal
(geinterpoleerde data)HW
- StandLWint: idem LW
- HavengetLWint: idem LW
OPMERKING: StandHWint, HavengetHWint, StandLWint, HavengetLWint hebben betrekking
op de interpolatietijdstippen TGRID (momenteel ingesteld op hele minuten)
OUTPUT:
APPROACH:
Het gedrag van deze functie hangt af van de invoer parameter 'optie'
switch optie
case 'display'
bepaal het geselecteerde station
Als get menu HW is geselecteerd, plot dan de aardappelgrafiek voor hoogwater
Dit gebeurt in de subfunctie 'showdata'
Als get menu LW is geselecteerd, plot dan de aardappelgrafiek voor laagwater
Dit gebeurt in de subfunctie 'showdata'
Display de naam van het station en de duur van de analyseperiode
Format en display de gewichten voor stand en havengetal die
tijdens interpolatie worden gebruikt
Als get menu HW is geselecteerd, plot dan de markeringslijnen en text voor hoogwater
Dit gebeurt in de subfunctie 'showlines'
Dit gebeurt pas hier omdat nu de xlim en ylim property van het figuur
niet meer veranderen
Voorzie de diverse assen van een tijdaanduiding in uren en minuten
Hiervoor wordt de utility tm_ax aangeroepen.
case 'updatePstand'
Deze aanroep volgt op het wijzigen van de gewichtsparameter voor
de interpolatie van de waterstand
Haal het current station op
Interpoleer de stand met opgegeven gewicht
De interpolatie gebeurt in de subfunctie interp_stand
Nadat de gegevens zijn bijgewerkt wordt alles opnieuw geplot
Dit gebeurt door de aanroep:
aardappels('display');
case 'updatePtijd'
Deze aanroep volgt op het wijzigen van de gewichtsparameter voor
de interpolatie van het havengetal
Haal het current station op
Interpoleer havengetal gegevens met opgegeven gewicht
De interpolatie gebeurt in de subfunctie interp_haven
Nadat de gegevens zijn bijgewerkt wordt alles opnieuw geplot
Dit gebeurt door de aanroep:
aardappels('display');
case 'load'
gebruiker voert filenaam in en data wordt geladen
case 'save'
gebruiker voert filenaam in en data wordt bewaard
case 'HW'
button HW ingedrukt ==> toggle HW button
Nadat menu is gewijzigd wordt alles opnieuw geplot
Dit gebeurt door de aanroep:
aardappels('display');
case 'LW'
button LW ingedrukt ==> toggle LW button
Nadat menu is gewijzigd wordt alles opnieuw geplot
Dit gebeurt door de aanroep:
aardappels('display');
case 'plotfrommenu'
De gebruiker heeft een stationnaam van een dropdown menu geselecteerd
Pas menu aan:
- current station is checked en disabled
- andere menus zijn unchecked en enabled
Nadat menu is gewijzigd wordt alles opnieuw geplot
Dit gebeurt door de aanroep:
aardappels('display');
Na het opnieuw displayen view maximaliseren en zoom history initialiseren
case 'install'
Verwijder figure met tag 'AARDAPPELWINTAG'(als het aanwezig is)
Maak een nieuw figure window aan voor de aardappelplot
Creeer de assen voor plotten Tijd, Stand en Aaardappelgrafiek
Creeer de labels
Creeer de menus
Creeer de toolbar
zet alles op zijn plaats met:
aardappels('resize');
aardappels('display');
activeer zoomtool
case 'resize'
Zet alle buttons uit de doolbar op zijn plaats
Bepaal de positie van de axes, afhankelijk van aantal assen dat zichtbaar is
Hierbij wordt de utility 'det_pos' gebruikt
Bepaal de positie van de editboxes voor het invullen van de interpolatie parameter
Stel de zichtbaarheid van de editboxes en de assen in
=====================================
GEBRUIKTE SUBFUNCTIES:
=====================================
function showdata(Tculm,Stand,Standint,Havenget,Havengetint,tag,col)
Plot Tculm tegen Havenget
Plot Stand tegen Tculm
Plot Havenget tegen stand (aardappelgrafiek)
gebruik in alle 3 gevallen:
'tag'=tag
'col'=col
plot indicators voor hele uren in de aardappelgrafiek
bijbehorende testarray
function showlines(Stand,Standint,Havenget,Havengetint,tag,col)
plot de volgende indicatie lijnen
- gemiddelde stand (horizontale lijn, in aardappel grafiek en grafiek stand)
- snijpunt aardappelgrafiek met gemiddelde stand (vertikale lijn, 2x)
- gemiddeld haven getal (vertikale lijn)
plot in de aardappelgrafiek hoogte en uuraanduiding bij de lijnen
gebruik:
'tag'=tag
'col'=col
function [curstat,curindex]=getcurstatmenu(data)
haal naam en index van geselecteerd station op
function data=interp_haven(data,curindex,val)
interpoleer de curve voor het gemiddelde havengetal
haal gegevens op uit
- data(curindex).HavengetHW
- data(curindex).HavengetLW;
schrijf gegevens weg naar
- data(curindex).HavengetHWint
- data(curindex).HavengetLWint
De oorspronkelijke, niet geinterpoleerde gegevens blijven
dus bewaard, zodat interpolatie desgewenst met andere parameters
herhaald kan worden
Voor de feitelijke interpolatie wordt de subfunctie 'interpoleer' aangeroepen
function data=interp_stand(data,curindex,val);
interpoleer de curve voor de gemiddelde stand
haal gegevens op uit
- data(curindex).StandHW
- data(curindex).StandLW;
schrijf gegevens weg naar
- data(curindex).StandHWint
- data(curindex).StandLWint
De oorspronkelijke, niet geinterpoleerde gegevens blijven
dus bewaard, zodat interpolatie desgewenst met andere parameters
herhaald kan worden
Voor de feitelijke interpolatie wordt de subfunctie 'interpoleer' aangeroepen
function y=interpoleer(X,Y,p)
knoop 3 cycli achter elkaar
voer interpolatie uit met utility 'cubspline'
knip middelste gedeelte eruit, dit is de uitvoer
met het begin en eind van de geinterpoleerd wordt niets gedaan
function [fheel, uurnrs]=heeluur(Tculm)
bepaal de indices in Tculm die overeen komen met een uurgemiddelde
<APPLICROOT>\melissa2006\FUNCTIES
03-Mar-2008 09:53:42
48243 bytes
THIS METHOD IS FOR INTERNAL USE IN UNDOREDO TOOLBOX
add2cache - check if item needs to be added to cache file
CALL
obj=add2cache(obj)
INPUT
obj: undoredo object
obj.history.cur_transact equals the last completed transaction
OUTPUT
obj: undoredo object, cache file modified
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 16:10:27
1463 bytes
add2dia - CALL: data = add2dia(RKS_target, RKS_source, data) INPUT: RKS_target: <struct> RKS_source: <structarray> data: <vector> OUTPUT: blok: <struct> See also: emptyblok
<TOOLBOX>\diaroutines
26-May-2007 18:24:46
2297 bytes
add2list - Lijst ten behoeve van inlezen consistentie criteria
CALL:
function lst=add2list(name1,val1,name2,val2)
add2list(): geef waarde terug van array
add2list(-1): reset array
add2list(name1,val1,nam2,val2): voeg waarde toe aan array
INPUT:
name1: station met hoogste waterstand
(bijvoorbeeld name1+3 ==> val1=3)
val1 : extra waarde ingevoerd voor name1
name2: station met laagste waterstand
val2 : extra waarde ingevoerd voor name2
(bijvoorbeeld name2+3 ==> val2=3)
OUTPUT:
lst: struct array met velden
up : station met hoogste waterstand
down: station met laagste waterstand
plus: toegestaan vesrchil in waterstand
APPROACH:
Deze functie maakt deel uit van een verzameling files
voor het instellen van consistentie criteria.
Eerste callback vanuit Melissa interface:
MEL_CNS
Betrokken files:
MEL_CNS
ADD2LIST
@CNSREAD\CNSREAD
@CNSREAD\GT
@CNSREAD\LT
@CNSREAD\MIN
@CNSREAD\PLUS
(De reden dat ADD2LIST niet in de object
directory staat is dat ADD2LIST ook zonder
argument moet kunnen worden aangeroepen)
Het doel is om een struct array te produceren die
de consistentie criteria bevat en samen met het
werkgebied wordt opgeslagen.
De gegevens van de te produceren structr array worden
tijdelijk bewaard in de globale variabele 'StatCmpList'.
Deze struct array heeft velden:
up : station met hoogste waterstand
down: station met laagste waterstand
plus: toegestaan vesrchil in waterstand
Als nargin==0
==> geef waarde terug van 'StatCmpList'
Als nargin==1&name1==-1
==> reset 'StatCmpList' naar []
In andere gevallen
==> update 'StatCmpList'
<APPLICROOT>\melissa2006\HULPFUNCTIES
28-Feb-2007 19:49:24
2380 bytes
addGap - add space to toolbar CALL: addGap(toolbar, space) INPUT: toolbar: <jacontrol object> of type JToolBar space: <integer> size of space in pixels OUTPUT: no output, space is added to the end of the toolbar See also: addGlue, addSeparator
<TOOLBOX>\jacontrol
09-Jun-2008 16:13:46
798 bytes
addGlue - add stretchable space to toolbar CALL: addGap(toolbar) INPUT: addGap: <jacontrol object> of type JToolBar OUTPUT: no output, stretchable space is added to the end of the toolbar See also: addGap, addSeparator
<TOOLBOX>\jacontrol
09-Jun-2008 16:13:56
732 bytes
addInstallManual - add installation manual to help menu
INPUT
hlpobj: help center object
menuStr: name for menu
OUTPUT
hlpobj: help center object, install manual has been added
EXAMPLE
hlpobj=addInstallManual(hlpobj,'Installatiehandleiding');
<TOOLBOX>\@helpmenuobj
08-May-2007 11:43:01
522 bytes
addSeparator - add a vertical separator to toolbar CALL: addSeparator(toolbar) INPUT: toolbar: <jacontrol object> of type JToolBar OUTPUT: no output, a vertical separator is added to the end of the toolbar See also: addGap, addGlue
<TOOLBOX>\jacontrol
09-Jun-2008 16:14:22
665 bytes
INPUT
Htool: matlab toolbar handle, returned from call to "uitoolbar"
N: number of pixels required for gap
<TOOLBOX>\jacontrol
18-Sep-2007 12:18:54
474 bytes
addpdf - add pdf document to help form
CALL
obj=addpdf(obj,name,fname,<PROPERTY>,<VALUE>,<PROPERTY>,<VALUE>,...)
INPUT
obj: helpmenobj object
name: name of document
fname: corresponding filename
<PROPERTY>,<VALUE> pairs
Valid properties:
path: Cell array
path{1}: url (example www.modelit.nl)
path{2}: username ([] if anonymous)
path{3}: password ([] if anonymous)
path{4:end}: path to files
<TOOLBOX>\@helpmenuobj
13-Jul-2005 00:21:07
1174 bytes
addhtml - add html document to help form
CALL:
obj = addhtml(obj,name,fname,varargin)
INPUT:
obj: <object> van het type helpmenuobj
name: <string> met de naam van het document
fname: <string> met de bestandsnaam
varargin: <cell array> met mogelijke velden:
- varargin{1} url (example www.modelit.nl)
- varargin{2} username ([] if anonymous)
- varargin{3} password ([] if anonymous)
- varargin{4:end}: pad naar bestand
OUTPUT:
obj: <object> van het type helpmenuobj
<TOOLBOX>\@helpmenuobj
10-Jan-2006 10:18:14
982 bytes
addinstall - add object of type "install" to help menu object
CALL
obj=addinstall(obj,name,fname,<PROPERTY>,<VALUE>,<PROPERTY>,<VALUE>,...)
INPUT
obj: helpmenobj object
name : (part of) name of installer. For example: name=setup.exe wil
also select install205.exe. The heighest version number will
be selected.
fname: corresponding filename
<PROPERTY>,<VALUE> pairs
Valid properties:
path: Cell array
path{1}: url (example www.modelit.nl)
path{2}: username ([] if anonymous)
path{3}: password ([] if anonymous)
path{4:end}: path to files
EXAMPLE
hlpobj=addinstall(hlpobj,'Meest recente software versie','setupMatlab.exe',...
'path',{'www.modelit.nl','uname','pw','setup'});
See also:
helpmenu
<TOOLBOX>\@helpmenuobj
13-Dec-2007 19:42:47
3163 bytes
addlabel - add label to help form
CALL
obj=addlabel(obj,labelstr)
INPUT
obj: helpmenu object
labelstr: label string to display
OUTPUT
obj: helpmenu object after update.
<TOOLBOX>\@helpmenuobj
17-Aug-2008 12:50:24
407 bytes
addns - add a namespace definition to the xml-object
CALL:
obj = addns(obj,S)
INPUT:
obj: <xml-object>
S: <struct> fieldnames --> namespace variable
values --> namespace value
<cell array> nx2, first column --> namespace variable
second column --> namespace value
OUTPUT:
obj: <xml-object>
EXAMPLE
%create an xml-object
obj = xml(fullfile(pwd,'examples','namespaces.xml'))
%try to get attribute
obj.width.('@nsdim:dim')
%add namespace
addns(obj,{'nsdim','http://www.modelit.nl/dimension'})
%get attribute
obj.width.('@nsdim:dim')
See also: xml, xml/listns, xml/clearns, xml/removens, xml/getns
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:19:02
947 bytes
addpdf - add pdf document to help form
CALL:
obj=addpdf(obj,name,fname,<PROPERTY>,<VALUE>,<PROPERTY>,<VALUE>,...)
INPUT:
obj: helpmenobj object
name: name of document
fname: corresponding filename
<PROPERTY>,<VALUE> pairs
Valid properties:
path: Cell array
path{1}: url (example www.modelit.nl)
path{2}: username ([] if anonymous)
path{3}: password ([] if anonymous)
path{4:end}: path to files
SEE ALSO
addInstallManual
<TOOLBOX>\@helpmenuobj
09-Jun-2007 12:01:25
904 bytes
addwebsite - add url to help form
CALL
obj=addwebsite(obj,name,url)
INPUT
obj: helpmenobj object
name: name of document
url: website to be opened
<TOOLBOX>\@helpmenuobj
19-Jun-2005 11:54:51
403 bytes
addzip - add zipped document to help form
CALL
obj=addzip(obj,name,fname,<PROPERTY>,<VALUE>,<PROPERTY>,<VALUE>,...)
INPUT
obj: helpmenobj object
name: name of document
fname: corresponding filename
<PROPERTY>,<VALUE> pairs
Valid properties:
path: Cell array
path{1}: url (example www.modelit.nl)
path{2}: username ([] if anonymous)
path{3}: password ([] if anonymous)
path{4:end}: path to files
SEE ALSO
helpmenu
<TOOLBOX>\@helpmenuobj
07-Feb-2008 00:43:34
4912 bytes
addzip - add zipped document to help form
CALL
obj=addzip(obj,name,fname,<PROPERTY>,<VALUE>,<PROPERTY>,<VALUE>,...)
INPUT
obj: helpmenobj object
name: name of document
fname: corresponding filename
<PROPERTY>,<VALUE> pairs
Valid properties:
path: Cell array
path{1}: url (example www.modelit.nl)
path{2}: username ([] if anonymous)
path{3}: password ([] if anonymous)
path{4:end}: path to files
SEE ALSO
helpmenu
<TOOLBOX>\@helpmenuobj
08-Feb-2008 13:05:42
4924 bytes
aggBins - deel de vector X met waarden Y op in bins (intervallen met
dezelfde waarden)
CALL:
[X, Y, widths] = aggBins(X, Y)
INPUT:
X: <double> met klassemiddens (lengte is length(Y))
of bingrenzen (lengte is length(Y) + 1)
Y: <double> met bij X horende waarden
OUTPUT:
X: <double> bingrenzen (lengte is length(Y) + 1), naast elkaar
gelegen intervallen met dezelfde waarden zijn
geaggregeerd tot 1 bin
Y: <double> waarden behorend bij X
widths: <handle> breedte van alle bins
<TOOLBOX>
14-Oct-2007 08:54:12
1305 bytes
agg_blok - aggregeer blok naar nieuwe periode CALL: blok = agg_blok(blok, periode) INPUT: blok: <struct> blok van een dia bestand, zie emptyblok periode: <integer> periode lengte in dagen OUTPUT: blok_agg: <struct> blok met geaggregeerde waarden See also: interp_blok
<APPLICROOT>\melissa2006\DATABEHEER
25-Jul-2008 16:04:38
4486 bytes
aggregdia - bereken maandgemiddelden van dia's
CALL:
aggregdia(fname)
INPUT:
fnames: <cell string> namen van te laden dia bestanden
<structure> met diablokken
OUTPUT:
Smaand: <struct> met een dia met gegenereerde maandgemiddelden
APPROACH:
HERHAAL VOOR ALLE BESTANDEN:
- Controleer alle invoerfiles op aanwezigheid.
- Controleer alle invoerfiles op maximale afmeting (max 25 Mb)
- Lees dia in
- Concatineer reeksen met gelijke herkomst en parameter in S.
Dit gebeurt in de aparte functie CONCATINEER.
- Wanneer het het hoofdbestand betreft:
- Neem IDT blok over
- Aggregeer tot maandgemiddelde
- Wanneer het een deelbestand betreft:
- Maak een lijst van de locaties in deze DIA ==> newlocs
- Maak een lijst van de reeds ingelezen locaties ==>oldlocs
- Controleer of de doorsnede van beide verzamelingen leeg is
- Aggregeer tot maandgemiddelde
- Concatineer de maandgemiddelden
ALLE REEKSEN ZIJN NU INGELEZEN EN GEAGGREGEERD TOT MAAND GEMIDDELDE
- Synchroniseer de reeksen, vul ontbrekende waarden op hiaten
Dit gebeurt in een aparte functie: TAXISSYNCHRONIZE
<APPLICROOT>\melissa2006\GETIJBEHEER
14-Feb-2007 20:16:30
10719 bytes
append - append tables to a table-object CALL: obj = append(obj,varargin) INPUT: obj: <table-object> varargin: <table-object> tables to be appended OUTPUT: obj: <table-object> See also: table, table/deleteRow, table/insertRow
<TOOLBOX>\@table
19-Sep-2006 22:17:02
982 bytes
applymenu - execute undo, redo of undo-menu
CALL
applymenu(obj,operation)
OR
undomenu(obj,event,operation,fp_getdata)
INPUT
operation
operation==1 ==> undo
operation==2 ==> redo
operation==3 ==> multiple undo/redo
als operation==3 verschijnt popuplijst waarin
gebruiker keuze aangeeft
operation==4 ==> reset undo/redo history
USER INPUT
selectie in undolist scherm
OUTPUT NAAR SCHERM
geen
APPROACH
operation==1 ==> undo
Dit gebeurt met object method UNDO
operation==2 ==> redo
Dit gebeurt met object method REDO
operation==3 ==> multiple undo/redo
Dit gebeurt met object methods UNDO en REDO
<TOOLBOX>\matlabguru\@undoredo
15-Aug-2008 15:46:05
2995 bytes
arglist - auxiliary function for undoredo/subref that implements cat
method
SUMMARY
This method is needed for undoredo object to be able to respond to
syntax stsr=strvcat(db.arry.fld)
CALL
obj = arglist(data)
INPUT
data
any Matlab variable
OUTPUT
obj
arglist object that encapsulates data
<TOOLBOX>\matlabguru\@arglist
17-Aug-2008 15:15:26
488 bytes
asciiedit - open file in ascii editor
CALL
asciiedit(fname)
INPUT
fname: te openene file
OUTPUT
geen (er word een file geopend in een ascii editor)
AANPAK
het pad naar de editor wordt gelezen uit het script notepad.bat
wanneer dit niet aanwezig script niet aanwezig is, is notepad.exe (zonder pad)
de default editor
Het script notepad.bat wordt aangemaakt met het commando
which notepad.exe > notepad.bat
<TOOLBOX>
15-Aug-2008 18:35:14
1569 bytes
assert - check condition. If false call error(msg)
CALL
assert(condition)
assert(condition,msg)
INPUT
condition:
boolean
msg:
error message that will be displayed if condition==false
OUTPUT
This function returns no output arguments
EXAMPLE
assert(exist(fname,'file'),'input file does not exist')
<TOOLBOX>
15-Aug-2008 21:43:38
595 bytes
autolegend - (her)installeer legenda of voer callback van legenda uit
CALL:
[RESIZEDELAYED, ACTIVE] = autolegend(VISIBLE, opt)
INPUT:
opt:
opt.CLIPFRAME : do not show legend items outside this area
opt.LEGFRAME : handle of frame on which to plot legend. to be resized after
updating legend.
IF NOT EMPTY: set pixelsize for this frame
and indicate of call to mbdresize is needed
opt.PLOTAXES : handle(s) of axes to plot legend from
opt.patchprops : if specified a patch will be plotted just
inside the clipframe. This patch obscures
elements from the graph and thus prevents
mingling of the legend with the rest of
the graph.
example: struct('facec',AXESCOLOR)
opt.headerprops: if specified a header will be plotted with
the properties specified in this
structure. Note that the header will be
plotted using "text" (not
"uicontrol('style','text')")
example: struct('str',Legend,'fontw','bold')
opt.maxpixelh : limit to the pixelheight of the frame
opt.unique : if 1, show only first occurence of label
(default 0)
opt.legendbd: buttondown function
opt.NORESIZE: if true. Do not modify application data "pixelsize" of
LEGFRAME depending on legend (non default). In
some instances this behavior is not wanted
(for examples) if legends are required to
be aligned.
opt.LINEW
opt.LMARGE
opt.MIDMARGE
opt.RMARGE
opt.TMARGE
opt.VMARGE
opt.BMARGE
opt.font: <struct> with fields
INDIRECT INPUT
application data "label": this functions searches for line or patch
objects for which tjhe application data label has been set
application data "legtext": this functions searches for line or patch
objects for which tjhe application data label has been set
OUTPUT
RESIZEDELAYED: if 1: frame size has changed, mbdresize should be called to paint frames
ACTIVE: true if legend contains at least 1 element
legItems: line o
+----label
+----handles
+----hidable
+----leghandle: handle of line or patch object in legend
INDIRECT OUTPUT
This function delets and plots legend objects
This function sets the pixelsize width of FRAMEAXES
If patchprops is specified this function initiates a global invisible
axes (LAYER 3), or makes an earlier global axes the current one.
CODE EXAMPLE
% STEP 1: Install frame for legend (include this code when
% installing the GUI)
% create outer frame:
h_frame = mbdcreateframe(h_parent,...
'title','Legend',...
'tag','fixedlegendframe',...
'pixelsize',[NaN 0],... %width depends on subframe
'normsize',[0 1],... %height depends on parent frame
'lineprops',mbdlineprops,...%do not use border==1, because then lines will not be visible
'minmarges',[2 2 2 2]);
% create slider and link this to outer frame ==> changing the
% sliders value will shift the contents of the outer frame
hslid=uicontrol('style','slider');
mbdlinkobj(hslid,h_frame,...
'normpos',[1 0 0 1],...
'pixelpos',[-12 0 12 0]);
mbdlinkslider2frame(hslid,h_frame);
%note: slider claims part of the width of the outer frame.
%autolegend takes this into account by claiming extra room for the
%inner frame
%specify the inner frame. This frame may move up and down in the
%outer frame, depending on the slider position
mbdcreateframe(h_frame,...
'tag','innerlegendframe',...
'pixelsize',[0 0],...
'normsize',[0 1],...
'border',0,...
'splithor',0,...
'minmarges',[0 0 0 0]);
%Alle required frames are now installed
<other code>
%--------------------------
<other code>
% STEP 2: Install axes, plot figure and set label properties
axes('tag','MyAxes')
h=plot(1:10)
setappdata(h,'label','My Line'); %setting the label property
%tells autolegend to include the label
h=line(1:10,2:11)
setappdata(h,'legtext','My Line2'); %setting the legtext property
%tells autolegend to include the label
<other code>
%--------------------------
<other code>
% STEP 3: Update the legend
legopt=struct('LEGFRAME',gch('innerlegendframe',HWIN),...
'CLIPFRAME',gch('fixedlegendframe',HWIN),...
'PLOTAXES',[gch('MyAxes',HWIN);gch('OtherAxes',HWIN)]);
if autolegend(1,legopt)
%autolegend may change the size of innerlegendframe, depending on the displayed label sizes.
%If this is the case, mbdresize must be called to repaint all frames
mbdresize;
end
<TOOLBOX>
18-Oct-2007 21:36:18
24146 bytes
autosave - timed backup of data
CALL
autosave(fname,data)
INPUT
fname
name of cache file
data
data that will be saved
OUTPUT
none
NOTE: this function is called from undoredo/subsasgn and undoredo/setdata
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:10:49
631 bytes
axes - overloaded function for axes store stack for use with guibrowser
<TOOLBOX>\debug
18-Jul-2006 08:13:48
275 bytes
bepaal_tijdstap - Determine timestep of given time axis.
CALL:
[tijdstapeenheid, tijdstap] = bepaal_tijdstap(taxis, mode)
INPUT:
taxis:
Vector of Matlab datenum.
mode:
(Optional) string with possible values:
'TE' (default) - Assume an equidistant timeseries, tijdstap is the
smallest found timestep, this is useful when the
timeseries has missing values.
otherwise - If timestep is always equal --> TE timeseries.
Otherwise --> TN timeseries.
OUTPUT:
tijdstapeenheid:
String with possible values, empty if TN timeseries:
- 'd' days
- 'min' minute
- 's' seconds
- 'cs' centiseconds
tijdstap:
Integer with timestep in tijdstapeenheid units, empty if TN timeseries.
See also: cmp_taxis, set_taxis
<TOOLBOX>\diaroutines
18-Aug-2008 15:52:54
2035 bytes
buildXPath - create an XPath object for an XML DOMtree
CALL:
x = buildXPath(string,nsStruct)
INPUT:
string: <string> XPath expression
Namespaces: <java object> (optional) a java.util.HashMap with namespace
definitions
OUTPUT:
x: <java object> org.jaxen.dom.DOMXPath
See also: xml, xml/xpath, xml/subsasgn, xml/subsref
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:00:24
1223 bytes
cachecleanup - The first time an undoredo object is changed after on or
more undo's all cache files that refer to later transactions are deleted
CALL
obj=cachecleanup(obj)
INPUT
obj: undoredo object
obj.history.cur_transact equals the last completed transaction
OUTPUT
obj: undoredo object, cache file modified
<TOOLBOX>\matlabguru\@undoredo\private
27-May-2006 14:15:07
2352 bytes
cachename - return name for cache file
CALL
str=cachename(obj,N,type)
INPUT
obj
undoredor object
N
integer
type
string
OUTPUT
str
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:12:32
339 bytes
callback - Internal component of dateselector object.
CALL/INPUT/OUTUT:
not for external use
<TOOLBOX>\MBDresizedir\@dateselector
17-Aug-2008 10:47:42
232 bytes
cat - concatinate data stored in arglist object
CALL
data = cat(dim, obj)
INPUT
dim: 1 or 2, dimension for which concatenation is required
obj: arglist object
OUTPUT
data = cat(dim, obj)
<TOOLBOX>\matlabguru\@arglist
17-Aug-2008 15:18:57
620 bytes
cell2hashtable - converteer cellarray naar een java hashtable
CALL:
ht = cell2hashtable(c)
INPUT:
c: cellarray met twee kolommen: kolom 1: hashtable keys
kolom 2: hashtable waarden
OUTPUT:
ht: java.util.Hashtable
See also: hashtable2cell
<TOOLBOX>
29-Jan-2008 20:05:48
542 bytes
centralpos - positioneer een window min of meer in het midden van een
scherm
CALL:
pos = centralpos(windowSize)
INPUT:
windowSize: window size in pixels
OUTPUT
pos: new centralized position for figure
EXAMPLE:
%centralize current window
centralpos(mbdpixelsize(hframe));
see also: mbdresize, mbdpixelsize, movegui(HWIN,'center');
<TOOLBOX>
16-Aug-2008 12:03:48
599 bytes
chararray2char - convert char array to string CALL: str = chararray2char(str) INPUT: str: <char array> OUTPUT: str: <string>
<TOOLBOX>
23-Jan-2008 17:39:22
308 bytes
chararray2char - convert char array to string CALL: str = chararray2char(str) INPUT: str: <char array> OUTPUT: str: <string> See also: xml, xml/xpath, xml/subsasgn, xml/private/toString
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:50:54
409 bytes
delete all cache- and autosave files that belong to undoredo object
SUMMARY
Depending on the properties specied upon object creation, different
files may be associated with an undoredo object, such as cache files
and backup files.
cleanupdisk removes these files and should be called when the
undoredo object is no longer needed.
CALL
cleanupdisk(obj)
INPUT
obj: undoredo object
OUTPUT
This function return no output arguments
EXAMPLE
%Insert some where in main body:
set(gcf,'deletef',@deleteFcn)
function deleteFcn (obj,event)
% application delete function
%retreive undoredo object:
db = get_db; %(get_db must be provided)
%remove all filles associated with undoredo object:
cleanupdisk(db);
%Destroy figure:
delete(obj)
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 11:20:13
1044 bytes
clearns - remove all the namespace definitions from the xml-object
CALL:
obj = addns(obj,S)
INPUT:
obj: <xml-object>
S: <struct> fieldnames --> namespace variable
values --> namespace value
<cell array> size: nx2, first column --> namespace variable
second column --> namespace value
OUTPUT:
obj: <xml-object> with no namespace definitions
EXAMPLE
%create an xml-object
obj = xml(fullfile(pwd,'examples','namespaces.xml'))
%add namespaces
addns(obj,{'ns','http://www.w3schools.com/furniture'})
addns(obj,{'nsdim','http://www.modelit.nl/dimension'})
%list namespaces
listns(obj)
%clear all defined namespaces
clearns(obj)
%list namespaces
listns(obj)
See also: xml, xml/listns, xml/addns, xml/removens, xml/getns
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:21:52
1002 bytes
closegroup - close a group of transactions.
SUMMARY
In the undo redo menu, all transactions in a group are presented as
one line. The closegroup are used to separate different groups of
transactions. Normally the closegroup command is not needed as the
undoredo/store command closes a group of transactions before storing
the undoredo object.
closegroup is needed in the specific case where you are performing a
series of operations that should appear seperately in the undo list,
but there is no reason to the store the database in between.
CALL
db=closegroup(db)
INPUT
db: undoredo object
OUTPUT
db: undoredo object after update
See also: store
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 11:20:06
1327 bytes
cmp_taxis - Compute time axis for Donar timeseries.
CALL:
taxis = cmp_taxis(s, N, SIGNIFIKANTIE)
INPUT:
s:
structure with the following relevant fields (Donar RKS block).
lBegdat: e.g. 19980101
iBegtyd: e.g. 1430
sTydehd: 'min'
iTydstp: 10
lEnddat: 19980228
iEndtyd: 2350
N:
(Optional) total number of datapoints for checking.
SIGNIFIKANTIE:
(Optional) timeaxis precision, default value: 1440(minutes),
if necessary specify second argument N eventueel as [].
OUTPUT
taxis:
Vector of Matlab datenum with the equidistant times.
APPROACH:
Converteer opgegeven begin- en eindtijdstip naar matlab datenum.
Bereken de stapgrootte.
Let op! bij coderen was complete lijst met mogelijkheden niet voorhanden!
alleen de eenheid 'min' is geverifieerd.
bouw het taxis array.
Wanneer ook een tweede argument beschikbaar is wordt het aantal tijdstappen
gecontroleerd.
In geval van een inconsitentie volgt een melding.
Het aantal opgegeven datapunten in N is dan maatgevend.
See also: select_interval
<TOOLBOX>\diaroutines
18-Aug-2008 17:04:56
2567 bytes
cnsread - Inlezen consistentie criteria
creeer dummy objecten
deze objecten kennen methode lt (<) en gt (>)
zodat gebruiker in deze uitdrukkingen in een script kan gebruiken
CALL:
obj=cnsread(namestr)
INPUT:
namestr: char vector met naam station
OUTPUT:
obj: een cnsread object
namestr : naam station
plus : extra waarde (Bijv: gebruiker voert in obj+1)
APPROACH:
Deze functie maakt deel uit van een verzameling files
voor het instellen van consistentie criteria.
Eerste callback vanuit Melissa interface:
MEL_CNS
Betrokken files:
MEL_CNS
ADD2LIST
@CNSREAD\CNSREAD
@CNSREAD\GT
@CNSREAD\LT
@CNSREAD\MIN
@CNSREAD\PLUS
(De reden dat ADD2LIST niet in de object
directory staat is dat ADD2LIST ook zonder
argument moet kunnen worden aangeroepen)
Het doel is om een struct array te produceren die
de consistentie criteria bevat en samen met het
werkgebied wordt opgeslagen.
<APPLICROOT>\melissa2006\HULPFUNCTIES\@cnsread
20-Jun-2008 09:42:28
1464 bytes
code2str - translate numeric codes into strings
INPUT:
codefrom: <vector of double> numeric codes
stringto: <char array> strings that belong to codes
codes: <double of double> codes that need translation
OUTPUT
str: <char array>, a list of length(codes) strings
each code in string is translated into a string
EXAMPLE:
str = code2str([0 1],['-';'+';'?'],[1 0 1 2 0])
APPROACH:
if codes contains codes that are not in codefrom the corresponding
rows in str will be set equal to the last row of stringto
<APPLICROOT>\melissa2006\HULPFUNCTIES
09-Jan-2007 10:44:38
879 bytes
coef2msw - Converteer de coefficienten file naar een operationeel
coefficienten bestand
CALL:
function coef2msw(coeffile, statfile, MSWDIR)
INPUT:
coeffile: <string> naam van de coefficienten file
(als niet gegeven wordt om naam gevraagd)
statfile: <string> naam van conversie bestand van donar locatie codes
naar MSW herkenbare codes indien niet gegeven wordt
file 'coefmswloc.tab' aangenomen
varfile: <string> naam van conversie bestand van donar variabele codes
naar MSW herkenbare codes indien niet gegeven wordt
file 'coefmswvar.tab' aangenomen
MSWDIR: <string> directory waarin coefficienten worden weggeschreven (1 file per station)
(default directory: 'mswcoef')
OUTPUT:
geen directe uitvoer, per station wordt een bestand met coefficienten
weggeschreven
APPROACH:
Converteer de inhoud van coefficienten file naar
een operationeel coefficienten bestand.
Per station wordt een file weggeschreven met naam CODE_ddmmmjjjj
Met CODE een vierletter code afgeleid van stations naam.
De weggeschreven file bevat de combinaties voor een station
in volgorde van standaard afwijking
Opmerking: er is aangenomen dat het MSW werkt met tijdstappen van 10
minuten dit is te wijzigen door de parameter DELTAMSW anders
in te stellen
<APPLICROOT>\melissa2006\MODELBEHEER
30-Mar-2007 13:24:22
7136 bytes
combineRKS - Combine two or more RKS (Reeksadministratie) blocks.
CALL:
RKS = combineRKS(oldRKS, newRKS)
INPUT:
oldRKS:
Struct or struct array with one or more existing RKS blocks.
newRKS:
Struct or struct array with RKS block to be added.
OUTPUT:
RKS:
Structure with combined RKS blocks.
APPROACH:
The period is extended from first to last observation.
There are two different ways to call this function:
1. incremental: 1 RKS is added.
2. parallel: A struct array of RKS blocks is added.
See also: emptyRKS
<TOOLBOX>\diaroutines
18-Aug-2008 14:57:30
2554 bytes
combineTPS - Combine two or more TPS (Tijdreeksperiodestatus) blocks.
CALL:
TPS = combineTPS(oldTPS, newTPS, RKS)
INPUT:
oldTPS:
Struct or struct array with one or more existing TPS blocks.
newTPS:
Struct or struct array with TPS block to be added.
RKS:
RKS block to determine timestep.
OUTPUT:
TPS:
Structure with combined TPS blocks.
APPROACH:
The period is extended from first to last observation.
There are two different ways to call this function:
1. incremental: 1 TPS is added.
2. parallel: A struct array of TPS blocks is added.
See also: emptyTPS
<TOOLBOX>\diaroutines
18-Aug-2008 14:59:44
3931 bytes
composeList - put the table data in a structure which can be used by the
jacontrol/sorttable object
CALL:
Contents = composeList(obj,fields,format)
INPUT:
obj: <table-object>
fields: <cellstring> (optional) with fieldnames, default is all
fieldnames
format: <cellstring> (optional) with formats, see tablefile for possible
values, default is numeric -> number
other -> string
OUTPUT:
Contents: <struct> with fields:
- header
- contents
N.B. this is the format which is needed by the
jacontrol/sorttable to display data
See also: table, tablefile/edit, jacontrol
<TOOLBOX>\@table
03-Jan-2007 10:17:20
2841 bytes
computeStatOut - bereken outlier status voor stations
CALL:
db = computeStatOut(C, db)
INPUT:
C: <struct> met Melissa constantes, zie OUTPUT voor gebruikte waarden
db: <undoredo object> met werkgebied gegevens
OUTPUT:
db: <undoredo object> met aangepaste StatusOutlier, mogelijke waarden:
C.RIVIEROUTLIER: inconsistentieconditie, W niet Hiaat,
W niet nonobserved, V n.v.t.,...
C.OUTLIER: outlierconditie, W niet Hiaat, W niet nonobserved,
V niet Hiaat, V niet onbetrouwbaar (dus V Ok)
C.VERDACHT: (V onbetrouwbaar of V Hiaat) & W geinterpoleerd (kan niet)
(V OK & W Hiaat) (kan ook niet)
(V Hiaat & W OK) er kan niks gecontroleerd worden)
(V Onbetrouwbaar, outlierconditie en W Ok)
C.HIAAT: W hiaat
C.OK: de rest
APPROACH:
als 'StatusOutlier' al eens berekend is, dan:
outlierstatus niet veranderen als:
u.ud.valide ==1 (status definitief)
u.ud.StatusValidat ==0 (al gevalideerd)
u.ud.StatusW==NONOBSERVED (niet waargenomen)
Sla indices van te berekenen outlierstatus op in fmodify
als 'StatusOutlier' nog nooit berekend is dan alle elementen berekenen
fmodify zijn de elementen waarvoor StatusOutlier
mag worden aangepast.
Maak een aantal logical arrays aan waaruit StatusOutlier
berekend kan worden.
Gebruik subfunctie DETECTOUTLIER om validatie criteria te toetsen.
Gebruik subfunctie INCON om consistentie criteria te toetsen.
Opmerking: alle logical arrays hebben alleen betrekking op fmodify.
See also: mel_cns, mel_val
<APPLICROOT>\melissa2006\HULPFUNCTIES
20-Sep-2007 09:32:00
9258 bytes
concatineer - voeg identiek reeksen (zelfde sLoccod en sParcod) CALL: uitvoerblok = concatineer(blok) INPUT: blok: DIA blok array met reeksadministraties MUX, RKS, TPS, WRD etc. OUTPUT: uitvoerblok: DIA structure met samengevoegde blokken APPROACH: Zoek blokken met dezelfde locatiecode en parametercode bij elkaar Voeg deze samen met de procedure mergeblokken
<APPLICROOT>\melissa2006\GETIJBEHEER
14-Feb-2007 20:09:44
8348 bytes
constantes_melissa - script dat aantal constantes definieert
CALL:
constantes_melissa(dummy_arg)
C=constantes_melissa(dummy_arg)
INPUT:
dummy_arg: het definineren van tenminste 1 invoer argument heeft tot
gevolg dat een hulpscherm wordt gestart voor het instellen van de opties
OUTPUT:
C: een structure met een groot aantal velden
ieder veld bevat een constante die in de applicatie gebruikt wordt
APPROACH:
Door gebruik te maken van constantes wordt vermeden dat door kleine
spelfouten fouten in de applicatie sluipen die niet gedetecteerd worden
met een foutmelding.
Bovendien kunnen opties op deze wijze centraal gewijzigd worden
<APPLICROOT>\Melissa2006
29-Mar-2007 15:32:04
17332 bytes
contextEdit - activate edit mode
SUMMARY
Haal de handles op van de windows die in Melissa actief kunnen zijn.
Bepaal alle children objects bij deze windows die van het type
'uimenu' of 'uicontrol' zijn ==> objhandles.
Schort de interactiviteit van de windows op met UISUSPEND.
Vang de oude toestand op ==> uistates.
Zet alle window pointer op 'watch'
Detecteer de enable status van objhandles ==> uienable
Disable alle objecten in objhandles.
CALL
contextEdit(hmenu,event)
INPUT
hmenu: handle of menu that calls this installer
event: not in use
OUTPUT
none
See also
contexthelp
<TOOLBOX>\debug
17-Aug-2008 13:54:49
8403 bytes
copystructure - kopieer inhoud van de ene naar de andere structure,
maar houd oorspronkelijke volgorde van velden vast
Indien nodig worden nieuwe velden toegevoegd
CALL:
copyto = copystructure(copyfrom,copyto)
INPUT:
copyfrom: <struct> structure met nieuwe data
copyto: <struct> aan te passen structure
OUTPUT:
copyto: <struct> aangepaste structure
<TOOLBOX>
03-Jun-2008 21:24:46
3405 bytes
<TOOLBOX>
29-Oct-2004 15:35:50
36864 bytes
createJar - maak een jar archief aan van de images in een directory CALL: createJar(SourceDir,jarname) INPUT: SourceDir: <string> volledige pad van de directory met de images jarname: <string> naam van het te creeren jar archief OUTPUT: geen directe uitvoer, een .jar archief is aangemaakt in de directory 'SourceDir'
<APPLICROOT>\Melissa2006
06-Aug-2006 10:39:28
668 bytes
cubspline - cubic spline approximation with approximate points CALL [xout,yout]=cubspline(x0,y0,x,P) INPUT x0: x coordinaat waargenomen punten y0: ycoordinaat waargenomen punten x: x coordinaat te schatten punten P: gewicht, of diagonaal matrix met gewichten OUTPUT y: de geextrapoleerde punten die horen bij x WERKWIJZE Uit x0,yo en P worden de parameters die de interpolatie spline karakteriseren bepaald (subfunctie cubspline1) Deze parameters volgen uit een aantal matrix bewerkingen die in detail zijn gespecificeerd in (de bijlage van) het FO Getijspecials, MobiData, 1999 Vervolgens vindt extrapolatie uitgevoerd voor punten x (subfunctie cubspline2) In feite bestaat ge geinterpoleerde polynoom uit een groot aantal deelpolynomen. Voor elk deelpoynoom worden de elementen van x gezocht die tot het relevante interval behoren. Vervolgens wordt voor deze waarden de interpolatie bepaald.
<APPLICROOT>\melissa2006\FUNCTIES
29-Oct-2000 19:37:32
3489 bytes
currentcache - determine current cache file (if existent)
CALL
[f,indexf]=currentcache(obj,targetstep)
INPUT
obj: undoredo object
targetstep: step to complete
OUTPUT
f
indexf
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:15:06
1070 bytes
databeheer - importeren van dia bestanden in de database CALL: rc = databeheer(obj,event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument OUTPUT: geen uitvoer, het databeheerscherm wordt opgestart
<APPLICROOT>\melissa2006\DATABEHEER
01-Aug-2008 14:54:42
46899 bytes
databeheer_msg - functie om alle foutmeldingen van databeheer af te
handelen
CALL:
databeheer_msg(actie)
INPUT:
actie: <string> met omschrijving van de fout, zie code voor details.
OUTPUT:
<geen>
<APPLICROOT>\melissa2006\DATABEHEER
02-Feb-2007 18:00:34
1179 bytes
databeheerview - visualisatie functie van het databeheer scherm CALL: databeheerview(udnew,opt,upd,HWIN) INPUT: udnew: <undoredo object> met de database opt: <substruct> met de GUI settings upd: <struct> met de te updaten scherm elementen HWIN: <handle> van het databeheer scherm OUTPUT: geen directe uitvoer, het databeheer scherm is geactualiseerd en weerspiegelt de veranderingen in de data c.q. settings See also: databeheer
<APPLICROOT>\melissa2006\DATABEHEER
29-Jul-2008 17:59:06
9992 bytes
date_ax - supply a number of axes with date ticks CALL: date_ax(xa,ya) INPUT: xa: x axes handles ya: y axes handles OUTPUT: none APPROACH: It is assumed that data are specified in datenum format See also: zoomtool
<TOOLBOX>
27-Nov-2006 13:54:34
870 bytes
datenum2java - convert Matlab datenum to Java date
CALL
jdate = datenum2java(dn)
INPUT
dn:
matlab datenumber
OUTPUT
jdate:
Equivalent Java date object
<TOOLBOX>
15-Aug-2008 18:50:04
398 bytes
datenum2long - Convert Matlab datenum to date with format YYYYMMDD,
time with format HHmm and time with format HHmmSS.
CALL:
[Date, Time, LongTime] = datenum2long(D, timeunit)
INPUT:
D:
Scalar, vector or matrix with datenum data.
timeunit:
Opional argument with possible values:
- 'mnd': Donar uses different format for months.
- otherwise: Use standard Donar date format.
OUTPUT:
Date:
Corresponding date(s) in YYYYMMDD.
Time:
Corresponding time(s) in HHmm.
LongTime:
Corresponding time(s) in HHmmSS.
APPROACH:
Round D to whole minutes:
- Add 30 seconds to D and call datevec.
- Ignore 'second' output argument.
NOTE:
.m source of this funciton is used in mwritedia.c.
See also: long2datenum
<TOOLBOX>\diaroutines
17-Aug-2008 14:59:28
2448 bytes
dateselector - create dateselector component (Calendar object)
CALL
obj=dateselector(property, value,...)
INPUT
PROPERTY DEFAULT MEANING
Parent gcf Parent of Calendar frame. May be other frame or
figure handle
Backg figcolor Color used for pseudo transparant items
Tag '' Tag of Calendar frame
Rank 1 Rank of Calendar frame
Value now datenum value
Maximize 1 if maximized: show calendar, otherwise show date
only
Callback [] Callback function pointer. This function will be
called when user selects a date. Arguments:
arg1: object
arg2: event
+----calendar: user clicked on calendar
+----month: user clicked on month
+----year: user changed year field
+----date: user changed date field
arg2: value. The current date
OUTPUT
obj: Calendar object. The private fields of the object mainly contain
| information on handles. Object data subject to
| change (like value and maximize property) are
| stored as application data.
+----h_all: handle of frame object
+----h_hdr: handle of header frame
+----h_daytype: handle of daytype field
+----h_day: handle of date field
+----h_mnth: handle of month field
+----h_yr: handle of year field
+----h_expand: handle of expand button
+----BackgroundColor: pseudo transparant color (identical to
| background)
+----h_cal: handle of calendar table frame
+----h_dates: [6x7 double] handles of date buttons
OBJECT METHODS
obj.set
obj.get
obj.callback
SEE ALSO
selectdate
EXAMPLE:
if nargin==0
%test
NM='test window';
delete(findobj('name',NM));
figure('name',NM);
h_fr=mbdcreateframe(gcf,'splithor',0);
mbdcreateframe(h_fr,'border',1,'splithor',0,'rank',2,'normsize',[1 10]);
%initialize
dateselector('Parent',h_fr,'tag','Example');
set(gcf,'resizef',@mbdresize);
%update
for k=1:100
h_frame =findobj('tag','Example');
obj =get(h_frame,'userdata');
curvalue =get(obj,'value');
set(obj,'value',curvalue+1);
pause(.1);
end
return
end
Create dateselector object and set user defined fixed properies:
<TOOLBOX>\MBDresizedir\@dateselector
17-Aug-2008 10:39:14
7921 bytes
Display dateticks in eu style MOFDIFIED 18 Dec 2000 by Nanne van der Zijpp, for application in Matlab V6 Suppress warnings WYZ May 2004: use newer datetick as a base file WYZ May 2006: use newer datetick as a base file (Matlab R2006a) Look for PATCHMODELIT to find applied changes
<TOOLBOX>
16-Aug-2008 11:35:49
18184 bytes
db2mat - zet de centrale database om in matrices
CALL:
Mat = db2mat(db,IDs,starttime,endtime)
INPUT:
db <undoredo> centrale wavix database
index: <vector> van op te halen reeksen
OUTPUT:
Mat: <struct> de database omgezet in een structure met de velden
- tijdsas: gemeenschappelijke tijdsas van de vroegste
tot laatste waarneming van alle dias
<APPLICROOT>\melissa2006\HULPFUNCTIES
22-Mar-2007 18:23:10
7572 bytes
dbtools - haal informatie uit de database van melissa
INPUT:
data: de Melissa database
operation: 'Diaindex' - bepaal de index van de dia die voldoet aan
de in varargin opgegeven criteria
'modelnamen' - haal de namen van de beschikbare locaties op
OUTPUT:
result: resultaat van de operatie
See also: get_db_melissa
<APPLICROOT>\melissa2006\HULPFUNCTIES
12-Feb-2007 16:32:30
1241 bytes
debugmenu - activate or inactivate debugmenu
CALL:
debugmenu(flag): set or remove debugmenu
debugmenu: enquire status
INPUT:
flag: <boolean>
TRUE: activate
FALSE: inactivate debugmenus
OUTPUT:
status: <boolean>
TRUE debugmenu has been activated
FALSE: --- inactivated
<TOOLBOX>
08-Sep-2006 11:33:54
1447 bytes
decomment_line - remove comment from separate line CALL: str = decomment_line(str) INPUT: str: <string> to decomment OUTPUT: str: <string> without comments See also: strtok, deblank, readComments
<TOOLBOX>
12-Mar-2008 16:57:59
1078 bytes
defaultpath - store or retrieve default path
CALL
[LoadPath,Pathlist]=defaultpath(N) : retrieve path nr N (Retreive mode)
[LoadPath,Pathlist]=defaultpath : retreive path nr 1 (Retreive mode)
LoadPath=defaultpath(LoadPath,N) : set path nr N (Set mode)
LoadPath=defaultpath(LoadPath) : set path nr 1 (Set mode)
INPUT
LoadPath: preferred path (optional)
if no input, path will be retrieved from preference settings
if setting does not exist, default path = pwd/data
if directory pwd/data does not exist default path =pwd
OUTPUT
LoadPath: preferred path
Pathlist: history of last 25 selected paths
NOTE
The path returned by defaultpath includes the filesep sign!!
EXAMPLE CODE (1) retrieve file
%Check if a preferred directory exists
LoadPath=defaultpath;
%Retrieve filename
[fname,pname]=getfile('bin','Binary datafile',0,[LoadPath '*.bin']);
%Paste path and file name together
fname=[pname fname];
if fname
%store preferred directory
defaultpath(pname);
<Code that uses fname>
end
<TOOLBOX>
15-Aug-2008 12:59:18
4154 bytes
deleteColumn - delete column(s) from table CALL: obj = deleteColumn(obj,varargin) INPUT: obj: <table-object> varargin: <string> one or more table columnnames OUTPUT: obj: <table-object> See also: table, table/keepColumn, table/renameColumn
<TOOLBOX>\@table
20-Sep-2006 10:15:54
378 bytes
insertRow - delete one or more rows in a table CALL: obj = deleteRow(obj,rows) INPUT: obj: <table-object> rows: <integer> index of table rows to be deleted OUTPUT: obj: <table-object> See also: table, table/insertRow, table/append
<TOOLBOX>\@table
16-Sep-2006 14:14:16
424 bytes
deletecachefile - delete file for undoredo object
CALL
deletecachefile(fname)
INPUT
fname: filename to delete
OUTPUT
none
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:17:35
668 bytes
deletequeue - make display queue empty without calling display function
SUMMARY
The undoredo object keeps track of the items that should be upodated
by the displayfunction bu storing substruct arguments passed on to
the subsasgn method in a cell array.
When the flush method is called this queue is passed on the display
function and the queue is made empty.
If you are working on an application that uses two undoredo objects
that can be modified independentlty, for example 1 for data and 1 for
user preferences, situations might occur where:
- both undoredo objects have a nonempty queue
- calling flush for 1 of the undoredo objects makes calling
the flush method for the other object no longer needed
In this case you may invoke deletequeue to tell the other object
that it can empty its queue. If you omit this, no real harm will be
done, but the next time flush is called for this object. Some
object will be repainted, causing un undesired user experience.
CALL
db=deletequeue(db)
INPUT/OUTPUT
db: undoredo object
EXAMPLE
to prevent calling display function twice, make queue empty
Typical use:
change settings (ur_assign,DRAWNOW,0)
delete queue
change data (ur_assign, DRAWNOW,1) <==this one calls display function
SEE ALSO
flush
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 15:16:02
1547 bytes
detailerrordlg - errordialoog met extra foutomschrijving
CALL:
detailerrordlg(ErrorString, DlgName, details)
INPUT:
ErrorString: <string> omschrijving van de fout
<cellstring>
DlgName: <string> titel van de dialoog
details: <string> foutdetails
<cellstring>
OUTPUT:
geen uitvoer, een errordialoog wordt getoond aan de gebruiker
See also: errordlg
<TOOLBOX>
17-Dec-2007 11:37:08
4628 bytes
dia_merge - Merge two equidistant timeseries.
CALL:
[dia_new, missing, total] = dia_merge(dia_old, dia_new, SIGNIFIKANTIE, copyhiaat)
INPUT:
dia_old:
Structure with existing DIA.
dia_new:
Structure with DIA to be added (overwrite when necessary).
SIGNIFIKANTIE:
(Optional) integer with time axis precision, e.g. 1440 for minutes.
copyhiaat:
(Optional) True -> overwrite existing dia with missing values.
False -> do not overwrite existing dia with missing values.
OUTPUT:
dia_new:
Structure with merged timeseries.
missing:
Integer with total number of values which could not be filled in the
new time axis.
total:
Integer with total number of new datapoints in new taxis.
See also: mergeDias
<TOOLBOX>\diaroutines
18-Aug-2008 17:53:12
3735 bytes
disp - display information about a table-object on the console CALL: display(obj) INPUT: obj: <table-object> OUTPUT: none, information about the table-object is displayed on the console See also: table, table/display, disp
<TOOLBOX>\@table
24-Sep-2006 11:14:46
368 bytes
disp - display information about a tablefile-object on the console CALL: display(obj) INPUT: obj: <tablefile-object> OUTPUT: none, information about the tablefile-object is displayed on the console See also: tablefile, tablefile/display, disp
<TOOLBOX>\@tablefile
28-Aug-2007 11:18:08
533 bytes
<TOOLBOX>\matlabguru\@arglist
12-Jun-2007 14:13:32
29 bytes
display - display information about a table-object on the console, called
when semicolon is not used to terminate a statement
CALL:
display(obj)
INPUT:
obj: <table-object>
OUTPUT:
none, information about the table-object is displayed on the console
See also: table, table/disp, display
<TOOLBOX>\@table
16-Sep-2006 12:25:06
375 bytes
display - display information about a tablefile-object on the console,
called when semicolon is not used to terminate a statement
CALL:
display(obj)
INPUT:
obj: <tablefile-object>
OUTPUT:
none, information about the tablefile-object is displayed on the console
See also: tablefile, tablefile/disp, display
<TOOLBOX>\@tablefile
24-Sep-2006 11:14:20
396 bytes
display - display method for the jacontrol object CALL: display(obj) INPUT: obj: object of type jacontrol OUTPUT: no direct output, information about the jacontrol object is plotted on the console See also: jacontrol
<TOOLBOX>\jacontrol\@jacontrol
07-May-2008 16:05:28
392 bytes
<TOOLBOX>\matlabguru\@arglist
12-Jun-2007 14:22:38
37 bytes
display - overloaded function for disp
SUMMARY
The undoredo object is designed so that the analogies with a "normal"
Matlab variable are maximized. When the function disp is invoked on
an undoredo object, disp(db.data) will be called. A line "undoredo
object" is displayed to notify the user of the calls of the object.
CALL
disp(db)
INPUT
db: undoredo object
OUTPUT
this function returns no output arguments
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 15:16:08
560 bytes
display - display information about an xml-object on the console CALL: display(obj) INPUT: obj: <xml-object> OUTPUT: none, information about the xml-object is displayed on the console EXAMPLE: %create an xml from a sourcefile obj = xml(fullfile(pwd,'examples','books.xml')) %display function was automatically called by Matlab See also: xml, display
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:34:26
1764 bytes
displayStations - Display the stations contained in a dia block in a
specified axis.
CALL:
displayStations(h_map, blok, labels, S)
INPUT:
h_map:
Handle of axis in which to plot the stations.
blok:
Struct array with location information, see emptyblok for format of a
dia block.
labels:
true -> plot station labels and location.
false -> plot station location only.
S:
Struct array with markup for stations, with fields:
- color: Colour triple [r g b].
- markerfacecolor: Colour triple [r g b].
- marker: String, see Matlab plot function.
- markersize: Integer.
- fontsize: Integer.
- legenda: String to be displayed in legend.
- linewidth: Integer indicating the width of the marker edge.
- callback: Function handle of function to call when the
station is clicked on.
- locatie: Char array with stationcodes(sLoccod),
use 'default' to specify default marker.
OUTPUT:
No direct output, the stations specified in the dia blocks are displayed
in the axis with the specified markers.
See also: emptyblok
<TOOLBOX>\diaroutines
18-Aug-2008 12:18:04
3957 bytes
dispperiode - Plot periode van overzicht op gestandaardiseerde wijze
CALL:
S = dispperiode(GPDS,T_reeks)
INPUT:
GPDS: Getijparameterdataset met de volgende kolommen
kolom1: teken (1 bovenculminatie) (0 onderculminatie)(uit culminatie.mat)
kolom2: Culminatietijdstip op nulmeridiaan (Greenwich Meant Time)(uit culminatie.mat)
kolom3: paralax vd maan (uit culminatie.mat)
kolom4: declinatie van de maan (uit culminatie.mat)
kolom5: tijd hoogwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom6: stand hoogwater
kolom7: tijd laagwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom8: stand laagwater
T_reeks: kolom met tijdstappen (optioneel)
OUTPUT:
S: <string> met periode informatie
APPROACH:
Als invoer bestaat uit GPDS (nargin==1):
Bepaal de minimum en maximum van kolom2 van GPDS
Als invoer bestaat uit T_reeks (nargin==2):
Bepaal de minimum en maximum van T-reeks
Display begin- en einde van analyseperiode
NOTE:
Kolom 5/7 van GDPS = Tijdstip HW/LW - tijdstip doorgang in plaatselijke
meridiaan (TDPM)
TDPM is berekend als:
culminatie tijdstip
+2*(24 uur+50 min) (2 maanscycli)
+1uur (GMT omgerekend naar MET
-20 min (tijdverschil maansdoorgang nulmeridiaan- 5graden meridiaan)
<APPLICROOT>\melissa2006\GETIJBEHEER
07-Jan-2007 19:56:34
2169 bytes
do_delete_dia - verwijder dias uit de melissa database
CALL:
db = do_delete_dia(db,index)
INPUT:
db: <undoredo object> met de centrale database
index: <index> met de uit de database te verwijderen dias
OUTPUT:
db: <undoredo object> met de centrale database waaruit de betreffende
dias verwijderd zijn
See also: databeheer, do_import_dia
<APPLICROOT>\melissa2006\DATABEHEER
12-Dec-2006 05:15:42
681 bytes
do_import_dia - voer de import actie voor een dia uit en importeer TE
reeksen met 10 of 60 minuten tijdstap of TN reeksen van
het type WATHTE of WATHTBRKD
CALL:
[db,NEWGROUP] = do_import_dia(C,fname,blok,db,NEWGROUP)
INPUT:
C: <struct> met melissa constantes
fname: <string> met de bestandsnaam van de te importeren dia
blok: <struct array> (optioneel) met dia blokken
db: <undoredo object> met de centrale database
NEWGROUP: <boolean> true --> nieuwe groep beginnen
false --> doorgaan met bestaande groep
progressbar: <handle> van een progressbar
OUTPUT:
db: <undoredo object> met de bijgewerkte database met nieuwe
reeksen
NEWGROUP: <boolean> true --> nieuwe groep begonnen
false --> doorgegaan met bestaande groep
See also: databeheer
<APPLICROOT>\melissa2006\DATABEHEER
21-Jul-2008 07:10:20
13771 bytes
do_import_model - importeer modellen voor het bijschatten van reeksen
in het werkgebied
CALL:
db = do_import_model(C,fname,modelArray,db)
INPUT:
fname: <string> met de naam van het te importeren bestand
regressieArray: <array of struct> van netwerken zie
emptystruct('netwerk')
db: <undoredo object> met de centrale database
OUTPUT:
db: <undoredo object> de centrale database waarin de lijst
met neurale netwerken is aangepast
<APPLICROOT>\melissa2006\MODELBEHEER
17-Oct-2007 11:47:46
2218 bytes
dprintf - shortcut for disp(sprintf(formatstr,arg1,arg2,..arg14)) CALL dsprintf(formatstr,arg1,arg2,..arg14) INPUT formatstr : format string (char array) arg1,arg2,..arg14: OUTPUT a string is displayed in the command window See also: SPRINTF, DISP, EPRINTF, DDPRINTF dprintfb
<TOOLBOX>
16-Aug-2008 14:24:51
535 bytes
drawbox - select range than execute Commanstr
CALL
drawbox(N,CommandStr)
INPUT
N
N=1 ==> install
N=2 ==> move
N=3 ==> de-install
CommandStr
callback that will be executed when box is complete.
The arguments of the box, X1,X2,Y1,Y2, will be passed to the
called function
OUTPUT
This function returns no output arguments
<TOOLBOX>
15-Aug-2008 21:38:56
3693 bytes
dummyfun - dummy callback function CALL: dummyfun(obj,event) INPUT: obj: <handle> of the calling uicontrol event: <empty> standard Matlab callback argument OUTPUT: no output See also: autolegend
<TOOLBOX>
29-Dec-2006 18:40:40
285 bytes
<TOOLBOX>\docutool
10-Dec-2007 12:51:17
349 bytes
duration - Calculate duration of a timeunit in Matlab datenum units.
CALL:
d = duration(timeunit)
INPUT:
timeunit:
String with possible values:
- 'mnd' months;
- 'd' days;
- 'min' minutes;
- 'uur' hours;
- 'cs' centiseconds.
OUTPUT:
d:
Duration of the given timeunit in Matlab datenum units.
See also: cmp_taxis
<TOOLBOX>\diaroutines
15-Aug-2008 16:47:00
858 bytes
edit - edit a tablefileobject
CALL:
obj = edit(obj)
INPUT:
obj: <tablefile-object>
saveloadflag: <boolean> true to make save/load available
false otherwise
OUTPUT:
obj: <tablefile-object>
See also: tablefile, table
<TOOLBOX>\@tablefile
04-Aug-2008 16:13:26
12215 bytes
editable - make line editable. function to be passed as an input to the "linetool" utility
<TOOLBOX>
15-Aug-2008 12:37:04
2075 bytes
empty - Create empty structure with specified fields
CALL
S=empty('a','b','c')
S=empty(cellArray)
INPUT
argument list: list of field values
cellArray : cell array containing field names
OUTPUT
S: structure with empty fields
EXAMPLES
S=empty('a','b','c')
flds={'a','b','c'};
T=empty(flds{:})
Nanne van der Zijpp
Modelit 2007
<TOOLBOX>
16-Aug-2008 10:25:29
657 bytes
emptyDocument - create an empty Document Object Model (DOM) (only the
root node is present)
CALL:
document = emptyDocument(root)
INPUT:
root: (optional) <string> name of the root node
<org.apache.xerces.dom.ElementImpl>
<org.apache.xerces.dom.ElementNSImpl>
default == 'root'
OUTPUT:
document: <java-object> org.apache.xerces.dom.DocumentImpl
See also: xml, xml/view, xml/inspect
<TOOLBOX>\xml_toolbox\@xml\private
02-Jun-2006 08:10:50
1154 bytes
emptyRKS - Make default RKS (Reeksadministratie) block.
CALL:
RKS = emptyRKS
INPUT:
No input required.
OUTPUT:
RKS:
Structure with fields:
+----sRefvlk (char)
+----lBemhgt (double)
+----lBegdat (double)
+----iBegtyd (double)
+----sSyscod (char)
+----sTydehd (char)
+----iTydstp (double)
+----lXcrdgs (double)
+----lYcrdgs (double)
+----lVakstp (double)
+----lEnddat (double)
+----iEndtyd (double)
+----sRkssta (char)
+----lBeginv (double)
+----lEndinv (double)
+----sVzmcod (char)
+----sVzmoms (char)
+----sSvzcod (char)
+----sSvzoms (char)
+----sSsvcod (char)
+----sSsvoms (char)
+----sSsscod (char)
+----sSssoms (char)
+----lXcrdwb (double)
+----lYcrdzb (double)
+----lXcrdob (double)
+----lYcrdnb (double)
+----lXcrdmn (double)
+----lYcrdmn (double)
+----lXcrdmx (double)
+----lYcrdmx (double)
See also: emptyblok
<TOOLBOX>\diaroutines
18-Aug-2008 12:42:04
3518 bytes
emptyRow - make an empty table row for the given table-object
CALL:
obj = emptyRow(obj)
INPUT:
obj: <table object> table-object for which an empty row has to be made
N: <integer> number of emptyrows to generate
OUTPUT:
obj: <table object> a table with zero rows with the same format as the
input table
See also: table, table/append
<TOOLBOX>\@table\private
17-Sep-2006 20:27:16
742 bytes
emptyW3H - Make default W3H (W3H administratie) block.
CALL:
W3H = emptyW3H
INPUT:
No input required.
OUTPUT:
W3H:
Structure with fields:
+----sMuxcod (char)
+----sMuxoms (char)
+----lWnsnum (double)
+----sParcod (char)
+----sParoms (char)
+----sStaind (char)
+----nCpmcod (double)
+----sCpmoms (char)
+----sDomein (char)
+----sEhdcod (char)
+----sHdhcod (char)
+----sHdhoms (char)
+----sOrgcod (char)
+----sOrgoms (char)
+----sSgkcod (char)
+----sIvscod (char)
+----sIvsoms (char)
+----sBtccod (char)
+----sBtlcod (char)
+----sBtxoms (char)
+----sBtnnam (char)
+----sAnicod (char)
+----sAnioms (char)
+----sBhicod (char)
+----sBhioms (char)
+----sBmicod (char)
+----sBmioms (char)
+----sOgicod (char)
+----sOgioms (char)
+----sGbdcod (char)
+----sGbdoms (char)
+----sLoccod (char)
+----sLocoms (char)
+----sLocsrt (char)
+----sCrdtyp (char)
+----lXcrdgs (double)
+----lYcrdgs (double)
+----lGhoekg (double)
+----lRhoekg (double)
+----lMetrng (double)
+----lStraal (double)
+----lXcrdmp (double)
+----lYcrdmp (double)
+----sOmloop (char)
+----sAnacod (char)
+----sAnaoms (char)
+----sBemcod (char)
+----sBemoms (char)
+----sBewcod (char)
+----sBewoms (char)
+----sVatcod (char)
+----sVatoms (char)
+----sRkstyp (char)
See also: emptyblok
<TOOLBOX>\diaroutines
18-Aug-2008 12:32:00
4539 bytes
emptyWRD - Make default WRD (Waarde) block.
CALL:
WRD = emptyWRD
INPUT:
No input required.
OUTPUT:
WRD:
Structure with fields:
+----taxis (double)
+----lKeynr2 (double)
+----Wrd (double)
+----nKwlcod (double)
See also: emptyblok
<TOOLBOX>\diaroutines
18-Aug-2008 12:30:44
503 bytes
emptyblok - Make an empty Donar data block.
CALL:
blok = emptyblok
INPUT:
No input required.
OUTPUT:
blok:
Donar data block, with the following required partial data blocks:
- W3H
- RKS
- WRD (must contain at least one row of data)
optional partial data blocks:
- MUX
- TYP
- TPS
See also: readdia_R14, writedia_R14, emptyDia, emptyW3H, emptyWRD,
emptyMUX, emptyTPS
<TOOLBOX>\diaroutines
18-Aug-2008 13:29:16
766 bytes
emptydia - Create an empty dia.
CALL:
S = emptydia(n)
INPUT:
n:
Number of blocks filled with default values, default value: 0.
OUTPUT:
S:
Dia Structure, with fields:
+----IDT
| +----sFiltyp (char)
| +----sSyscod (char)
| +----lCredat (double)
| +----sCmtrgl (char)
+----blok
+----W3H (struct): see emptyW3H
+----MUX (struct): empty, see emptyMUX
+----TYP (struct): empty
+----RGH (struct): empty, see emptyRGH
+----RKS (struct): see emptyRKS
+----TPS (struct): empty, see emptyTPS
+----WRD (struct): see emptyWRD
APPROACH:
This function inializes the structure with the correct fields. Besides
correct fields there are several other conditions a Dia structure must
satisfy.
EXAMPLE:
s=emptydia(1);
<CHANGE STRUCTURE s>
writedia_R14(s,'dia.dia');
See also: readdia_R14, writedia_R14, emptyblok, emptyW3H, emptyWRD, emptyMUX,
emptyTPS
<TOOLBOX>\diaroutines
18-Aug-2008 13:48:52
1551 bytes
THIS METHOD IS FOR INTERNAL USE IN UNDOREDO TOOLBOX
emptyhistory - create an empty history array for an undo object
CALL
history=emptyhistory(data,mode)
INPUT
obj: undoredo object: the following fields are used
obj.data
obj.mode
data: initial data for object
mode: mode of operation (simple,memory,cached)
OUTPUT
history: history structure
CALLED FROM
mbdundomenu, mbdundoobj
<TOOLBOX>\matlabguru\@undoredo\private
27-May-2006 15:53:28
1643 bytes
emptyopt - private functuin for class helpmenuobj
SUMMARY
Create appendable structure for storage in struct array of helpmenu
object.
CALL
S=emptyopt
INPUT
none
OUTPUT
S:
initial structure , that can be appended.
<TOOLBOX>\@helpmenuobj\private
17-Aug-2008 12:53:20
459 bytes
emptystruct - maak structures aan die al het goede formaat hebben INPUT: type: <string> OUTPUT: S: <struct> lege structure See also: emptyud
<APPLICROOT>\melissa2006\HULPFUNCTIES
29-Mar-2007 17:12:36
9797 bytes
emptytransact - initialize transaction record with empty data
CALL
S=emptytransact
INPUT
none
OUTPUT
transaction record with empty data
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:19:22
514 bytes
emptyu - initialiseer undoredo object voor Melissa
CALL:
[db,filename] = emptyu(C,filename,signature)
INPUT:
C: <struct> met constantes voor de melissa applicatie
filename: <string> met de naam van het te openen bestand
signature: <double> (optioneel) met signaturen van het undoredo object
OUTPUT:
db: <undoredo object> met een 'leeg' werkgebied.
filename: <string> met de bestandsnaam van het werkgebied
<APPLICROOT>\melissa2006\HULPFUNCTIES
13-Feb-2007 20:27:12
2534 bytes
emptyud - maak een lege userdata structure aan
CALL:
ud = emptyud(stamp)
INPUT:
C: <struct> met de melissa constantes
stamp: <double> inititiele tijd stempel voor het veld timeofchange
TIP: laat dit veld overeen komen met het veld
'timeofcommit' in een overkoepelende structure
OUTPUT:
ud: <struct> een 'lege' userdata structure.
APPROACH:
Deze functie komt in de plaats van een klassieke declaratie en maakt het
mogelijk om:
1. structures te rangschikken in een array
2. te testen op bepaalde veldwaardes, zonder een dergelijke test vooraf
te laten gaan door een test met 'isfield'
See also: emptyu, emptystruct, constantes_melissa, tablefile
<APPLICROOT>\melissa2006\HULPFUNCTIES
17-Jun-2008 14:16:38
3315 bytes
eprintf - shortcut for error(sprintf(formatstr,arg1,arg2,..arg14)) CALL: eprintf(formatstr,arg1,arg2,..arg14) INPUT: formatstr : format string (char array) arg1,arg2,..arg14: OUTPUT: a string is displayed in the command window See also: sprintf, disp, dprintf
<TOOLBOX>
26-Feb-2008 23:11:32
403 bytes
evaldepend - evaluate update structure for combination of object and figure
SUMMARY
This function evaluates the update structure for the combination of:
- 1 or moder undoredo objects registered with setdepend
- a figure
Prior to calling this function the dependency tree must be specified
using the setdepend command.
CALL:
upd = evaldepend(HWIN, ind, signature)
INPUT:
HWIN: figure handle
ind: subscripts applied to modify object data
signature: signature of modified undoredo object
OUTPUT:
upd: <struct> that contains the screen elements that should or
should not be updated
upd.property=0 ==> do not update screen element
upd.property=1 ==> updates screen element
EXAMPLE
The code below provides a template for usage of dependency trees
In the present example 2 undoredo objects are used. Typically this is
needed when the application depends on:
-1- workspace data
-2- user preferences
%Include in the main body of the application:
db=undoredo(initdb,'disp',@dispdata);
setdepend(HWIN, db, data2applic);
opt=undoredo(initopt,'disp',@dispsettings);
setdepend(HWIN, opt, settings2applic);
function s=initdb
-user definded function-
function s=initopt
-user definded function-
function db=get_db
-user definded function-
function opt=get_opt;
-user definded function-
function dispdata(signature,db,ind)
upd = evaldepend(HWIN, ind, signature)
opt=get_opt;
view(db,opt,upd);
function dispsettings(signature,opt,ind)
upd = evaldepend(HWIN, ind, signature)
db=get_db;
view(db,opt,upd);
function view(db,opt,upd)
-user definded function-
if upd.element1
-user definded action-
end
if upd.element2
-user definded action-
end
See also: setdepend, mdlt_dependencies
<TOOLBOX>\matlabguru
10-Aug-2008 19:31:56
3301 bytes
This file has been generated automatically by function exetimestamp_create
<APPLICROOT>\Melissa2006
29-Jul-2008 19:57:54
415 bytes
exist_cmp - check if file or directory exists
CALL
rc=exist_cmp(str,mode)
INPUT
str: string to look for
mode: {'file'} or 'dir'
SEE ALSO
isdirectory
EXAMPLES
exist_cmp('utils','dir')
exist_cmp('aotoexec.bat','file')
NOTE:
-1-
this version behaves like 'exist' but can be compiled
-2-
This function is now obsolete because Matlab provides a version of
exist that compiles without problems
<TOOLBOX>
17-Aug-2008 18:04:34
1192 bytes
extensie- verify extension, append if needed
CALL
fname=extensie(fname,ext)
INPUT
fname:
candidate filename
ext :
required file extension
OUTPUT
fname:
filename including extension
See also: fileparts, putfile, getfile
<TOOLBOX>
15-Aug-2008 12:52:35
611 bytes
f_eqfit - Fit verloop lijn door equidistante reeks door interpolatie
CALL:
E_reeks_out=f_eqfit(NE_reeks2,E_reeks,T_reeks,NE_reeks1)
INPUT:
NE_reeks2: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2:
code=1==> hoog
code=2 ==>laag
andere codes mogen niet voorkomen (aggers worden niet geaccepteerd)
E_reeks: equidistante reeks met standen
T_reeks: corresponderende tijdstippen
OUTPUT:
E_reeks: equidistante reeks met berekende standen
APPROACH:
doel van de functie:
Vervormen van een equidistante invoer reeks met de verschil reeks
NE_reeks2-NE-Reeks1, Na afloop van de functie aanroep gaat E-reeks door
de extremen in NE-Reeks2
Eerst wordt gecontroleerd, of NE_reeks als argument is meegegven
Als dit niet het geval is dan wordt NE_reeks aangemaakt door extremen te
bepalen van de ingevoerde equidistante reeks
Er wordt voor gezorgd dat NE_reeks1 ne NE_reeks2 op een gelijke of kortere
periode betrekking hebben dan de ingevoerde equidistante reeks.
Hiertoe worden alle te vroege of te late elementen uit NE_reeks1 en
NE_reeks2 verwijderd.
NE_reeks1 en NE_reeks2 worden uitgebreid met het eerste datapunt uit de
ingevoerde equidistante reeks.
NE_reeks1 en NE_reeks2 worden gesynchroniseerd door alle elementen die
niet matchen binnen een periode DELTA (ingesteld op 1.5 uur) te
verwijderen. Wat overblijft zijn de z.g. gemeenschappelijke extremen.
Het synchroniseren vindt plaats in een aparte procedure synchronize.m
Er wordt een verschilreeks van samengesteld met twee kanalen:
NE_reeks1(:,1)-NE_reeks1(:,3) (verschuiving in tijd die nodig is om op
NE_reeks2 uit te komen)
NE_reeks2(:,3)-NE_reeks1(:,3) (verschuiving in stand die nodig is om op
NE_reeks2 uit te komen)
Deze verschil reeks bevat voor elk tijdstip ui NE_reeks1 twee
corresponderende verschuivingen.
Zowel de verschilreeks in tijd als verschilreeks in stand wordt nu
lineair geinterpoleerd. Dit gebeurt met behulp van de staard Matlab
routine 'interp1.m'. De interpolatie vindt plaats naar de tijdstippen
die corresponderen met de oorspronkelijk opgegeven equidistante reeks.
Er wordt een 'hulp' niet equidistante reeks gecreeerd door het verschil
in tijd en het verschil in stand bij de oorspronkelijke equidistante
reeks op te tellen.
Deze hulp reeks wordt weer equidistant gemaakt door lineaire
interpolatie. Het resultaat hiervan is de uitvoerreeks.
<APPLICROOT>\melissa2006\FUNCTIES
13-Feb-2007 09:58:56
4614 bytes
f_getyan10 - Koppelen eerder bepaalde hoog en laagwaters
aan maansculminatie
CALL
function GPDS=f_getyan10(NE_reeks,havegetalHW,havegetalLW,koppeltijd,culminatie)
INPUT
NE_reeks: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2: code=1==> hoog code=2 ==>laag
kolom3: stand
havegetalHW: voorlopig havengetal HW [uren!!]
havegetalLW: voorlopig havengetal LW [uren!!]
koppeltijd: periode [uren] waarbinnen koppeling moet plaatsvinden
culminatie: culminatiegegevens, matrix met de volgende kolommen
kolom 1: tijdstip (Matlab datenum)
kolom 2: boven/onder
kolom 3: maansparallax
kolom 4: maansdeclinatie
OUTPUT
GPDS: Getijparameterdataset met de volgende kolommen
kolom1: teken (1 bovenculminatie) (0 onderculminatie)(uit culminatie.mat)
kolom2: Culminatietijdstip op nulmeridiaan (Greenwich Meant Time)(uit culminatie.mat)
kolom3: paralax vd maan (uit culminatie.mat)
kolom4: declinatie van de maan (uit culminatie.mat)
kolom5: tijd hoogwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom6: stand hoogwater
kolom7: tijd laagwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom8: stand laagwater
S: <string> met commentaar gegenereerd tijdens de berekening
OUTPUT NAAR SCHERM
informatie die wordt opgevangen ten behoeve van het overzicht
Het overzicht geeft een melding van:
- elk HW en LW dat niet gekoppeld kan worden,
- van het totaal aantal HW en LW gekoppeld,
- van de gemiddelde verschuiving die bovenop het voorlopig
havengetal is toegepast,
- van de ontbrekende HW en LW gegevens per culminatie.
APPROACH:
De functie wordt voor elk station apart aangeroepen.
initialiseer op de te berekenen GPDS op een lege verzameling
De tabel culminatie bevat de culminatiegegevens voor een
lang periode. Om rekentijd te besparen wordt een
uitsnede uit deze tabel met culminatie gegevens gemaakt:
- bepaal ruime ondergrens
- bepaal ruime bovengrens
Voeg nu twee tijdelijke kolommen toe aan NE_reeks:
- kolom voor culminatie nummer (index in culminatiesubset)
- kolom voor berekening afwijking tov opgegeven havengetal
Controleer of de NE-reeks vrij is van aggers, LW1 en LW2's
Voor ieder element van de NE-reeks, koppel het HW en LW
- Bereken eerst het koppeltijdstip
- Bepaal de culminaties 'culm' die binnen het opgegeven
aantal uren liggen
(de variabele 'culm' heeft lengte 0 of 1, >1 kan niet voorkomen
omdat culminatietijdstippen meer dan 5 uren verschillen)
Rapporteer gemiddelde afwijking bij koppelen HW
Rapporteer gemiddelde afwijking bij koppelen LW
Vul nu de GPDS:
Bepaal de eerste en laatste culminatie die is gevonden
Omdat een equidistante reeks gevormd moet worden,
worden alle culminaties meegenomen.
Eventueel kunnen hiaten opteden.
Zet eerst alle gegevens die uit NE reeks moeten komen op NaN
Vul tijdverschil en stand hoogwaters
In te vullen; tijdstip HW - tijdstip doorgang in plaatselijke
meridiaan (TDPM)
TDPM is berekend als:
culminatie tijdstip
+2*(24 uur+50 min) (2 maanscycli)
+1uur (GMT omgerekend naar MET
-20 min (tijdverschil maansdoorgang nulmeridiaan- 5graden meridiaan)
Vul tijdverschil en stand laagwaters.
In te vullen; tijdstip LW - tijdstip doorgang in plaatselijke
meridiaan (TDPM)
TDPM is berekend als:
culminatie tijdstip
+2*(24 uur+50 min) (2 maanscycli)
+1uur (GMT omgerekend naar MET
-20 min (tijdverschil maansdoorgang nulmeridiaan- 5graden meridiaan)
Rapporteer het aantal culminaties waarvoor geen HW gekoppeld
Rapporteer het aantal culminaties waarvoor geen LW gekoppeld
<APPLICROOT>\melissa2006\FUNCTIES
09-Feb-2007 02:34:16
13443 bytes
f_havenget - Bereken het gemiddelde havengetal
CALL:
[TculmHW,StandHW,HavengetHW,TculmLW,StandLW,HavengetLW,begin,einde]=...
f_havenget(GPDS,deltaT,deltaH,optie,Ptijd,Pstand)
INPUT:
GPDS: Getijparameterdataset met de volgende kolommen
kolom1: teken (1 bovenculminatie) (0 onderculminatie)(uit culminatie.mat)
kolom2: Culminatietijdstip op nulmeridiaan (Greenwich Meant Time)
(uit culminatie.mat)
kolom3: paralax vd maan (uit culminatie.mat)
kolom4: declinatie van de maan (uit culminatie.mat)
kolom5: tijd hoogwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom6: stand hoogwater
kolom7: tijd laagwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom8: stand laagwater
deltaT: outliercriterium voor tijd binnen klasse (in uren)
deltaH: outliercriterium voor hoogte binnen klasse (in centimeters)
Ptijd: gewicht bij interpoleren Tijd (eenheid: 1/uur^2)
Pstand: gewicht bij interpoleren Stand (eenheid: 1/uur^2)
S: <cell array> met commentaar
OUTPUT:
TculmHW : culminatie tijdstip modulo 12
StandHW : stand Hoogwater in cm
HavengetHW: periode tussen doorgang door plaatselijke meridiaan en
eerstvolgende HW
TculmLW :
StandLW : stand Laagwater in cm
HavengetLW: periode tussen doorgang door plaatselijke meridiaan en
eerstvolgende LW
begin : begin analyseperiode
einde : einde analyseperiode
S: <string> met commentaar
WERKWIJZE
Voer een identieke berekening uit, apart voor Hoog- en Laagwaters
Deze berekening vindt plaats in de functie f_havenget1 en houdt in:
- Verwijder de hiaten die eventueel in de dataset zitten
Deze hiaten zijn te herkennen aan het feit dat NaN is ingevuld voor
tijdstip of stand
- verwijder outliers, apart voor boven en onderculminaties
zoek de indices op voor de bovenculminaties (fb) en voor de
onderculminaties (fo)
het verwijderen van de outliers is voor de boven- en onder
culminaties een identiek proces. Dit proces vindt plaats in de
subfunctie F_HAVENGET2.
De werking van dit proces is als volgt:
- alle data worden gesorteerd op basis van tijd van de dag (modulo 24 uur)
- indien optie == 'm' bereken een voortschrijdende mediaan
- indien optie == 'g' bereken een voortschrijdend gemiddelde
opmerking1: Het voortschrijdende kental wordt berekend met een gecentreerde
horizon van 1 uur (dis is instelbaar met de constante HORIZON)
opmerking2: voortschrijdende mediaan is minder gevoelig voor outliers dan
voortschrijd gemiddelde
- verwijder alle elementen uit de tijdreeks die ten opzichte van het
voortschrijdende kental qua hoogte meer dan hoogte deltaH afwijken
- bereken voortschrijdende meridiaan of gemiddelde (afhankelijk van optie)
opniew
- verwijder alle elementen uit de tijdreeks die ten opzichte van het
voortschrijdende kental qua tijd van HW/LW meer dan deltaT afwijken
- voeg boven en onder culminatie samen (in de dataset is nu niet meer te
zien of een bepaald HW/LW een boven of onderculminatie betreft)
- voeg culminaties samen modulo een 1/2 dag(in de dataset wordt nu geen
onderscheid meer gemaakt tussen bijvoorbeeld 9.00 en 21.00)
- sorteer de resulterende dataset opnieuw op tijd
- bereken opnieuw het gecentreerd voortschrijdend gemiddelde van stand
en havengetal. Op basis van deze gegevens kan een de aardappelgrafiek
berekend worden
- voor elke uur = 0 tm 12:
voer het voortschrijde gemiddelde voor tijd en stand uit voor het eerste
culminatie tijdstip> uur+1/2 Omdat de straal van de berekening van het
voortschrijden gemiddelde steeds een half uur is, worden op deze manier
steeds uur gemiddelden bepaald
- Voer tot slot het gemiddelde van de 12 gegevens die hierboven zijn berekend uit
<APPLICROOT>\melissa2006\FUNCTIES
09-Feb-2007 02:52:10
12688 bytes
NE_reeks - Bereken hoog- en laagwaters
CALL:
[NE_reeks, S] = f_hooglaag(E_reeks,T_reeks,N1,N2,P,Pcentre)
INPUT:
E_reeks: equidistante reeks met standen
T_reeks: corresponderende tijdstippen
N1: (uren) zoek maximum in intervals t-N1:t+N1
N2: (uren) interpoleer met N2 uren
P: indien N2>0: gewicht voor afwijking tov waarneming
Pcentre: indien N2>0: gewicht voor centrale waarneming
OUTPUT:
NE_reeks: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2: code=1==> hoog code=2 ==>laag
kolom3: stand
S: <string> met commentaar voor logboek
APPROACH:
De variabele 'printopt' geeft aan of er wel of niet boodschappen
naar het scherm moeten worden geschreven. De defaultwaarde is 1
(wel boodschappen op scherm).
N1 en N2 zijn in uren gespecificeerd. Intern rekent de module
met periode-aantallen. De peiode-aantallen die corresponderen
met N1 en N2 uur zijn N1per en N2per.
De maxima en minima van E_reeks worden bepaald met behulp
van de utility 'indexmax'. maxperiods en minperiods zijn
indices naar maxima en minima met leeftijd >= N1per
Als N2per > 0:
- Interpoleer de maxima met de subfunctie 'interpmax'
- Interpoleer de minima op basis van de negatieve reeks
Als N2per == 0:
- Stel de maxima en minima gelijk aan de gevonden maxima en minima
Zet nu de maxima en minima achter elkaar in een NE-reeks
die nog niet op tijd is gesorteerd.
Sorteer deze NE-reeks op tijdstip
Als 'printopt==1' print dan informatie naar het scherm.
===============
SUBFUNCTIES van f_hooglaag.m
===============
function [maxinstant,maxvalues]=interpmax(maxperiods,x,y,N,P,Pcentre)
interpoleer maxima
INPUT:
maxperiods: indices in x; periodes waar maxima optreden
x : x coordinaten
y : y coordinaten
N : aantal periodes te gebruiken bij interpolatie
P : interpolatieparameter
Pcentre : interpolatieparameter centrale waarde
OUTPUT:
maxinstant: de tijdstippen waarop de maxima vallen
maxvalues : de bijbehorende maxima
De maxima worden bepaald met een 'brute force' methode:
De functie wordt geinterpoleerd naar 1 minuut waarden,
waarvan vervolgens het maximum wordt bepaald.
Door het aanpassen van de constante 'STEPSIZE'
(momenteel 1 minuut) kan een fijner of grover grid
worden gekozen.
In een loop worden alle maxima geinterpoleerd.
Per maximum:
Bepaal eerste en laatste periode voor interpolatie
Normaal: maxperiods(k)-N,maxperiods(k)+N
Bewaak echter grenzen van array
strtper is eerste periode, endper is laatse periode.
(strtper en endper zijn indices in x)
Verdeel interval strtper-endper in vakjes van lengte
STEPSIZE ==> xgrid
Construeer vectoren X en Y die corresponderen met
x(strtper:endper) en y(strtper:endper), maar waaraan links
en rechts van het centrum z.g. 'buigpunten' zijn toegevoegd.
Op deze knikpunten wordt de afwijking niet gewogen, maar
wordt wel een discontinuiteit in de tweede
afgeleid toegestaan.
Construeer een matrix P met weegfactoren.
De feitelijke interpolatie wordt uitgevoerd op
basis van X, Y en P en levert
voor de opgegeven punten xgrid de waardes ygrid op.
De interpolatie vindt plaats in de routine CUBSPLINE
Opm1: Als meerdere maxima worden gevonden
wordt het tijdstip gemiddeld.
Opm2: Als de interpolatie mislukt,
verschijnt een melding en wordt de exacte doorgeven
<APPLICROOT>\melissa2006\FUNCTIES
12-Feb-2007 16:22:32
14522 bytes
f_laaglaag - Bereken laag-laagwaterspring
CALL:
S = f_laaglaag(GPDS,reeks)
INPUT:
GPDS: <struct> Getijparameterdataset met de volgende kolommen
kolom1: teken (1 bovenculminatie) (0 onderculminatie)
(uit culminatie.mat)
kolom2: Culminatietijdstip op nulmeridiaan (Greenwich Mean Time)(uit culminatie.mat)
kolom3: paralax vd maan (uit culminatie.mat)
kolom4: declinatie van de maan (uit culminatie.mat)
kolom5: tijd hoogwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom6: stand hoogwater
kolom7: tijd laagwater t.o.v. culminatie tijdstip op nulmeridiaan
kolom8: stand laagwater
S: <cell array> met verslag
OUTPUT:
S: <cell array> met verslag
APPROACH:
Bepaal de culminaties die het dichtst bij 0 of 12 liggen.
Hiertoe wordt een kolom gedefinieerd als het absolute
verschil tussen culminatietijdstip en 0 of 12 uur
van deze kolom worden minima berekend met een leeftijd van 5 periodes
merk op dat de culminaties elke dag +- 50 min opschuiven zodat op deze
wijze alle relevante maxima gevonden worden
Alle hoogwaters die bij de gevonden culminaties horen zijn spring
hoogwaters. De laagwaters die bij deze culminaties horen, en de
laagwaters van 1 culminatie terug zijn springlaagwaters
Voor elk jaar dat geheel of gedeeltelijk in de dataset zit wordt:
- Van elke maand de minimale stand geplot die bij een spring LW hoort
- Voor het gehele jaar (voorzover dit in de dataset voorkomt) de
gemiddelde LLWS geplot
<APPLICROOT>\melissa2006\FUNCTIES
11-Feb-2007 20:54:36
3551 bytes
f_ongelijkheid - bepaal dagelijkse ongelijkheid
CALL:
S = f_ongelijkheid(NE_reeks)
INPUT:
NE_reeks: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2: code=1==> hoog code=2 ==>laag
kolom3: stand
OUTPUT:
S: <string> informatie die wordt opgevangen tbv het overzicht
APPROACH:
Dagelijkse ongelijkheid voor waarneming i:
= abs(HW(i)-HW(i+1)) indien 6:00<=HW(i)<18:00 en 18:00<=HW(i+1)<6:00
of 18:00<=HW(i+1)<6:00 en 6:00<=HW(i)<18:00
Splits de NE reeks in een gedeelte met alleen Hoogwaters en een gedeelte
met alleen laagwaters, roep voor beide gedeeltes de functie
'ongelijkheid_subfunc' aan
functie ongelijkheid_subfunc:
INPUT:
NE_reeks: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2: code=1==> hoog code=2 ==>laag
kolom3: stand
OUTPUT:
ongelijkheid : gemiddelde dagelijkse ongelijkheid
maxongelijkheid : maximum dagelijkse ongelijkheid
succes : =1 als berekening succesvol
Werkwijze:
- Ontagger de reeks
- Bepaal tijd van de dag in uren
- Bepaal alle Extremen met 6:00<=extreem(i)<18:00
en 18:00<=extreem(i+1)<6:00
Controleer ook dat de extremen niet verder dan 24uur verwijderd
liggen ivm hiaten
- Bepaal alle Extremen met 18:00<=extreem(i)<6:00
en 6:00<=extreem(i+1)<18:00
Controleer ook dat de extremen niet verder dan 24uur verwijderd
liggen ivm hiaten
- Definieer delta als de verschillen tussen twee elkaar
opvolgende extremen
- bereken max(delta) en mean(delta)
<APPLICROOT>\melissa2006\FUNCTIES
12-Feb-2007 08:00:38
6888 bytes
f_tussenschr - Bepaal tussenschrijding
CALL:
f_tussenschr(E_reeks,T_reeks,ondergrens,bovengrens,printoptie)
INPUT
E_reeks: equidistante reeks met standen
T_reeks: corresponderende tijdstippen
ondergrens: onder grens voor de standen van de te zoeken periodes
bovengrens: boven grens voor de standen van de te zoeken periodes
printoptie:
0 - print alleen geaggregeerde kentallen
1 - print begin en eind van elke periode
2 - print begin en aantal tijdstappen van elke periode
OUTPUT
S: <string> met commentaar voor het logboek
APPROACH:
Bepaal op basis van het criterium, voor welke periode tussenschrijding
plaatsvindt. Voer het percentage tussenschrijding uit naar het scherm.
Groepeer de tussenschrijdingsperiodes in clusters van aaneensluitende
periodes dit gebeurt in de functie GROUP.
Print voor elke groep een regel op het scherm (behalve als printoptie==0)
De opmaak van de regel hangt af van de invoer variabele 'printoptie'.
<APPLICROOT>\melissa2006\FUNCTIES
09-Feb-2007 14:22:56
2498 bytes
f_vliegplan - Bepaal vliegplan
CALL:
f_vliegplan(E_reeks,T_reeks,bovengrens,kustvaknaam,stationsnaam,vliegrichting,deltat)
INPUT:
E_reeks : equidistante reeks met standen
T_reeks : corresponderende tijdstippen
bovengrens : boven grens voor de standen van de te zoeken periodes
kustvaknaam : aanduiding kustvak
stationsnaam : aanduiding station
vliegrichting: aanduiding vliegrichting
deltat : vervroeging van de vliegperiode ten opzichte van
berekende periode
OUTPUT:
geen
APPROACH:
Bepaal op basis van het criterium, voor welke periode onderschrijding
plaatsvindt.
Groepeer de tussenschrijdingsperiodes in clusters van aaneensluitende
periodes dit gebeurt in de functie GROUP.
Print voor elke groep een regel op het scherm.
De opmaak van iedere regel is conform het vliegplan
<APPLICROOT>\melissa2006\FUNCTIES
09-Feb-2007 13:27:44
3553 bytes
f_zuiver - zuiver aggers
CALL:
[NE_reeks, S, numverwijderd] = f_zuiver(NE_reeks, optie)
INPUT:
NE_reeks: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2:
code=1==> hoog
code=2 ==>laag
code=3 ==> eerste laagwater
code=4 ==> top agger
code=5 ==> tweede laagwater
kolom3: stand
optie: uit te voeren actie
optie=1 ==>LW agger vervangen door laagste LLW met tijd en code 2
optie=2 ==>controleer aggers op jaarboekeis, als ze niet
voldoen vervangen LLW
optie=3 ==>Handhaaf LW1 met code 2, verwijder LW2
optie=4 ==>Handhaaf LW2 met code 2, verwijder LW1
optie=5 ==>Voer een aantal logische controles uit
(code 3 wordt niet door code 4 en 5 gevolgd door laagste LW)
OUTPUT:
NE_reeks: Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2:
code=1 ==> hoog
code=2 ==>laag
code=3 ==> eerste laagwater
code=4 ==> top agger
code=5 ==> tweede laagwater
kolom3: stand
S: <string> met commentaar
numverwijderd: <integer> aantal aangepaste punten
APPROACH:
Als de opgegeven code gelijk is aan 1,2 ,3 of 4 (zie boven), dan is de
werkwijze als volgt: Eerst worden alle top aggers opgespoord in de te
bewerken dataset. Vervolgens wordt gekeken of het inderdaad om een
complete agger gaat. Dat wil zeggen dat het voorgaande record in de NE
reeks een LW1 (code 3) moet zijn en het volgende record in de NE reeks
een LW2 (code 5) moet zijn. Indien een van beide niet het geval is wordt
de volgende melding gegeven:
>> <periodeaanduiding>: incomplete agger
Er wordt voor deze agger dan geen actie uitgevoerd.
Als de agger compleet is dan hangt de verdere actie af van de
opgegeven code:
1. LW agger wordt vervangen door laagste LW, met de bijbehorende tijd
en code 2.
2. Vervang aggers die niet aan de jaarboekeis voldoen door
het laagste LW.
3. Handhaaf LW1 met code 2 en verwijder LW2.
4. Handhaaf LW2 met code 2 en verwijder LW1
5. Voer een aantal logische controles uit.
<APPLICROOT>\melissa2006\FUNCTIES
13-Feb-2007 09:56:36
8269 bytes
field2index - return the columnnumber of the fields
CALL:
index = field2index(obj,field)
INPUT:
obj: <table-object>
varargin: <string> with columnnames
OUTPUT:
index: <array of integer> with number of column of columnname,
0 if not present in table
See also: table, table/fieldnames, table/renameColumn, table/deleteColumn
<TOOLBOX>\@table
16-Sep-2006 15:28:24
507 bytes
fieldInfo - determine the number and names of the direct children of the
root node and the name of the root node
CALL:
S = fieldInfo(obj)
INPUT:
obj: <xml-object>
OUTPUT:
S: <struct> with fields
- root : <string> name of the root node
- children : <struct> with fields
- name: <string> names of the direct children of
the root node
- frequency: <int> number of time a certain node
appears
See also: xml, xml/display
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:36:56
1322 bytes
fieldnames - determine the columnames of the table CALL: fields = fieldnames(obj) INPUT: obj: <table object> OUTPUT: fields: <cellstring> with the fields (columnnames) of the table APPROACH: this function is also important for autocomplete in the command window SEE ALSO: table, fieldnames
<TOOLBOX>\@table
16-Sep-2006 10:30:06
465 bytes
fieldnames - determine the fields of the undoredo-object that can be
changed by the user
CALL:
fields = fieldnames(obj)
INPUT:
obj: <undoredo-object>
OUTPUT:
fields: <cellstring> with the fields of the undoredo object
APPROACH:
this function is also important for autocomplete in the command window
SEE ALSO: undoredo, fieldnames
<TOOLBOX>\matlabguru\@undoredo
19-Sep-2006 21:29:50
468 bytes
fieldNames - get the names of the direct children of the root node
c.f. the function fieldnames for structures
CALL:
fields = fieldnames(obj)
INPUT:
obj: <xml-object>
OUTPUT:
fields: <cellstring> with the nodenames of the children of the root node
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
fieldnames(obj)
book1 = obj.book(1)
fieldnames(book1{1})
See also: xml, xml/getRoot, xml/noNodes, xml/isfield
<TOOLBOX>\xml_toolbox\@xml
26-Jun-2008 00:12:41
1527 bytes
figureProps - functie voor het instellen van een aantal figure properties
CALL:
figureProps(hwin, mode, varargin)
INPUT:
hwin: handle van figuur
mode: string, mogelijke waarden
'maximized' - maximaliseer window
'alwaysontop' - zorg dat window altijd zichtbaar is
varargin: extra argumenten
'maximized' -> flag == 1: maximaliseer window
flag == 0: originele afmetingen window
'alwaysontop' -> flag == 1 zorg dat window altijd zichtbaar is
flag == 0 normale modus
OUTPUT:
geen uitvoer
<TOOLBOX>
05-Dec-2007 14:08:42
1618 bytes
filechooser - add a filechooser to a frame
CALL:
filechooser(C,D,hframe)
INPUT:
C: <struct>
D: <struct>
hframe: <handle> of the frame to which the filechooser has to be added
fp_getfiletype: (optional) function pointer to function to determine
filetype
OUTPUT:
none, a filechooser is created in the specified frame
<TOOLBOX>\@filechooser
19-Aug-2008 14:56:46
8767 bytes
filldiadata - Bouw een DIA structure array uit NE reeksgegevens,
oorspronkelijke meta info en nieuwe meta info
CALL:
diadata = filldiadata(outdata, data, Defaultopt)
INPUT:
outdata: <struct array> met het veld NE_reeks:
Niet equidistante reeks met de volgende info
kolom1: tijdstippen
kolom2: code=1==> hoog code=2 ==>laag
kolom3: stand
data : corresponderende blokken met oorspronkelijke Meta info
Defaultopt: 1 blok met nieuwe Meta info
OUTPUT:
diadata: complete DIA structure. Het aantal blokken correspondeert met outdata en data
APPROACH:
uit outdata over te nemen:
- de WRD structure
uit data te gebruiken:
W3H.sHdhcod
W3H.sBemcod
W3H.sBemoms
W3H.sBewcod
W3H.sBewoms
W3H.sVatcod
W3H.sVatoms
W3H.sLoccod
W3H.sLocoms
W3H.sGbdcod
W3H.sGbdoms
W3H.sLocsrt
W3H.sCrdtyp
W3H.lXcrdgs
W3H.lYcrdgs
RKS.sRefvlk <==PLT info
RKS.lBemhgt
RKS.lXcrdgs
RKS.lYcrdgs
RKS.sSyscod <== SYS info
uit Defaultopt te gebruiken:
==============================================================================
filldiadata: start verwerking
Controleer of het aantal NE reeksen overeenkomt met aantal E reeksen
zoniet: geef een foutmelding
Initialiseer kopregel (IDT blok)
Vul de blokken van de DIA structure 1 voor 1
Bouw eerst het hele structure array op, kopieer daarna dit aaray naar
het veld 'blok' (Dit t.b.v. met compatibiliteit met Matlab compiler V5)
filldiadata: verwerking compleet
==============================================================================
==============================================================================
filldiadata: SUBFUNCTIES
==============================================================================
================================================
function blok=filldiadatablok(NEreeks,Eblok,Defaultopt)
CALL
blok=filldiadatablok(NEreeks,Eblok,Defaultopt);
INPUT
NEreeks: de weg te schrijven NE reeks
Eblok: het data blok met equidistante reeks waaruit NE reeks berekend is
Defaultopt: over te nemen default options voor NE reeksen
WERKWIJZE
vul de aparte structures W3H, MUX, TYP, RKS, TPS en WRD in aanroepen naar:
getW3H(Eblok,Defaultopt)
getMUX(Eblok,Defaultopt)
getTYP()
getRKS(Eblok,Defaultopt,tbegindate,tbegintime,tenddate,tendtime)
getTPS(tbegindate,tbegintime,tenddate,tendtime)
getWRD(NEreeks)
================================================
function S=getW3H(Eblok,Defaultopt)
getW3H - bepaal het W3H blok
CALL
S=getW3H(Eblok,Defaultopt)
INPUT
Eblok: (oude E reeks meta info)
Gebruik uit Eblok:
W3H.sHdhcod
W3H.sBemcod
W3H.sBemoms
W3H.sBewcod
W3H.sBewoms
W3H.sVatcod
W3H.sVatoms
W3H.sLoccod
W3H.sLocoms
W3H.sGbdcod
W3H.sGbdoms
W3H.sLocsrt
W3H.sCrdtyp
W3H.lXcrdgs
W3H.lYcrdgs
Defaultopt: default opties voor NE reeksen
Gebruik uit Defaultopt
het hele W3H blok
OUTPUT
S: een gevulde W3H structure
complete W3H structure
WERKWIJZE
ANI, BMI, BHI, OGI, ANA: overnemen uit stuurfile.
Deze stuurfile wordt als aparte invoer meegegeven.
================================================
function S=getMUX(Eblok,Defaultopt)
getMUX - bepaal het MUX blok
CALL
S=getMUX(Eblok,Defaultopt)
INPUT
Eblok: (oude E reeks meta info)
Gebruik uit Eblok:
W3H.sHdhcod
Defaultopt: default opties voor NE reeksen
Gebruik uit Defaultopt
het hele MUX blok
OUTPUT
S: een gevulde MUX structure (array)
Alle velden hebben een standaard waarde die afhangt van MUX veld in W3H blok.
Voorbeelden zijn meegeleverd in deel 8 van DONAR documentatie.
================================================
function S=getTYP
getTYP - vul het TYP blok
CALL:
S=getTYP
INPUT
-
OUTPUT
S: TYP blok:
Alle velden invullen conform voorbeeld NE reeks.
================================================
function S=getRKS(Eblok,Defaultopt,tbegindate,tbegintime,tenddate,tendtime)
getRKS - bepaal het RKS blok
CALL
S=getRKS(Eblok,Defaultopt,tbegindate,tbegintime,tenddate,tendtime)
INPUT
Eblok: (oude E reeks meta info)
Gebruik uit Eblok:
RKS.sRefvlk <==PLT info
RKS.lBemhgt
RKS.lXcrdgs
RKS.lYcrdgs
RKS.sSyscod <== SYS info
Defaultopt: default opties voor NE reeksen
Gebruik uit Defaultopt
het hele RKS blok
tbegindate,tbegintime,tenddate,tendtime: reeks begin en eindtijdstippen
OUTPUT
S: een gevulde RKS structure
RKS blok:
Tijdinterval komt overeen met eerste en laatste waarde
PLT,SYS velden krijgen de default waarde.
sSyscod: 'CENT'
lXcrdgs: 11185000
lYcrdgs: 55323000
================================================
function S=getTPS(tbegindate,tbegintime,tenddate,tendtime)
getTPS - vul het TPS blok
CALL:
S=getTPS(tbegindate,tbegintime,tenddate,tendtime)
INPUT
tbegindate,tbegintime,tenddate,tendtime: reeks begin en eindtijdstippen
OUTPUT
S: TPS Blok
================================================
function S=getWRD(NEreeks)
getWRD - vul het WRD blok
CALL:
S=getWRD(NEreeks)
INPUT
NEreeks
kolom1: tijdstippen
kolom2: code=1==> hoog code=2 ==>laag
kolom3: stand
OUTPUT
S: WRD Blok:
Waarden overnemen uit weg te schrijven NE reeks
<APPLICROOT>\melissa2006\GETIJBEHEER
09-Feb-2007 15:50:02
31197 bytes
findNode - CALL: treePath = findNode(tree,names) INPUT: tree: <java object> javax.swing.JTree names: <cellstring> met de namen van de op te zoeken knopen in de boom OUTPUT: treePath
<TOOLBOX>\jacontrol
24-Oct-2005 20:51:58
2293 bytes
findjac - find all jacontrol object handles under a specified handle
CALL:
h = findjac(HWIN)
INPUT:
HWIN: handle of window to search in
OUTPUT:
h: array with handles of jacontrol object with the specified handle as
parent
See also: gcjh
<TOOLBOX>\jacontrol
10-Jun-2008 09:49:52
762 bytes
findstructure - find matching elements of structure in structure array
CALL
Indx=findstructure(PatternStruct,StructArray)
INPUT
PatternStruct: structure to look for
this must be a non-empty structure
StructArray: structure array to look in
this must be a structure array that has at least the
fields of PatternStruct
flds: fields to compare (optional)
default value: intersection of fields in PatternStruct and StructArray
EXACT: if false also look for partial matches: match 'aaa' with 'aaabb'
OUTPUT
Indx: StructArray(Indx) corresponds to PatternStruct
SEE ALSO
is_in_struct
is_in
row_is_in
<TOOLBOX>
15-Aug-2008 21:40:07
2547 bytes
Perform all paint actions that are requered for the transactions since
last flush
CALL
obj=flush(obj)
obj=flush(obj,'all')
obj=flush(obj,extra)
INPUT
obj: undoredo object
extra: extra item to be passed on in cell-array 'queued'
typical use:
obj=flush(obj,'all'): update all elements
Note that the displayfunction that is used should be able to deal with
this extra argument
OUTPUT
obj: updated version of obj (the paint queue will be empty)
EXAMPLE
% paint all screen elements with changes in underlying data:
flush(obj)
% paint all screen elements:
flush(obj,'all')
%mimic change of specific field without actually changing data:
flush(guiopt,substruct('.','showodpair'));
TIPS AND TRICKS
The next code fragment shows how complex argument checking can be
implemented. If a user enters a number of arguments that are
mutually inconsistent. The user should be warned and the previous GUI
state must be restored.
function someCallback
db=get_db;
db=processUserInput;
db=flush(db)
if isempty(db)
%repaint interface based on previous data
warndlg(<somewarning>);
db=get_db;
db=flush(db,'all'); %you might want to refine here
end
store(db)
See also
store
deletequeue
isemptyqueue
<TOOLBOX>\matlabguru\@undoredo
11-Apr-2008 00:05:31
2985 bytes
font - command line tool to increase font size of axes and everything
displayed in it
CALL
font
font(h)
font(h,N)
INPUT
h: figure or axes handle, defaults to gca
OUTPUT
N: required font size. Defaults to 12
<TOOLBOX>
15-Aug-2008 16:49:45
589 bytes
format2convchar - translate format values to conversion characters, see
e.g. fscanf for a description of conversion characters
CALL:
convchar = format2convchar(format)
INPUT:
format: <cellstring> with possible values:
- 'string'
- 'date'
- 'time'
- 'number'
- 'float'
- 'double'
- 'integer'
OUTPUT:
convchar: <cellstring> with translations of format values:
- 'string' --> '%s'
- 'date' --> '%s'
- 'time' --> '%s'
- 'number' --> '%s'
- 'float' --> '%6.2f'
- 'double' --> '%6.2f'
- 'integer' --> '%d'
See also: tablefile, tablefile/load, fscanf
<TOOLBOX>\@tablefile\private
11-Feb-2007 16:55:34
1501 bytes
fr_divider - insert draggable divider
CALL:
[hframe, jseparator] = fr_divider(hparent, varargin)
INPUT:
hparent: handle of parent frame
property,value: property value pair
VALID PROPERTIES:
rank: rank of frame, any number
mode: resize mode, choose one of the following
proportional: increase size of all lower frames
proportional at the cost of aall
above frame
neighbour : increase size of only next frame at
the cost of only the frame directly
above
OUTPUT:
hframe: handle of frame that contains divider
jseparator: jacontrol of type jseparator
<TOOLBOX>\MBDresizedir
13-Aug-2008 16:42:06
7948 bytes
lm_title - set or get the title of a frame
CALL:
h = lm_title(hframe): return handle to title object
h = lm_title(hframe, str, varargin): install title in frame
INPUT:
hframe: handle of frame
str: title to be displayed in frame
varargin: valid property-value pairs for a uicontrol with style “text”
OUTPUT:
h: handle to title object (uicontrol with “text”)
APPROACH:
(default settings applied)
-1- create a uicontrol with properties:
tag = 'frmTitle'
userdata = <handle of frame>
-2- call mbdlinkobj with properties:
pixpos = <depends on extent of title>
normpos = [0 1 0 0]
clipping = true
clipframe = <parent of frame>
keepypos = true
<TOOLBOX>\MBDresizedir
11-Aug-2008 22:53:54
2059 bytes
gch - find uicontrol handles with specified tags
CALL:
h = gch(tag, hwin, h)
INPUT:
tag: string or cellstring with tags
hwin: (optional) handle of window to search in
default value: gcf
h: (optional) the default value
OUTPUT:
h: array with handles of uicontrol object with the specified tag
EXAMPLE:
h=0; %0 means unitialized
HWIN = figure;
if expression
%this line might or might not be reached
h=gch('mytag',HWIN);
end
h=gch('mytag',HWIN,h); %retreive h if uninitialized
NOTE:
[] is NOT a correct way to denote an unitialize handle
See also: gchbuf, gcjh
<TOOLBOX>
15-Mar-2008 18:40:44
1481 bytes
gcjh - find jacontrol object handles with specified tags
CALL:
h = gcjh(tag, hwin, h)
INPUT:
tag: string or cellstring with tags
hwin: (optional) handle of window to search in
default value: gcf
h: (optional) the default value
OUTPUT:
h: array with handles of jacontrol object with the specified tag
See also: gch, findjac
<TOOLBOX>
29-Apr-2008 14:13:08
1068 bytes
dateselector/get - get property of calendar object
CALL
prop_value=get(obj,prop_name)
INPUT
prop_name:
Name of property that is retreived
OUTPUT
prop_value:
Value of property that is retreived
SEE ALSO
dateselector/get
<TOOLBOX>\MBDresizedir\@dateselector
17-Aug-2008 10:44:05
1164 bytes
get - get methode van het jacontrol object CALL: prop_value = get(obj, prop_name) INPUT: obj: jacontrol object prop_name: string met op te vragen property OUTPUT: prop_value: waarde van de property See also: jacontrol/set, jacontrol
<TOOLBOX>\jacontrol\@jacontrol
05-Jun-2008 18:22:00
52048 bytes
get - get the value of the specified property for an xml-object (from the
object itself not from the xml)
CALL:
prop_val = get(obj,prop_name)
INPUT:
obj: <xml-object>
prop_name: <string> propertyname, possible values:
- DOM <org.apache.xerces.dom.DeferredDocumentImpl>
with the DOM representation of the xml
- file <string> with filename
- NS <java.util.HashMap> with namespaces
OUTPUT:
prop_val: the value of the specified property for the xml-object
<struct> with all properties plus values if nargin == 1
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
%get all property-value pairs
get(obj)
%get the (D)ocument (O)bject (M)odel
get(obj,'DOM')
See also: xml, xml/set
<TOOLBOX>\xml_toolbox\@xml
01-Jun-2006 17:27:18
1547 bytes
getDefopt - Private function of dateselector object
CALL/INPUT/OUTUT:
not for external use
<TOOLBOX>\MBDresizedir\@dateselector\private
17-Aug-2008 10:47:48
347 bytes
getDirStruct - return struct array with file information in specified
directory
CALL:
fls = getDirStruct(directory,types,D)
INPUT:
directory: <string> with directory to be searched for files
types: <string> filefilter
D: <struct> with at least the field filetypes which contains a
struct array with fields
- label
- filter
- image
and the fields
- dirup: <javax.swing.ImageIcon]
- folder: <javax.swing.ImageIcon]
fp_getfiletype: function pointer to function to determine filetype, if
empty local function is used
OUTPUT:
fls: <array of struct>
See also: filechooser, dir
<TOOLBOX>\@filechooser\private
02-Mar-2008 20:13:34
3358 bytes
getFigureClientBase - get FigureClientBase object for specified figure
CALL:
FigureClientBase = getFigureClientBase(HWIN)
INPUT:
HWIN: <handle> of figure
OUTPUT:
FigureClientBase:
<java object>
com.mathworks.hg.peer.FigureClientProxy$FigureDTClientBase
<TOOLBOX>
15-Aug-2008 21:30:49
669 bytes
getMatlabVersion - retreive Matlab version as numeric constant
CALL
v=getMatlabVersion
INPUT
No input arguments required
OUTPUT
v: Matlabversion.
Examples of output:
6.5018
7.0124
7.0436
7.1024
<TOOLBOX>
15-Aug-2008 17:35:34
912 bytes
getModelInput - bepaal de indices van de reeksen in de database die nodig
zijn voor het model
CALL:
[index, starttime, timestep, endtime] = getModelInput(db, model)
INPUT:
db: <undoredo object> met de centrale Melissa database
model: <struct> zie emptystruct('regressie')
OUTPUT:
index: <index> index in reeksen in database van de voor het model
benodigde parameters, eerste index is de uitvoer
starttime: <datenum>
timestep: <datenum>
endtime: <datenum>
See also: db2mat
<APPLICROOT>\melissa2006\MODELBEHEER
01-Oct-2007 18:50:42
1334 bytes
getRemoteFile - get file from ftp server
CALL
getRemoteFile(obj, event, C, fname)
getRemoteFile(obj, event, C, fname, path)
getRemoteFile(obj, event, C, fname, path, SEARCHLOCAL)
getRemoteFile(obj, event, C, fname, path, SEARCHLOCAL, postProcess)
getRemoteFile(obj, event, C, fname, path, SEARCHLOCAL, postProcess,MAXVERSION)
INPUT
obj,event: not used
C:
structure with constants
+----FRAMECOLOR : background color for frame
+----TEXTPROPS : font properties for text object
+----PUSHPROPS : properties for button object
fname:
file naam zonder pad
path:
{url,username,password, path1{:}}
SEARCHLOCAL:
look for local file before downloading
postProcess: <function pointer>
postprocess function. After a succesfull download the argument
"fname" including loacal path will be passed on to this function:
postProcess(fname)
MAXVERSION: <logical>
(if true) look for all version and download highest version
See also: helpmenu
EXAMPLE
%create button HELP in toolbar
Htool = uitoolbar(HWIN);
uipushtool(Htool,'cdata',getcdata('help'),...
'separator','on',...
'tooltip','Open help file (download wanneer nodig)',...
'clicked',{@getRemoteFile,C,'jaarcontroleHelp.pdf'});
<TOOLBOX>
16-Aug-2008 12:13:07
8593 bytes
getRoot - get the root node of an xml-object and its name
CALL:
[rootname root] = getRoot(obj)
INPUT:
obj: <xml-object>
OUTPUT:
rootname: <string> the name of the root node
root: <java object> org.apache.xerces.dom.DeferredElementNSImpl or
org.apache.xerces.dom.DeferredElementImpl
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
[rootname root] = getRoot(obj)
See also: xml, xml/noNodes
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:36:14
648 bytes
getRootPane - get RootPane for specified figure
CALL:
RootPane = getRootPane(HWIN)
INPUT:
HWIN: <handle> of figure
OUTPUT:
RootPane: <java object> com.mathworks.mwswing.desk.DTRootPane
MATLAB COMPABILITY:
TEST SCRIPT: c;rp=getRootPane
TESTED WITH MATLAB VERSIONS
6.5: : NO
7.0.1.24704 (R14) Service Pack 1: YES
7.0.4.365 (R14) Service Pack 2 : YES
7.1.0.246 (R14) Service Pack 3 : YES
7.2.0.232 (R2006a) : YES
7.3.0.267 (R2006b) : YES
<TOOLBOX>
15-Aug-2008 21:31:12
2285 bytes
getTableValue - haal de waarde voor een geedit veld op van een sorttable
CALL:
[value,row,col] = getTableValue(obj,event)
INPUT:
obj: <nl.modelit.jacontrol.table.mdltTable object> de sorttable waar het
event heeft plaatsgevonden
event: <nl.modelit.jacontrol.table.event.TableChangedEvent> beschrijving van
het event met onder andere de rij en kolom waar het event
plaatsvond (beginnend van row == 1 en col == 1)
OUTPUT:
value: de waarde van het veld dat geedit was
row: <integer> rij in het achterliggende datamodel van de tabel,
tellend vanaf 1
col: <integer> kolom in het achterliggende datamodel van de tabel,
tellend vanaf 1
<TOOLBOX>\jacontrol\@jacontrol
30-Jun-2006 12:04:50
1020 bytes
getTableValue - this function can be used to retrieve the column and row
in the original datamodel for which a edit action took
place. this function is typically used in a callback.
CALL:
[value, row, col, colname] = getTableValue(obj, event)
INPUT:
obj: <nl.modelit.mdlttable.mdltTable object> the table on which the
event took place. (argument of the datacallback of a table)
event: <nl.modelit.mdlttable.event.TableChangedEvent> description of
the event giving information about the row and column of the
table in which the cell was editied (starting from row == 1
and column == 1) (argument of the datacallback of a table)
OUTPUT:
value: the value of the tablecell which was edited.
row: <integer> row of changed cell in the original datamodel
counting from 1.
col: <integer> column of changed cell in the original datamodel
counting from 1.
colname: <string> with columnname
<TOOLBOX>\jacontrol
09-Jun-2008 18:08:52
1505 bytes
get_c_default - define default colors for colors and uicontrols
CALL
C=get_c_default
INPUT
This function requires no input arguments
OUPUT
C
+----FRAMECOLOR (double array)
+----WINCOLOR (double array)
+----DEFAULTDIR
| +----WORKSPACE (double)
| +----ASCII (double)
| +----BINFILES (double)
| +----ADYFILES (double)
| +----ADY2BINFILES (double)
| +----BPSKEYFILE (double)
| +----BPSMATCHFILE (double)
| +----TSWDIR (double)
| +----BN2FILE (double)
| +----TRAJECT (double)
| +----MATFILE (double)
| +----AGGREGDAYFILES (double)
| +----NOLFILE (double)
| +----FIGFILES (double)
+----BSIZE (double)
+----FILLSIZE (double)
+----TOOLBHEIGHT (double)
+----TOOLBFRAMEHEIGHT (double)
+----LMARGE (double)
+----RMARGE (double)
+----LRMARGE (double)
+----TMARGE (double)
+----BMARGE (double)
+----VMARGE (double)
+----SMALLMARGE (double)
+----MINMARGES (double array)
+----LISTHEADER
| +----fonts (double)
| +----style (char array)
| +----fontn (char array)
| +----horiz (char array)
| +----backg (double array)
+----TEXTHEADER
| +----fonts (double)
| +----fontn (char array)
| +----horiz (char array)
| +----VerticalAlignment (char array)
| +----margin (double)
| +----units (char array)
+----EDITPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----style (char array)
| +----backg (double array)
+----PUSHPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----style (char array)
+----TEXTPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----style (char array)
| +----backg (double array)
| +----horizon (char array)
+----TEXTMSGPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----style (char array)
| +----backg (double array)
| +----horizon (char array)
+----CHECKPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----backg (double array)
| +----style (char array)
+----POPUPPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----style (char array)
| +----backg (char)
| +----horiz (char array)
+----LISTPROPS
| +----FontName (char array)
| +----FontSize (double)
| +----FontWeight (char array)
| +----FontUnits (char array)
| +----style (char array)
| +----fontn (char array)
| +----horiz (char array)
| +----backg (char)
+----LISTHDR
+----FontName (char array)
+----FontSize (double)
+----FontWeight (char array)
+----FontUnits (char array)
+----style (char array)
+----backg (double array)
+----horizon (char array)
+----fontn (char array)
<TOOLBOX>
15-Aug-2008 18:57:09
9327 bytes
get_constants - get user configurable options and save them to file
CALL
C=get_constants(MODE,STTFILE,LANGUAGE)
INPUT
MODE: 1==> retreive options
2==>start gui and retreive/save options
STTFILE: name of settingsfile
LANGUAGE: dutch==> use dutch labels
uk ==> use uk english labels
OUTPUT
C: constant structure, with
GLOBALFONT: structure with fields
FontName
FontSize
FontWeight
GLOBALGRAPHCOLOR: default color for graphs
GLOBALFRAMECOLOR: default color for frames
GLOBALLISTCOLOR: default color for lists
H: regelhoogtes die zijn afgeleid van het default font
pus: (pushbutton)
tog: (togglebutton)
rad: (radiobutton)
che: (checkbutton)
edi: (editbox)
tex: (text)
pop: (popupmenu)
max: (maximum over alle uicontrol styles)
<TOOLBOX>
16-Aug-2008 11:02:31
13762 bytes
get_db_melissa - haal de constantes en de centrale database voor Melissa
op (deze moet wel opgestart zijn)
CALL:
[db,C,HMELISSAMAINWIN] = get_db_melissa
INPUT:
geen invoer
OUTPUT:
db: <undoredo object> met de centrale database: zie emptyu
C: <struct> de Melissa constantes: zie constantes_melissa
HMELISSAMAINWIN: <handle> van het Melissa hoofdscherm
See also: constantes_melissa, melissa, emptyu, emptyud, emptystruct
<APPLICROOT>\melissa2006\HULPFUNCTIES
03-Nov-2006 19:04:04
697 bytes
get_opt - returns the filechooser's undoredo object CALL: opt = get_opt(obj) INPUT: obj: <filechooser-object> OUTPUT: opt: <undoredo-object>
<TOOLBOX>\@filechooser
18-Sep-2006 18:28:14
249 bytes
get_opt_databeheer - haal de settings van Melissa databeheer op
(deze moet wel opgestart zijn)
CALL:
[opt,HWIN] = get_opt_databeheer
OUTPUT:
opt: <undoredo object> met de settings van het databeheer scherm
HWIN: <handle> van het databeheer scherm
See also: emptystruct, databeheer, get_db_melissa
<APPLICROOT>\melissa2006\DATABEHEER
09-Jan-2007 18:44:26
463 bytes
get_opt_getijbeheer - haal de settings van Melissa getijbeheer op
(deze moet wel opgestart zijn)
<APPLICROOT>\melissa2006\GETIJBEHEER
04-Aug-2006 15:45:06
210 bytes
get_opt_melissa - haal de settings van Melissa op
(deze moet wel opgestart zijn)
CALL:
opt = get_opt_melissa
INPUT:
geen invoer
OUTPUT:
opt: <undoredo object> met de settings
C: <struct> de Melissa constantes: zie constantes_melissa
HWIN: <handle> van het melissa hoofdscherm
See also: emptystruct, get_db_melissa
<APPLICROOT>\melissa2006\HULPFUNCTIES
22-Dec-2006 10:56:20
574 bytes
get_opt_modelbeheer - haal de settings van Melissa modelbeheer op
(deze moet wel opgestart zijn)
CALL:
[opt,HWIN] = get_opt_modelbeheer
INPUT:
geen invoer
OUTPUT:
opt: <undoredo object> met de settings
HWIN: <handle> van het modelbeheer scherm
See also: emptystruct, modelbeheer, get_opt_getijbeheer,
get_opt_databeheer, get_opt_melissa
<APPLICROOT>\melissa2006\MODELBEHEER
28-Dec-2006 15:30:48
527 bytes
overload setappdata for jacontrol objects INPUT
<TOOLBOX>\jacontrol\@jacontrol
19-Mar-2008 11:39:32
226 bytes
getcdata - retreive cdata for Matlab buttons
CALL
getcdata([],[],fname) - load image file
CDATA=getcdata(icon) - retreive icon (maintain transparancy)
CDATA=getcdata(icon,BG) - retreive icon (replace transparant cells by BG)
getcdata - Regenerate image file
getcdata([],[],fname,dirname) - Regenerate image file
INPUT
icon : icon to retreive
BG : fill in color for transparant cells (default NaN)
fname : name of image file (cdt extension will be added
automatically)
NOTE: if fname contains no path, pwd will be prepended
automatically. (WIJZ ZIJPP sep 13)
dirname : directory to read images from when regenerating image file
OUTPUT
cdata: M x N x 3 Cdata matrix (truecolor)
transparant cells are marked with NaN numbers
rc: rc=1 if succesfull
Note: use nargout>1 to suppress warnings on the console when icon
is missing from file
EXAMPLE 1
use .ico file to set icon
The icon file contains transparancy info, however seticon can not read icon files
Remedy, save PNG file first:
%
S=getcdata('wavix16');
Transparant=isnan(S(:,:,1))|isnan(S(:,:,2))|isnan(S(:,:,3));
imwrite(S,'wavix16.png','png','alpha',uint8(~Transparant));
seticon(gcf,'myicon.png');
(Note: changing the png file only has effect after JAVA is cleared)
EXAMPLE 1
generate image file "myfile.cdt" from images in subdir "images":
getcdata([],[],'myfile','images')
<TOOLBOX>
01-Aug-2008 16:40:50
10523 bytes
getdata - Retreive data content from undoredo object
SUMMARY
In most cases data is retreived from an object by subscripting, for
example:
obj=undoredo(1:8)
a=obj(3)
==> a=3
However there is no subscript that retreives the complete
datastructure. For this purpose the use the data() operator:
obj=undoredo(data1)
data2=data(obj)
==> data2 is an exact copy of data1
CALL
data=getdata(obj)
INPUT
obj: undoredo object
OUTPUT
data: data content of undoredo object
EXAMPLE
If OBJ is an undoredo object, the following example shows how the
clear the undoredo history of an object:
OBJ=undoredo(data(OBJ));
NOTE
There is a subtle difference between data=getdata(db) and data=db(:).
The (:) operator always returns a Mx1 vector with M=numel(db). If db
contains a data with size m x n, getdata is needed to retreive data
content and data size.
SEE ALSO
undoredo/size
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 21:38:48
1124 bytes
getdepend - retreive dependency tree for combination of object and figure
(overloaded method)
CALL
setdepend(HWIN,obj)
INPUT
HWIN: figure handle
obj: undoredo object
OUTPUT
deptree: dependency tree that has been registerd for this combination
of object and figure, see also setdepend
EXAMPLE
The code below provides a template for usage of dependency trees
%Include in the main body of the application:
db=undoredo(initdb,'disp',@dispdata);
setdepend(HWIN, db, data2applic);
function s=initdb
-user definded function-
function db=get_db
-user definded function-
function dispdata(signature,db,ind)
upd = getdepend(HWIN, db)
if upd.element1
-user definded action-
end
if upd.element2
-user definded action-
end
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 21:35:49
1170 bytes
getdepend - retreive dependency tree for combination of object and figure
CALL
getdepend(HWIN,obj)
or
getdepend(HWIN,signature)
INPUT
HWIN: figure handle
argument 2:
obj: undoredo object (in this case the overloaded version of getdepend
will be called)
or
signature : signature value (double)
OUTPUT
deptree: dependency tree that has been registerd for this combination
of object and figure, see also setdepend
SEE ALSO
setdepend,evaldepend
NOTE
this function exist also as an overloaded function
<TOOLBOX>\matlabguru
24-Jun-2005 18:35:44
1581 bytes
getfile - selecteer file met specifieke extensie
CALL:
[fname,pname] = getfile(ext,showstr,BATCHMODE,fname,N)
INPUT:
ext: <string> extensie die te selecteren file moet hebben
(defaultwaarde: '.m')
showstr: <string> met tekst die gebruiker te zien krijgt
(defaultwaarde: '')
BATCHMODE: <boolean> zet deze op 1 voor onderdrukken interactie
(defaultwaarde: 0)
fname: <string> default filenaam
(defaultwaarde: *.ext)
N: <integer> default categorie file t.b.v. bewaren default
directory (defaultwaarde: 1)
OUTPUT:
fname: <string> de geselecteerde filenaam
(Als cancel ingedrukt ==> fname = 0)
pname: <string> het bijbehorende pad INCLUSIEF filesep teken
EXAMPLE
[fname,pname] = getfile('txt','Selecteer ASCII file',0,'',C.DEFAULTDIR.STUURFILES);
if ~fname
return %gebruiker heeft gecancelled
end
fname=[pname,fname];
See also:
putfile
<TOOLBOX>
16-Aug-2008 15:39:30
3361 bytes
getijbeheer - installeer de getijbeheer GUI voor het beheren
van de getijparameter dataset
CALL:
getijbeheer(obj,event)
INPUT:
obj: <handle> van de 'calling' uicontrol, (wordt niet gebruikt)
event: <leeg> standaard argument van een callback (wordt niet gebruikt)
OUTPUT:
geen directe uitvoer, het getijbeheer scherm wordt geopend
APPROACH:
Deze functie kijkt of het getijbeheer scherm al is geinstalleerd en
maakt het in dat geval current.
Zo niet, dan wordt het getijbeheer scherm geinitialiseerd.
Deze functie module bevat alle define- functies waarmee het scherm
wordt opgebouwd, en de meeste van de callback functies die vanuit het
scherm kunnen worden aangeroepen.
See also: getijbeheerbeheerview
<APPLICROOT>\melissa2006\GETIJBEHEER
08-Mar-2008 10:06:16
36476 bytes
getijbeheer_instellingen - gui voor het specificeren van de locatie van
het culminatie en metainfo bestand
CALL:
opt = getijbeheer_instellingen(C, opt)
INPUT:
C: <struct> met de melissa constantes
opt: <struct> met de settings, de velden corresponderen met de settings
in getijbeheer:
- metainfo
- culminatie
OUTPUT:
opt: <struct> met de nieuwe setting voor getijbeheer
See also: getijbeheer
<APPLICROOT>\melissa2006\GETIJBEHEER
26-Mar-2007 17:44:28
7154 bytes
getijbeheer_msg - functie om alle foutmeldingen van getijbeheer af te
handelen
CALL:
getijbeheer_msg(actie)
INPUT:
actie: <string> met omschrijving van de fout, zie code voor details.
OUTPUT:
<geen>
<APPLICROOT>\melissa2006\GETIJBEHEER
11-Feb-2007 15:23:42
1356 bytes
getijbeheerview - view functie voor het getijbeheer scherm CALL: getijbeheerview(udnew,opt,upd,C,HWIN) INPUT: udnew: <struct> de centrale database opt: <struct> GUI settings voor getijbeheer upd: <struct> de te updaten scherm elementen C: <struct> de melissa constantes HWIN: <handle> van het getijbeheer scherm OUTPUT: geen directe output, het getijbeheer scherm is geupdate See also: getijbeheer
<APPLICROOT>\melissa2006\GETIJBEHEER
15-Oct-2007 22:28:20
12886 bytes
getns - retrieve a namespace definition from the xml-object
CALL:
S = listns(obj,key)
INPUT:
obj: <xml-object>
key: <string> with a namespace variable for which the definition has to
be retrieved
OUTPUT:
S: <string> with the namespace definition
EXAMPLE
%create an xml-object
obj = xml(fullfile(pwd,'examples','namespaces.xml'))
%add namespace
addns(obj,{'nsdim','http://www.modelit.nl/dimension'})
%get namespace
getns(obj,'nsdim')
See also: xml, xml/addns, xml/clearns, xml/removens, xml/listns
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:20:28
685 bytes
getprop: return property of undoredo object
SUMMARY:
This methods implements a "get" method for fields of an undoredo that
normally are not visible. The function is intentinally not
documented.
CALL
prop_value=get(obj,prop_name)
INPUT
obj: undoredo object
prop_name: property to retreive (incomplete string accepted)
OUTPUT
prop_value: property
See also: setprop
EXAMPLE
Q=getprop(db,'que')
db.prop=value
db=setprop(db,'que',Q); %prevent update
store(db);
NOTE
this function has name getprop, so Matlab set need not be overloaded
(this saves approx 0.001 sec per call)
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 21:43:13
1024 bytes
getproperty - return matching char string from cell array of keywords
CALL
prop=getproperty(property,ValidProps)
INPUT
property - char string with property. This string contains the
first letters of the keyword searched for. The matching
is Case-Insensitive.
ValidProps - cell array with valid property values
OUTPUT
prop - string with property that matches ValidProps
EXAMPLE
getproperty('my',{'MySpecialProperty'}) returns 'MySpecialProperty'
<TOOLBOX>
16-Aug-2008 14:22:45
1645 bytes
getprops - retrieve structure with relevant properties from list of handles
CALL
props=getprops(handles,fields)
INPUT
handles: array of handle graphics objects
fields: cell or char array of char arrays
OUTPUT
props: cell array of structures. The fields of each structure are in
the intersection of input argument "fields" and the available
properties of a hg-object
<TOOLBOX>
26-Mar-2008 19:02:52
1229 bytes
getsignature - retrieve data content from undoredo object CALL: signature = getsignature(obj) INPUT: obj: <undoredo object> OUTPUT: signature: <double> with object's signature
<TOOLBOX>\matlabguru\@undoredo
13-Dec-2005 23:51:28
285 bytes
getuicpos - haal de extent van een object op inclusief randen van een frame
CALL
ext=getuicpos(h)
INPUT
h: (scalar) handle van uicontrol object
OUTPUT
ext: =[ext(1) ext(2) ext(3) ext(4)];
[ext(3) ext(4)] = afmetingen (extent) van het object + extra ruimte
aanname: de units van het object zijn in pixels
<TOOLBOX>
31-Jan-2008 13:12:06
2086 bytes
getyan10 - User interface voor de bepaling van getijparameterdatasets
CALL:
getyan10(tablefilename, targetfilename)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
geen directe uitvoer, de centrale database van Melissa wordt aangevuld
met de gegenereerde NEReeksen
APPROACH:
Voor alle stations met code 'berekenen==aan wordt functie
f_getyan10 aangeroepen.
De uitvoer van deze functie wordt tijdelijk opgeslagen in een
cell array NE-reeks.
Als alle berekeningen klaar zijn wordt NE_reeks weggeschreven
naar de database.
See also: getijbeheer
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:06:18
4561 bytes
getyear - convert 2 digit year date to 4 digits
CALL
yr1=getyear(yr,VERBOSE)
INPUT
yr : 2 digit year (4 digita are allowed)
VERBOSE: display warning when making interpretation
OUTPUT
yr1: interpreted year
<TOOLBOX>
15-Aug-2008 13:46:10
585 bytes
function xgr=group(x,maxstep)
deel x in groepen in op basis van onderlinge afstand van elementen van x
in elke groep mag de afstand tussen twee opeenvolgende elementen
niet groter dan maxstep zijn
CALL
xgr=group(x,maxstep)
INPUT
x : te clusteren reeks
maxstep: de maximale stapgroote (verwijst naar x)
OUTPUT
xgr: per element van x een getal dat aangeeft in welke groep dit
element zit
WERKWIJZE
voorbeeld:
group([1 2 3 5 6],1)=[1 1 1 2 2];
De achterliggende manier van berekenen van dit voorbeeld bestaat
uit de volgende stappen:
x= 1 2 3 5 6 7 8
diff(x)= 1 1 2 1 1 1
Uitbreiden met 0 aan het begin:
y= 0 0 0 1 0 0 0
Het resultaat na het nemen van een cumulatieve som.
cumsum(y)+1= 1 1 1 2 2 2 2
See also: logical2range
<TOOLBOX>
16-Aug-2008 11:13:20
1266 bytes
guibrowser - start gui to inspect gui
CALL:
guibrowser(obj,event,fig)
INPUT:
obj: <handle> standard matlab callback argument
event: <empty> standard matlab callback argument
fig: <handle> of the figure of which the framesstructure has to be
inspected
OUTPUT:
no direct output, an interface to inspect the structure of a gui becomes
available to the user.
<TOOLBOX>\debug
28-Feb-2008 09:38:30
22715 bytes
hashtable2cell - converteer java hashtable naar een cellarray
CALL:
c = hashtable2cell(ht)
INPUT:
ht: java.util.Hashtable
OUTPUT:
c: cellarray met twee kolommen: kolom 1: hashtable keys
kolom 2: hashtable waarden
See also: cell2hashtable
<TOOLBOX>
13-Feb-2008 17:08:38
1008 bytes
height - return height of table
CALL
H=height(T)
INPUT
T: table object
OUTPUT
H: number of rows in table
<TOOLBOX>\@table
17-Aug-2008 10:13:57
401 bytes
height - get matrix height
CALL
w=height(str)
INPUT
str: matrix
OUTPUT
w: matrix height
SEE ALSO: size, length, width
<TOOLBOX>
15-Aug-2008 14:47:56
220 bytes
help - overloaded help for jacontrol objects CALL: str = help(obj, prop_name) INPUT: obj: jacontrol object prop_name: string with object's fieldname for which help is needed OUTPUT: str: string with help See also: jacontrol, jacontrol/set, jacontrol/private/jafields
<TOOLBOX>\jacontrol\@jacontrol
06-Jun-2008 16:27:44
11485 bytes
helpjacontrol - scan jacontrol/set voor help, resultaten worden
weggeschreven in een .mat bestand
CALL:
S = helpjacontrol
INPUT:
action: (optional) string if nargin == 1 the save .mat file is updated
OUTPUT:
S: struct met property help voor elke jacontrol stijl
See also: jacontrol
<TOOLBOX>\jacontrol\@jacontrol\private
26-Mar-2008 13:01:12
3822 bytes
helpmenu CALL: D = helpmenu(obj,event,hlpobj,C,D) INPUT: obj: <handle> van de aanroepende uitcontrol event: <leeg> standaard matlab callback argument hlpobj: < C: D: OUTPUT: D:
<TOOLBOX>\@helpmenuobj
13-Dec-2007 19:53:41
8667 bytes
helpmenuobj -
CALL:
obj = helpmenuobj(varargin)
INPUT:
<PROPERTY>,<VALUE> pairs
Valid properties:
path: Cell array
path{1}: url (example www.modelit.nl)
path{2}: username ([] if anonymous)
path{3}: password ([] if anonymous)
path{4:end}: path to files
NOTE
helpmenu method opens help window
EXAMPLE / TEST CODE
HWIN=figure
Htool = uitoolbar(HWIN);
hlpobj=helpmenuobj('path',{'www.modelit.nl','rikz','rikz','MARIA','manuals'});
hlpobj=addlabel(hlpobj,'Algemeen');
hlpobj=addpdf(hlpobj,'Installatie','InstallatieHandleiding.pdf');
hlpobj=addpdf(hlpobj,'Algemene handleiding','Handleiding_final.pdf');
hlpobj=addlabel(hlpobj,'Specifieke onderwerpen');
hlpobj=addpdf(hlpobj,'Inlezen WESP files','Handleiding_Inlezen_WESP.pdf');
% hlpobj=addpdf(hlpobj,'Aanmaken SWAN bodemkaart','Handleiding_Inlezen_WESP.pdf');
hlpobj=addpdf(hlpobj,'CEN editor','GeodataHelp.pdf');
hlpobj=addpdf(hlpobj,'Controle meerjarige reeksen','jaarcontroleHelp.pdf');
hlpobj=addpdf(hlpobj,'Aanmaken contouren voor kustmetingen','Raaicontour.PDF');
hlpobj=addlabel(hlpobj,'Websites');
hlpobj=addwebsite(hlpobj,'Modelit website','www.modelit.nl');
uipushtool(Htool,'cdata',getcdata('help'),...
'separator','on',...
'tooltip','Open help file (download wanneer nodig)',...
'clicked',{@helpmenu,hlpobj});
METHODS
addlabel
addpdf
newcolumn
See also: helpmenu
<TOOLBOX>\@helpmenuobj
08-Feb-2007 15:35:52
1873 bytes
Enumerate fields of handle graphics object that holds jacontrol Note: UserData has been omitted from this list and is bypassed through objfields Note: BackgroundColor is moved to jafields
<TOOLBOX>\jacontrol\@jacontrol\private
08-Oct-2004 14:20:25
545 bytes
hideColumn - hide a column in a sorttable CALL: hideColumn(sorttable, columnname, hide) INPUT: jac: <jacontrol> type jxtable columnname: <string> with name of colums to hide hide: <boolean> OUTPUT: no output, the specified column is hidden See also: jacontrol
<TOOLBOX>\jacontrol\@jacontrol
23-May-2007 17:59:20
879 bytes
IM2JAVA Convert image to Java image for RGB values with transparancy
JIMAGE = IM2JAVA(RGB) converts the RGB image RGB to an instance of
the Java image class, java.awt.Image.
Input-output specs
------------------
RGB: 3-D, real, full matrix
size(RGB,3)==3
double (NaN values will be interpreted as transparant)
logical ok but ignored
JIMAGE: java.awt.Image
<TOOLBOX>\jacontrol\@jacontrol\private
10-Oct-2004 00:54:04
1182 bytes
ind2xpath - convert a matlab substruct into an xpath string
CALL:
xpathstr = ind2xpath(ind)
INPUT:
ind: <struct> see substruct
OUTPUT:
xpathstr: <string> xpath equivalent of the substruct
See also: xml, xml/private/buildXpath, xml/subsasgn, xml/subsref,
xml/xpath, substruct
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:28:44
1042 bytes
indexmax - Bepaal maxima in reeks x met leeftijd N CALL [maxindices,minindices]=indexmax(x,N) INPUT x: vector met potentiele maxima (minima) N: minimale leeftijd van het gecentreerde maximum (verwijst naar index in x) OUTPUT maxindices: de indices van de maxima minindices: de indices van de minima WERKWIJZE % Construeer matrix tempMat met verschoven kolommen: % 0 0 x2 x3 % 0 x1 x3 x4 % x1 x2 x4 % x2 x3 % x3 % Roep de submodule GETMAX aan om de maxima van leeftijd N op te sporen % Roep de submodule GETMAX aan om de minima van leeftijd N op te sporen % % ================ % SUBMODULES van indexmax.m % ================ % % function maxindices=getmax(tempmat,x,N) % spoor maxima op % garandeer een leeftijd van N periodes % INPUT % tempmat: geconstrueerde matrix met verschoven kolommen % x : reeks waarvan maxima bepaald moeten worden % N : leeftijd van gezochte maxima (verwijst naar indices in x) % OUTPUT % maxindices: indices van gevonden maxima % % Bepaal de rij maxima van tempmat. % Stel de eerste N elementen op inf (zodat x deze niet zal overtreffen). % Stel de laatste N elementen op inf (zodat x deze niet zal overtreffen). % Bepaal de elementen van x die maximaal zijn met leeftijd N % % N.B: % De bovenstaande procedure vindt waarden in de vector x die % groter OF GELIJK zijn aan waarden in interval x(tmax-N), x(tmax+N) % indien het gelijk teken geldt moet een van beide verwijderd worden % In dit geval: vervang door (n+1)/2 e exemplaar (naar beneden afronden) % Dit gebeurt in de submodule ZEEF % % function indices_zeef=zeef(indices,N) % vervang clusters van periodes met maximale afstand N door middelste waarde % INPUT % indices: indices van kandidaat maxima % N : vereiste leeftijd van maxima % % OUTPUT % indices_zeef: subset van indices die vereiste leeftijd heeft % % VOORBEELD % als N=2, dan is reeks [4 7] correct, % maar reeks [4 6] wordt vervangen door [4] % % WERKWIJZE % Deel de indices in groepen waarvan de elementen een maximale onderlinge afstand % N+.1 hebben (afstand N is dus toegestaan). % Dit gebeurt met behulp van de functie GROUP % % Bepaal per groep het centrale element (na beneden afgerond): % 1=>1 % 2=>1 % 3=>2 etc % Sla dit element op in de uitvoervariabele indices_zeef
<APPLICROOT>\melissa2006\FUNCTIES
29-Oct-2000 19:25:38
9254 bytes
insertRow - insert table into table at a specified row CALL: obj = insertRow(obj,row,T) INPUT: obj: <table-object> row: <integer> index of table row where T has to be inserted T: <table-object> table to be inserted OUTPUT: obj: <table-object> See also: table, table/deleteRow, table/append
<TOOLBOX>\@table
16-Sep-2006 14:51:28
493 bytes
inspect - show table with the object's property value pairs CALL: inspect(obj) INPUT: obj: jacontrol object OUTPUT: no output, a window with a table with property value pairs is displayed See also: jacontrol, tableWindow
<TOOLBOX>\jacontrol\@jacontrol
26-Mar-2008 10:09:02
3649 bytes
inspect - visualize the xml document as a tree in a separate window
CALL:
inspect(obj)
INPUT:
obj: <xml-object>
OUTPUT:
none, the the DOM representation of the xml document appears as a tree
in a separate window
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
inspect(obj)
See also: xml, xml/view
<TOOLBOX>\xml_toolbox\@xml
13-Mar-2008 18:55:26
2195 bytes
installjar - Create a classpath.txt file.
SUMMARY
odelit provides a number of function that require the static path to
be set. The static path is set at startup and read from the file
classpath.txt. Installjar writes this file and should be run whenever
the software is installed in a new location.
installjar readme:
- Some Modelit applications rely on one or more Java-Archive's (JAR files)
created by Modelit.
- installjar.exe is a utility that installs these JAR files.
- Usually, an install script provided by modelit takes care of this.
Thes notes provide extra information.
- installjar.exe must be run before the Modelit application is started
- It is not necessary to run installjar.exe more then once, unless the
application files are moverd to a new directory
- The installjar utility requires at least the following file structure
<This directory>
+----installjar.exe (file)
+----installjar.ctf (file)
+----java (directory)
+----modelit.jar (file)
+----<any other jar file>
CALL
terminateApplication=installjar(ALWAYS,jarNames)
INPUT
ALWAYS: (Optional) If true: always set the class path. If false
only set the class path if needed.
jarNames: (Optional) Cell array that contains the names of required
jar files. When omitted all files in jar directory are
installed
INTERPRETED MODE
if no arguments are specified all jar files in the utility
directory mbdutils\java are added to the static
javaclasspath.
Any specified jar files should be located in the directory
"...\mbdutils\java" when ran in on Matlab path
COMPILED MODE
if no arguments are specified all jar files in the
directory pwd\java are added to the static javaclasspath.
Any specified files should be located in directory "pwd\java"
OUTPUT
terminateApplication:
if true: terminate application (compiled mode) or terminate
Matlab session (compiled mode)
<TOOLBOX>
16-Aug-2008 14:10:33
5950 bytes
interp_blok - Interpolate Donar block to new time axis.
CALL:
blok = interp_blok(blok, taxis, mode)
INPUT:
blok:
Structure with Donar data block, see emptyblok for format.
taxis:
Vector of Matlab datenums.
mode:
String with possible values:
'all' - Estimate all points not in taxis AND missing
values.
other - Estimate only missing values.
OUTPUT:
blok:
Structure with Donar data block, see emptyblok for format.
See also: cmp_taxis, emptyblok
<TOOLBOX>\diaroutines
18-Aug-2008 16:17:42
4011 bytes
interpol - interpoleer W in de tijd op basis van StatusW
CALL:
[W, StatusW] = interpol(C, W, StatusW)
INPUT:
C: <struct> met melissa constantes
W:
StatusW:
OUTPUT:
W
StatusW
APPROACH
De berekening wordt voor elk station apart uitgevoerd
Per station:
stel XI: de indices van periodes met code NONOBSERVED
stel X : de indices van periodes met ander code dan NONOBSERVED
Bereken W waarde voor XI met functie INTERP1.
Voorspel status op basis vorig datapunt
(de vorige datapunten worden bepaald met de subfunctie VORIGE)
voor elk element wordt eerdere aangegeven
de beginwaarden uit de reeks hebben geen beneden buurman
Voorspel status op basis vorig datapunt
(de vorige datapunten worden bepaald met de subfunctie VOLGENDE)
de eindwaarden uit de reeks hebben geen boven buurman
Combineer de status informatie:
Als een van beide hiaat ==> hiaat
Anders als een van beide onbetrouwbaar ==> onbetrouwbaar
Anders OK
OPMERKING: er wordt aangenomen dat eerste en laatste
element van invoerreeks niet de status
NONOBSERVED hebben
===============
Subfuncties
===============
function V=volgende(X)
Vind volgende indices t.o.v. serie indices X
Normaalgesproken is het resultaat X+1 maar als er
aansluitende clusters voorkomen dan is volgende
voor het gehele cluster gelijk.
Bijvoorbeeld X=[1 2 4 5 10] ==> V=[0 0 3 3 9]
X moet oplopende reeks integers zijn
X oplopend ==> -flipud(X(:)) oplopend
function V=vorige(X)
Vind vorige indices t.o.v. serie indices X
Normaalgesproken is het resultaat X-1 maar als er
aansluitende clusters voorkomen dan is voige
voor het gehele cluster gelijk. Voor 1 is er geen vorige.
Bijvoorbeeld X=[1 2 4 5 10] ==> V=[NaN NaN 3 3 9]
X moet gesorteerd zijn
<APPLICROOT>\melissa2006\FUNCTIES
09-Oct-2007 11:19:38
7412 bytes
isField - returns true if field is a field of the table-object
returns false otherwise
CALL:
b = isField(obj,field)
INPUT:
obj: <table-object>
field: <string>
OUTPUT:
b: <boolean> true if field is a field of the table-object
false otherwise
<TOOLBOX>\@table
17-Sep-2006 21:13:38
410 bytes
isReadOnly - determine if a file or directory is readonly
CALL:
isReadOnly(fname)
INPUT:
fname: <string> with filename or directory
OUTPUT:
b: <boolean> true --> file or directory is read only
false --> file or directory is not write protected
<TOOLBOX>
11-Jan-2007 23:30:12
576 bytes
isSelectable -
CALL:
LogischArray =
isSelectable(C,StatusOutlier,StatusValidat,StatusW,NEW,OK,HIAAT,...
OUTLIER,INCONSISTENT,ANDERS,INTERP)
INPUT:
StatusOutlier: <array of uint8> met de status vector
StatusValidat: <array of uint8> met de status vector
StatusW: <array of uint8> met de status vector
NEW,OK,HIAAT,OUTLIER,INCONSISTENT,ANDERS,INTERP: selectie status van knoppen
OUTPUT:
LogischArray: <boolean>
1 -> selecteerbaar
0 -> niet selecteerbaar
See also: selectrange_mel
<APPLICROOT>\melissa2006\HULPFUNCTIES
05-Jan-2007 13:18:14
1340 bytes
isSimilar - return true if obj and obj1 have the same fields and formats
return false otherwise
CALL:
b = isSimilar(obj,obj1)
INPUT:
obj: <table-object>
obj1: <table-object>
OUTPUT:
b: <boolean> true if obj and obj 1 have same fields and format
false otherwise
See also: table, table/append
<TOOLBOX>\@table\private
17-Sep-2006 20:15:40
940 bytes
is_in - determines which rows in obj are equal to rows in obj1
CALL:
f = is_in(obj,obj1,varargin)
INPUT:
obj: <table-object>
obj1: <table-object>
varargin: <string> (optional) restrict comparison to specified columns
default: all fields
OUTPUT:
f: <index> f(i) = j indicates that the ith element in obj is equal to
the jth element in obj1
See also: table, table/selectIndex, table/selectKey, is_in
<TOOLBOX>\@table
19-Sep-2006 16:46:52
1056 bytes
is_in - vectorized version of 'find'
CALL
function elm=is_in(g,h,G,H)
INPUT
g: vector with elements to be located
h: vector in which elements are looked for
H: sorted version of h (saves time)
Hindx: outcome of [hsort hidx]=sort(h);
OUTPUT
elm: returns indices >1 for each element of g which corresponds to elements of h
returned value corresponds with FIRST occurance in h
EXAMPLE
[H,Hindx]=sort(h);
for ...
elm=is_in(g,[],H,Hindx)
..
end
EXAMPLE (2):copy elements from other table using key
[f,ok]=is_in(key1,key2)
attrib1(ok)=attrib2(f(ok))
NOTE
In some cases "unique" is more efficient. Example:
INEFFICIENT CODE:
u_nrs=unique(nrs);
indx=is_in(nrs,u_nrss);
EFFICIENT CODE:
[u_nrs,dummy,indx]=unique(nrs);
See also:
is_in (deals with vectors)
is_in_find (shell around is_in that returns, first, second, etc match)
is_in_sort (deals with sorted vectors)
row_is_in (deals with rows of a matrix)
is_in_struct (deals with structures)
is_in_eq (deals with equidistant time series)
<TOOLBOX>
16-Aug-2008 14:24:16
3644 bytes
is_in_struct - find matching elements of structure in structure array
CALL
result=is_in_struct(PatternStruct,StructArray)
INPUT
PatternStruct: structure to look for
this must be a non-empty structure
StructArray: structure array to look in
this must be a structure array that has at least the
fields of PatternStruct
flds: fields to compare (optional)
default value: intersection of fields in PatternStruct and StructArray
OUTPUT
result:
result(k)=0 ==> no matching structure in StructArray for PatternStruct(k)
result(k)>0 ==> patternStruct(k) is matched by StructArray(result(k))
NOTE
this function has not been optimized for speed. Consider is_in_table
for data intensive queries
SEE ALSO
is_in (deals with vectors)
row_is_in (deals with rows of a matrix)
is_in_struct (deals with structures)
is_in_eq (deals with equidistant time series)
is_in_sort (deals with sorted time series)
is_in_table (deals with table structure)
findstructure (find a structure in a structure array)
<TOOLBOX>
15-Aug-2008 18:20:18
4985 bytes
overload setappdata for jacontrol objects INPUT
<TOOLBOX>\jacontrol\@jacontrol
07-Oct-2004 21:49:27
166 bytes
iscommitted - return status of object
SUMMARY
When an undoredo object is created or its contents ar reassigned
using setdata, the status "comitted" is set to TRUE. Each command
that changes the data content also sets the status "comitted" to
false. The status "comitted" is used in the application program to
decide if the user should be ask to save data when the application is
closed. This is typically implemented in the closerequest function.
When the user saves intermediate results the application should
include a statement that sets the comitted status to TRUE.
CALL
committed=iscommitted(obj)
INPUT
obj: undoredo object
OUTPUT
comitted: Comitted status (TRUE or FALSE)
Comitted status is TRUE ==> all transactions have been
comitted (saved to disk of
stored otherwise)
Comitted status is FALSE ==> one or more transaactions
have not been comitted
EXAMPLE
(code example save data)
ud = getdata(db);
save(fname,'ud'); %WIJZ ZIJPP OKT 2006
db=setcommitted(db);
store(db);
(code example close request function)
function closereq(hFig,event)
db = get_db;
if isempty(db)||iscomitted(db)
delete(hFig);
return
end
%Ask and store unsaved data
switch questdlg('Save data?,'Close application','Yes','No','Cancel','Yes')
case 'Yes'
savedata(db);
delete(hFig);
case 'No'
delete(hFig);
return
case 'Cancel'
return;
end
See also
undoredo/setcommitted
undoredo/subsasgn
undoredo/mbdvalue
undoredo/isopen
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 15:21:03
2145 bytes
isempty - returns true if table is empty (i.e. number of rows is zero),
false otherwise
CALL:
b = isempty(obj)
INPUT:
obj: <table-object>
OUTPUT:
b: <boolean>
See also: table, table/size
<TOOLBOX>\@table
16-Sep-2006 14:20:28
297 bytes
Overloaded method for isempty within class undoredo
CALL/INPUT/OUPUT
type "help isempty" for help on this topic
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 16:03:36
182 bytes
isempty - true if the xml-object has no fields
CALL:
tf = isempty(obj)
INPUT:
obj: <xml-object>
OUTPUT:
tf: <boolean> true if the DOM representation of the xml document does
not contain any nodes, or equivalently the xml-document
has no fields
EXAMPLE:
%create an empty xml-object
obj = xml
isempty(obj)
%add a field to the xml-object
obj.field = 'field'
isempty(obj)
%remove field from the xml-object
rmfield(obj,'field');
isempty(obj)
See also: xml, xml/noNodes, xml/fieldnames, xml/getRoot, xml/rmfield
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:53:38
790 bytes
Return true is visualization queue of object is empty
CALL
rc=isemptyqueue(obj)
INPUT
obj: undoredo object
OUTPUT
rc: true if nothing left to paint
EXAMPLE
% callback of OK button: callback of edits have changed database, but
% changes are not yet fully shown because db has not been flushed
if isemptyqueue(obj)
return
end
store(flush(obj))
See also
store
flush
deletequeue
<TOOLBOX>\matlabguru\@undoredo
11-Apr-2008 00:11:29
556 bytes
Overloaded method for isfield within class undoredo
CALL/INPUT/OUPUT
type "help isfield" for help on this topic
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 16:03:57
203 bytes
isfield - true if at least one node satisfies the indexing 'sub'
CALL:
tf = isfield(obj,field)
INPUT:
obj: <xml-object>
sub: <string> index into xml document (same format as indexing into
Matlab structures) e.g. 'book(1)' or 'book(1).title'
result in the same substructs as would be obtained if
S.book(1)or S.book(1).title were used (S a Matlab
structure)
<string> with xpath expression
OUTPUT:
tf: <boolean> true if at least one node satisfies the indexing 'sub'
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
isfield(obj,'book(1:2)')
isfield(obj,'book(2).@category')
%N.B. in the following statement true is return although the number of
%books is 4, this is because book(2:4) exist
isfield(obj,'book(2:10)')
%examples with xpath expression
%are there any books in english?
isfield(obj,'bookstore/book/title[@lang=''en'']')
%are there any books in spanish?
isfield(obj,'bookstore/book/title[@lang=''es'']')
%are there books cheaper than 30 euro
isfield(obj,'bookstore/book[price < 30]')
See also: xml, xml/fieldNames, xml/rmfield
<TOOLBOX>\xml_toolbox\@xml
02-Jun-2006 17:17:54
1618 bytes
isopen - return true if user has double clicked
CALL
ok=isopen
ok=isopen(HWIN)
ok=isopen(event)
INPUT
HWIN: window handle
event: event from jxtable
OUTPUT
ok: TRUE if user has doubleclikked
NOTE
this function is needed to evbaluate doubleclick status in tabels
because "selectiontype" property does not return correct values in
these cases. This function also works if called outside of table.
<TOOLBOX>\jacontrol
03-Jul-2008 11:52:16
1227 bytes
return - group status of undoredo object
CALL
isopen=isopen(obj)
INPUT
obj: undoredo object
OUTPUT
isopen: status of group
isopen = 1 ==> the group is open. a next ur_assign statement
would add to this group
(newgroup=0)
isopen = 0 ==> the group is closed. a next ur_assign
statement initializes a new group
(newgroup=1)
SEE ALSO:
ur_assign
mbdflush
ur_label
REMARK
mbdsubsasgn needs a newgroup argument. When mixing ur_assign and
mbdsubsasgn statements use newgroup=~isopen(db) or equivalent:
newgroup=db.nextisnew
<TOOLBOX>\matlabguru\@undoredo
28-Jan-2005 13:50:37
1013 bytes
lm_isparent - Find out if a given frame is a child of any of a list of candidate parent frames CALL: istrue = isparentframe(h, hframes) INPUT h: Frame handle (scalar) hframes: Handles of potential parent frames OUTPUT: istrue: Boolean, true if any of hframes is the parent of h See also: lm_parentframe
<TOOLBOX>\MBDresizedir
11-Aug-2008 22:22:02
1521 bytes
isregistered - returns true if undoredo object is registered on figure
CALL:
b = isregistered(obj, fig)
INPUT:
signature: <double> with undoredo object's signature
fig: <handle> of figure
OUTPUT
b: <boolean> true if undoredo object is registered on figure
false otherwise
See also: undoredo, evaldepend
<TOOLBOX>\matlabguru
07-Mar-2007 11:23:24
719 bytes
istable - determine if S can be converted to a table-object
CALL:
[ok,emsg] = istable(S)
INPUT:
S: <struct> (candidate) table structure
OUTPUT:
ok: <boolean> true if S is table structure,
false otherwise
N: <integer> height of table
See also: table
<TOOLBOX>\@table\private
13-Nov-2006 16:42:12
1303 bytes
istable - check if S can be considered as a table structure
CALL
[ok,N,emsg]=istable(S)
INPUT
S: (candidate) table structure
OUTPUT
ok : true if S is table structure; false otherwise
N : height of table
emsg: <string> extra information if ok is false
EXAMPLE
if ~istable(S)
error('Assertion failed: variable is not a table structure');
end
<TOOLBOX>
16-Aug-2008 11:12:29
1339 bytes
jacontrol - create a jacontrol object and set user defined fixed
properties
CALL:
[obj, hcontainer] = jacontrol(hParent,propertyName,propertyValue,...)
[obj, hcontainer] = jacontrol(propertyName,propertyValue,...)
INPUT:
varargin: property-value pairs, see jacontrol/set for valid properties
OUTPUT:
obj: the jacontrol object
hcontainer: the returned container from the call to javacomponent
EXAMPLES:
%jacontrol object work together with mbdarrange
[spinner,h] = jacontrol('style','jspin',...
'tag','minframeh',...
'steps',20,...
'toolt',toolt);
set(spinner,'callb',{@set_setting2_0,spinner,'','minframeh'});
setappdata(spinner,'opt',struct('type','int','minimum',200,...
'maximum',1000,'required',1,...
'minstr',toolt,...
'maxstr',toolt));
mbdlinkobj(h,h_inner);
mbdarrange(h_inner,'VMARGE',1,'HMARGE',5);
%jacontrol works together with mbdparse
%jacontrol works together with gcjh:
[spinner,h] = jacontrol('style','jspin',...
'tag','minframeh',...
'steps',20,...
'toolt',toolt);
h_jacontrol = gcjh('minframeh')
See also: gcjh, javacomponent
<TOOLBOX>\jacontrol\@jacontrol
25-Jul-2008 15:18:30
12553 bytes
inspect - show a window with a treetable with jacontrol types and fields
CALL:
jacontroltree
INPUT:
no input
OUTPUT:
no output, a window with a treetable with jacontrol types and fields
is displayed
See also: jacontrol, tableWindow
<TOOLBOX>\jacontrol\@jacontrol\private
26-Mar-2008 13:18:04
4494 bytes
jafields - Enumerate fieldnames for which a translation to java objects
exists
CALL:
flds = jafields(style)
INPUT:
style: string met jacontrol stijl
OUTPUT:
flds: cellstring met properties van betreffende jacontrol stijl
See also: jacontrol, jacontrol/get, jacontrol/set, jacontrol/help,
jacontrol/private/jatypes
<TOOLBOX>\jacontrol\@jacontrol\private
06-Jun-2008 13:13:12
11456 bytes
jatypes - list all acceptable values for the "style" property of a
jacontrol object
CALL:
flds = jatypes
INPUT:
no input
OUTPUT:
flds: <cellstring> acceptable styles for a jacontrol object
See also: jacontrol
<TOOLBOX>\jacontrol
15-May-2008 09:26:42
734 bytes
javacomponent - overloaded function for javacomponent store stack
for use with guibrowser
<TOOLBOX>\debug
10-Aug-2006 05:15:10
427 bytes
Get handle of java object for Matlab object
CALL
h_Java=javahandle(h)
INPUT
h: Matlab hg handle (uitoolbar or figure)
OUTPUT
h_Java: Java handle
EXAMPLES
htool=uitoolbar;
jh=javahandle(htool);
jh.addGap(1000); %diveide left and right cluster
jh.addSeparator; %add Separator
jh=javahandle(gcf);
get(jh); %show current properties
methods(jh); %see what you can do with this window
<TOOLBOX>
26-Mar-2008 17:37:38
2271 bytes
keepColumn - keep specified columns of a table CALL: obj = keepColumn(obj,varargin) INPUT: obj: <table-object> varargin: <string> with columnnames to be kept OUTPUT: obj: <table-object> with only the select columns See also: table, table/deleteColumn, table/renameColumn
<TOOLBOX>\@table
20-Sep-2006 10:21:10
564 bytes
keepfields - keep the specified fields of a structure, remove the rest CALL: S = keepfields(S,varargin) INPUT: S: <struct> varargin: <string> fields to keep OUTPUT: S: <struct> See also: rmfield
<TOOLBOX>
20-Sep-2006 12:54:44
470 bytes
THIS FUNCTION IS OBSOLETE. USE SETLABEL
<TOOLBOX>\matlabguru\@undoredo
09-Aug-2008 14:23:57
1386 bytes
lees_locfile - Lees .LOC bestand met DONAR locaties
CALL:
S = lees_locfile(loc_file)
INPUT:
loc_file - <string> met filenaam en pad van het .LOC bestand.
Iedere regel bevat de inhoud van een veld LOC uit
een DIA, bijvoorbeeld:
DENHDR;Den Helder;P;RD;11185000;55323000
OUTPUT:
S: <struct array> met per element de velden:
sLoccod: <string> DONAR code van de locatie
sLocoms: <string> naam van de locatie
sCrdtyp: <string> coordinaattype b.v. RD
lXcrdgs: <double> x- en y- coordinaat van locatie in RDV
lYcrdgs: <double> x- en y- coordinaat van locatie in RDV
See also: databeheer, lees_typfile , emptystruct
<APPLICROOT>\melissa2006\DATABEHEER
22-Dec-2006 11:25:14
1747 bytes
lees_typfile - Lees .TYP bestand met DONAR datatypes
CALL:
S = lees_typfile(typ_file)
INPUT:
typ_file - <string> met filenaam en pad van het .TYP bestand.
In het bestand kunnen regels met commentaar
voorkomen (beginnend met %), regels met het woord
DATATYPE die een beschrijving geven van de manier
waarop het type in de lijst van de WGB Editor moet
voorkomen, en regels met DONAR code om het datatype
te definieren. Een voorbeeld:
% DEFAULT.TYP
% bestand met default datatypen
datatype;Waterhoogte
WNS;1
datatype;Getijextremen
MUX;GETETM2;Getijextremen
datatype;Astronomisch Getij
WNS;15
OUTPUT:
S: <struct array> met per element de velden:
datanaam - <string> met data beschrijving voor lijst
datadesc - <struct> met DONAR regelidentificaties
See also: databeheer, lees_locfile , emptystruct
<APPLICROOT>\melissa2006\DATABEHEER
21-Dec-2006 17:01:42
3016 bytes
limit_time - perk tijdinterval van reeksen in database in
CALL:
db = limit_time(db, C, indx, begintijd, eindtijd, tijdstap, aggregatie)
INPUT:
db: <undoredo object> de centrale database
C: <struct> met de Melissa constantes
indx: <vector> met indices van reeksen
begintijd: <datenum>
eindtijd: <datenum>
tijdstap: <integer> aantal minuten
OUTPUT:
db: <undoredo object> de centrale database met de volgende
bijgewerkte velden:
- db.data.dia.W
- db.data.dia.status
- RKS
- TPS
reportstr: <string> commentaar voor het logboek
See also: interp_blok
<APPLICROOT>\melissa2006\DATABEHEER
24-Jul-2008 11:16:14
3672 bytes
linetool - interactive changing of line coordinates
CALL
Handles=linetool(arg1,arg2,arg3,arg4)
INPUT
arg1: type of action
options:
XMOVE
YMOVE
XYMOVE
arg2: handle of line
arg3: x coordinates for which to install utility
arg4: function to be called after action
structure with following optional arguments
INITMOVE
MOVE
SINGLECLICK
AFTERMOVE
OUTPUT
Handles: handles of draggable markers
<TOOLBOX>
15-Aug-2008 21:46:19
5272 bytes
listRKS - vul een struct array van RKS structures op basis dia array
CALL:
RKSs = listRKS(dia,indices)
INPUT:
dia: <struct array> met dia's (zie emptystruct('dia'))
indices: <vector> (optioneel) te gebruiken indices (default: alle)
OUTPUT:
RKSs: <struct array> van het RKS gedeelte van een dia
See also: listW3H
<APPLICROOT>\melissa2006\HULPFUNCTIES
17-Nov-2006 16:01:54
692 bytes
listW3H - vul een struct array van W3H structures op basis van een dia
array
CALL:
W3Hs = listW3H(dia,indices)
INPUT:
dia: <struct array> met dia's (zie emptystruct('dia'))
indices: <vector> (optioneel) te gebruiken indices (default: alle)
OUTPUT:
W3Hs: <struct array> van het W3H gedeelte van een dia
See also: listRKS
<APPLICROOT>\melissa2006\HULPFUNCTIES
02-Jan-2007 12:22:12
855 bytes
listloc - utility voor het uitlezen van stuurfiles
CALL:
listlocations = listloc(loccodes, names)
INPUT:
loccodes: <char array> namen van stations in werkgebied
names: <char array> namen van stations in lijst
OUTPUT:
listlocations: <index> indices in names bij station loccodes
APPROACH:
Deze utility wordt gebruikt voor stuurfiles van de structuur
Station waarde waarde ...
....
Indien een station Default aanwezig is worden stations waarvoor geen
stuurinfo aanwezig is voorzien van een code die naar de defaultinfo
verwijst. Dus
- ofwel: er is een station met identieke naam gevonden
- ofwel: er is een station genaamd default
- anders: de rest van stations krijgt code 0
See also: row_is_in
<APPLICROOT>\melissa2006\HULPFUNCTIES
11-Feb-2007 15:42:14
1242 bytes
listmenus - maak een lijst van alle (ook 'hidden') menuhandles
CALL:
applicmenus = listmenus(XcludeProps)
INPUT:
XcludeProps: <struct array> met properties van te negeren menu's
fieldname (bijv: 'label','tag','color', etc.
value: bijbehorende attribuut waarde
OUTPUT:
applicmenus: <handle> van de gevonden menus
APPROACH:
bepaal alle zichtbare menus
zet ook de onzichtbare menus aan
bepaal nogmaals alle menus
applicmenus = alles wat nu zichtbaar is - alles wat al zichtbaar was
sluit ook unwanted menus uit
OPMERKING: als alle menus standaard zichtbaar waren (geen menus
verscholen) dan worden alle menus geexporteerd (dus ook de
user menus)
<TOOLBOX>
04-Apr-2005 09:16:22
1909 bytes
listns - list the namespace definitions of the xml-object
CALL:
listns(obj)
INPUT:
obj: <xml-object>
OUTPUT:
no direct output, the defined namespaces are displayed on the console
EXAMPLE
%create an xml-object
obj = xml(fullfile(pwd,'examples','namespaces.xml'))
%no namespaces defined yet
listns(obj)
%add namespaces
addns(obj,{'ns','http://www.w3schools.com/furniture'})
addns(obj,{'nsdim','http://www.modelit.nl/dimension'})
%list namespaces
listns(obj)
See also: xml, xml/addns, xml/clearns, xml/removens, xml/getns
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:21:22
995 bytes
load - load a table and store it in the tablefile-object CALL: obj: <tablefile-object> INPUT: obj: <tablefile-object> filename: <string> OUTPUT: obj: <tablefile-object> See also: tablefile, tablefile/save
<TOOLBOX>\@tablefile
02-Oct-2007 11:02:58
1904 bytes
Compileerbare vorm van 'load'
CALL
[var1,var2,... ]= load_cmp(fname,varname1,varname2,...)
INPUT
fname: naam van de mat file INCLUSIEF extensie
varname1, varname2: naam van de variabelen in de file
OUTPUT
aanroep is equivalent aan:
load(fname)
var1=varname1
var2=varname2
..
SEE ALSO:
load_var (requires Matlab V7)
<TOOLBOX>
21-Nov-2005 12:00:15
3013 bytes
logbookentry- update transaction log (add entry)
CALL:
db = logbookentry(db,content,type,undolabel,comment)
INPUT:
db : undoredo object (to be updated)
content : value for content property (CELL or CHAR array)
type : value for type property (default: empty)
undolabel: label for undo menu (default: empty) Include this if
transact-set defines the only element of an update group
comment : value for comment property (default: empty)
OUTPUT
obj : undoredo object (update complete)
The field "transaction" is inititialized or appended with
the following data structure:
transaction
+----date (double)
+----content (char array)
+----type (char array)
+----comment (char)
SEE ALSO : logbookgui (currentlty transact_gui)
EXAMPLE
data.value=1:10
db=undoredo(data);
data.value(5)=50;
db=logbookentry(db,'element 5 has been updated','updated');
disp(getdata(db))
<TOOLBOX>\matlabguru\@undoredo
09-Aug-2008 11:39:04
2230 bytes
long2datenum - Convert two Longs with date with format YYYYMMDD and time
with format HHmm to Matlab datenum format.
CALL:
taxis = long2datenum(taxisdatum, taxistime, timeunit)
INPUT:
taxisdate:
Vector of Long with format YYYYMMDD.
taxistime:
Vector of Long with format HHmm.
OUTPUT:
taxis:
Vector with corresponding values in Matlab datenum format.
APPROACH:
Using the Matlab 'rem' en 'round' operators Year, Month, Day, Hour and
minute are extracted, followed by a call to datenum to get the Matlab
datenum format of the specified dates.
See also: datenum2long
<TOOLBOX>\diaroutines
17-Aug-2008 14:51:44
1262 bytes
<TOOLBOX>
17-Mar-2008 18:08:03
20480 bytes
mat2db -
CALL:
db = mat2db(db, mat)
INPUT:
db: <undoredo object> met de centrale Melissa database
mat: <struct> zie db2mat
OUTPUT:
db: <undoredo object> met de bijgewerkte centrale Melissa database
See also: db2mat
<APPLICROOT>\melissa2006\HULPFUNCTIES
12-Mar-2007 19:37:00
972 bytes
matgetvar - genereer de reeks(en) met W voor een opgegeven locatie
variabele tijdstip(verschuivingen) combinatie met behulp van
de matrix die gemaakt is met db2mat
CALL:
[W_sel, index] = matgetvar(W, Wkey, WTkey, periodeIndex)
INPUT:
W: <matrix> met meetdata
Wkey: <structarray> bijbehorende sleutels (ZIE db2mat)
lengte is aantal benodigde reeksen, met velden:
- sLoccod: <string>
- sParcod: <string>
WTkey: <struct> sleutels van op te halen reeksen met velden:
- sLoccod: char str
- sParcod: char str
- tShift: integer
periodeIndex: <vector> met de indices van de te berekenen periodes
OUTPUT:
W_sel: <array> de waarden voor de loc var tijd combinatie
index: <int> de index van de dia die hoort bij de loc var combinatie
See also: db2mat, parseTC
<APPLICROOT>\melissa2006\HULPFUNCTIES
23-Mar-2007 03:43:02
2590 bytes
lm_listFrameHandles - retrieve frame handles and frame data for the
specified figure
CALL:
[FrameHandles, FrameData] = lm_listframeHandles(hfig)
INPUT:
hfig: figure handle (defaults to gcf)
OUTPUT:
FrameHandles: Nx1 list of frame handles
FrameData: Nx1 struct array with corresponding application data
<TOOLBOX>\MBDresizedir
12-Aug-2008 13:11:44
2452 bytes
delete frame and all dependent items
CALL
mbd_deleteframe(hframes)
INPUT
hframes: list of frame handles
OUTPUT
none
See also: lm_deleteframecontent
<TOOLBOX>\MBDresizedir
04-Aug-2008 15:02:47
1454 bytes
mbd_deleteframecontent - delete contents of frame, but leave frame in place
CALL
mbd_deleteframecontent(hframes,h_excepted)
INPUT
hframes: frame or frames to be deleted (all frames must be a member
of the same figure)
h_excepted: handles of objects that should not be deleted
OUTPUT
none
See also: mbd_deleteframe
<TOOLBOX>\MBDresizedir
17-Aug-2008 10:28:50
2068 bytes
mbd_initialize_axis -
CALL:
h = mbd_initialize_axis(HWIN,LAYER)
initialize pixel axes for this window
INPUT
HWIN: window for which pixel axes will be set (defaults to gcf)
LAYER: Layer number. If needed, multiple axes objects can be created
to enable plotting in different layers. Frames plotted in the current
axes obscure lines and text objects in other layers
OUTPUT
h: handle of pixel axes for layer LAYER
EXAMPLE
hax=mbd_initialize_axis;
h=text(1,1,'my text','parent',hax);
mbdlinkobj(h,hframe,'pixelpos',[ 10 10 20 20]);
<TOOLBOX>\MBDresizedir
14-Oct-2006 00:21:48
1437 bytes
mbd_restore - herstel interactieve status van GUI
interface.
CALL
mbd_restore(uistruct)
INPUT
uistates: structure array = output van UISUSPEND (input voor UIRESUME)
figureHandle : figure handle
figsettings : figure attributes
children : handles of children
childsettings : struct array with settings
uic_children : handle of uimenu, uicontrol and uicontext children
uic_childsettings: struct array with settings
OUTPUT
geen
OUTPUT NAAR SCHERM
Herstel de interactieve status van GUI
interface.
APPROACH
Herstel de interactieve status van GUI
interface met behulp van de functie UIRESTORE en het veld
uistruct.uistates.
Herstel de 'enable' status van objecten uistruct.objhandles met
behulp van het veld uistruct.uienable.
See also: MBD_SUSPEND UIRESTORE UISUSPEND
<TOOLBOX>
15-Aug-2008 13:52:41
2500 bytes
mbd_suspend - schort interactieve status van GUI
interface op.
CALL
uistates=mbd_suspend
INPUT
geen
OUTPUT
uistates: structure array = output van UISUSPEND (input voor UIRESUME)
figureHandle : figure handle
figsettings : figure attributes
children : handles of children
childsettings : struct array with settings
uic_children : handle of uimenu, uicontrol and uicontext children
uic_childsettings: struct array with settings
OUTPUT NAAR SCHERM
schort interactieve status van GUI
interface op.
EXAMPLE:
try
%- Zet interactieve eigenschappen van applicatie uit (mbd_suspend)
uistate=mbd_suspend;
<ACTIE>
catch
%- Actveer de interface (mbd_restore)
mbd_restore(uistate);
error(lasterr);
end
%- Actveer de interface (mbd_restore)
mbd_restore(uistate);
<TOOLBOX>
23-Jan-2006 01:28:46
5408 bytes
mbdarrange - arrange uicontrol objects in rows and columns
CALL
mbdarrange(hframe,property,value,...)
mbdarrange(hframe,propertystruct)
INPUT
input comes in parameter-name,value pairs (parameter name not case
sensitive)
LMARGE, value: margin left (Default =10)
LMARGE is a scalar
RMARGE, value: margin right (Default =10)
RMARGE is a scalar
HMARGE, value: margin between, horizontal (Default =5)
HMARGE may be specified as a vector or scalar
TMARGE, value: margin top (Default =15)
TMARGE is a scalar
BMARGE, value: margin below (Default =6)
BMARGE is a scalar
VMARGE, value: margin between, vertical (Default =1)
VMARGE may be specified as a vector or scalar
PIXELW, value: pixel width of frame (default: compute)
PIXELH, value: pixel height of frame (default: compute)
NORESIZE, value: if set, do not resize frame
HEQUAL, value: if set, distribute Horizontally (default: 0)
VEQUAL, value: if set, distribute Vertically (default: 0)
HNORM, (0,1) if 1: normalize horizontally (use full frame width)
VNORM, (0,1) if 1: normalize vertically (use full frame height)
HCENTER, (0,1,2) if 0: left align
if 1: center items in horizontal direction
if 2: right align items in horizontal direction
NOTE: if HNORM==1 the HCENTER option is ignored
VCENTER, (0,1,2) if 0: top align
if 1: center items in vertical direction
if 2: bottom align
NOTE: if VNORM==1 the VCENTER option is ignored
INDIRECT INPUT
object application data:
keeppixelsize: set to 1 to prevent changing pixelsize
ignoreh : set to 1 to prevent using height to compute row
pixel height
ignorew : set to 1 to prevent using width to compute column
pixel width
pixelpos : if set, pixelpos is not recomputed
normpos : if option HNORM is active, element 3 of normpos is
used (EXCEPTION: if object is spread over more
columns, its normalized width is not used)
object attributes
pos
type
extent
OUTPUT
pixpos:[pixpos(1) pixpos(2] extent van objecten, inclusief marges
raster: Coordinates of raster. Suppose raster is M x N:
raster.x.pixelpos (length N+1)
raster.x.normpos (length N+1)
raster.y.pixelpos (length M+1)
raster.y.normpos (length M+1)
AANPAK
<TOOLBOX>\MBDresizedir
03-Aug-2008 22:13:22
20643 bytes
mbdcreateexitbutton - Add exit button to frame.
SUMMARY
Add exit button to frame. By default this button is placed in yhe UR
corner of a frame.
CALL
h = mbdcreateexitbutton(hparent,BACKG,callback)
INPUT:
hparent: handle van parent frame
BACKG: color for transparant part of button
callback: additional function to call when frame is closed
OUTPUT:
h: handle van button
EXAMPLE:
positioneer button rechts onder
h=mbdcreateexitbutton(hparent)
h=mbdcreateexitbutton(h_hlp)
setappdata(h,'normpos',[ 1 1 0 0]);
setappdata(h,'pixelpos',[-14 -14 12 12]);
SEE ALSO:
fr_exitbutton
mbdframeonoff
<TOOLBOX>\MBDresizedir
17-Aug-2008 10:27:33
1873 bytes
mbdcreateframe - maak een mbdresize frame aan
CALL
h=mbdcreateframe(handle,'property', value, 'property', value)
h=mbdcreateframe('property', value, 'property', value)
INPUT
handle: handle van parent frame.
Als er geen parenthandle wordt opgegeven,
dan wordt het current figuur de parent
'property'/value :
Niet default eigenschappen van het frame.
Deze hoeven alleen te worden opgegeven voor de niet-default waarden.
Mogelijke properties:
PROPERTY BETEKENIS
======================================================================
'active' zichtbaarheid van het frame en alle children
true==> zichtbaar
false==> niet zichtbaar
'border' (default=true)
zichtbaarheid van de rand van het frame en het frame zelf
true==> zichtbaar
false==> onzichtbaar
LET OP!: de rand van het frame wordt op de inborder getekend
'enable' enable properties van dit frame en alle children
'exitbutton' (default=false)
aanwezigheid van exitbutton
'exitfunction' functie die wordt aangeroepen indien frame gedeactiveerd wordt
'lineprops' (default: [])
Eigenschappen van de line die het frame markeert
zie Matlab - line voor meer informatie
VOORBEELD: ...,'lineprops',mbdlineprops('color','k','shadowed',0 ),...
...,'lineprops',mbdlineprops,...
'shadowed' eigenschap: (default true)
Wanneer property lineprops is gezet zorgt shadowed ervoor
dat er consequent een schaduw wordt getekend.
'maxpixelsize' (default=[inf inf])
When pixelsize is set this defines the maxvalue (per
dimension)
'minmarges' marge in pixels voor dit frame [LINKS ONDER RECHTS BOVEN]
TEN OPZICHTE VAN PARENT FRAME!! (dus niet tov van child frames)
LET OP!: de rand van het frame wordt op de inborder getekend
'normposition' positie van topframe tov van figure (normalized)
'normsize' (default=[1 1])
Afmetingen van het frame in genormaliseerde coordinaten
LET OP: door de pixelsize NaN op te geveb wordt deze berekend
als de som van de ACTIEVE subframes
'parenthandle' handle van parent frame (meestal alseerste argument doorgegeven)
nodig indien een top frame in een niet-current scherm wordt aangemaakt
'patchprops' (default: [])
Eigenschappen van de patch die het frame markeert
zie Matlab - patch voor meer informatie
VOORBEELD: ...,'patchprops',mbdpatchprops('facec',C.WINCOLOR,'linew',1),...
'pixelposition' positie van topframe tov van figure (in pixels)
'pixelsize' (default=[0 0])
Afmetingen van het frame in pixel coordinaten
'rank' (default=0)
Plaats van het scherm:
bij horizontale splitsing: hoe hoger hoe meer naar rechts
bij verticale splitsing: hoe hoger hoe meer naar beneden
'slider' handle van een slider object
de children frames en objecten worden afhankelijk van de
slider instelling geplaatst.
'splithor' (default= omgekeerde van splitsings richting van parent)
true==> splits horizontaal
false==> splits verticaal
'title' af te drukken titel string
OUTPUT
h: de handle van het gemaakte frame
EXAMPLES
Example -1-
Create a figure that sizes to fit contents exactly:
hfig=mbdcreateframe(HWIN,'splithor',0,'pixelsize',[NaN NaN],'normsize',[0 0]);
Example -2-
Create a figure that sizes to fit contents but does not shrink the figure:
hfig=mbdcreateframe(HWIN,'splithor',0,'pixelsize',[NaN NaN],'normsize',[1 1]);
<TOOLBOX>\MBDresizedir
08-Mar-2008 12:49:30
20660 bytes
mbdsetpixelsize - Change pixelsize property of frame
SUMMARY
Change pixelsize property of frame so thatthe size of
the innerframe matches a given size. This utility is useful if the size
of what goes into the frame is known and one wants to schrink the outer
frame so that it exactly fits its contents.
CALL
outbordersize=mbdinnerpixelsize(hframe,innerborderpixelsize)
INPUT
hframe : handle van MBD frame
innerpixelsize : required pixel size (inner border)
OUTPUT
outerpixelsize: computed outer border size
<TOOLBOX>\MBDresizedir
17-Aug-2008 10:17:01
978 bytes
mbdlabel - create an interactive text label
CALL
mbdlabel(h,str,Options)
INPUT
h : handle of object that gets an extra buttondown function
str : pop up message
Options: parameter value pairs
permitted values
show: on {off}
on: activate after button press
button: activate now
buttond: {on} off
on: install buttondown activation
off: do not install buttondown activation
mode: {arrow} text box
arrow : show arrow and text
text : show plain text
box : show label in box
NOTE
This function can also be used to set pone label on multiple objects,
These object then form a virtual object from the viewpoint of label
setting
EXAMPLES
show label in box, popup now, do not set interactive props
mbdlabel(gco,label,'mode','box','show','on','buttond','off');
hide label
mbdlabel(gco,'');
<TOOLBOX>
15-Aug-2008 14:48:17
7288 bytes
lm_lineprops - return default line options for frame border (line)
SUMMARY
This function returns a structure tha can be passed to the Matlab
"line" command. If called without arguments it will produce the
settings that are needed to plot a "standard" border.
Any property value pair that can be passed to the line command can
also be passed to lm_lineprops.
Additionally the argument "shadowed" may be passed. This argument
tells the layout manager to plot not one, but two lines. This results
in a shadow effect.
CALL
s=lm_lineprops(property,value,...)
INPUT
property, value: any line property
'shadowed',B: B=1==> apply shadow
B=0==> do not apply
See also: lm_patchprops, lm_createframe
<TOOLBOX>\MBDresizedir
17-Aug-2008 10:33:55
2060 bytes
mbdlinkobj - linkt een object aan een mbdframe
CALL
mbdlinkobj(hobj, hframe, property, value, property, value,...)
mbdlinkobj(hobj, hframe, struct(property, value))
INPUT
hobj : object or array of handles or jacontrol object
hframe: frame to link to
property: char string containg property name
value: corresponding property value. Note: property/value
combinations may als be passed on as a tructure.
<propertye, value>
clipframe
see mbdresize
clipping [0 or 1]
clip object if out of frame borders
enable
Default: enable status is copied from application data
"enable" from frame.
Note
<on> and <off> is supported. <inactive> is not supported.
Object | Frame
enabled | enabled status
'Frame=on' 'Frame=off' 'Frame=inactive'
==========================================
0 ==> 'off' 'off' <not supported>
1 ==> 'on' 'off' <not supported>
2 ==> 'inactive' 'off' <not supported>
3 ==> 'off' 'off' <not supported>
4 ==> 'on' 'on' <not supported>
5 ==> 'inactive' 'inactive' <not supported>
keeppixelsize : is 1 maintain pixel height and width while alignigning in matrix
keepypos: if 1 ==> position of slider has no effect on this
object
normpos [X,Y,WIDTH,HEIGHT]
normalized position relative to LL corner of frame
pixelpos [X,Y,WIDTH,HEIGHT]
pixel position relative to LL corner of frame
visible
0 ==> do not show
1 ==> show
row: align on position (row,col) in matrix
col: align on position (row,col) in matrix
OUTPUT
none
AFFECTED OBJECTS
-1- affected application data of frame:
when an object is linked to a frame, this will affect the following
fields of application data of this frame:
uichildren
textchildren
children
javachildren
-2- affected properties of object:
parent: when object-parent differs from frame-parent
units : set to "pixel" when object is of type
text,uicontainer,hgjavacomponent
-3- affected application data of object, required:
normpos
pixelpos
visible
enable
clipping
keepypos
-4- affected application data of object, optional:
clipframe
row
col
keeppixelsize
<TOOLBOX>\MBDresizedir
20-Mar-2008 19:33:01
11693 bytes
lm_linkslider2frame - make y-position of frame content dependent on a
vertical slider
CALL:
lm_linkslider2frame(hslid, targetframe)
INPUT:
hslid: handle of uicontrol of style "slider"
targetframe: handle of target frame. The contents of this frame can be
moved by using the slider
OUTPUT:
no direct output. The slider handle is stored in the target frame in the
property "slider"
<TOOLBOX>\MBDresizedir
12-Aug-2008 16:01:42
2737 bytes
mbdparse - parse user input
CALL
mbddisplay(h,val);
display argument "val" in object "h"
[val,ok]=mbdparse
[val,ok]=mbdparse(h)
retreive argument "val" from object "h"
check validity of input
INPUT
h: uicontrol or jacontrol handle
value: value to display in field (typically used at installation)
INDIRECT INPUT
opt=getappdata(h,'opt')
application data for this object
SUPPORTED OPTIONS:
opt.dealwith : function that replaces mbdparse entirely
DEFAULTVALUE: opt.dealwith ='';
opt.format : format string for reading
(not required if 'dealwith' or 'type' specified)
NOTE: do not use '%.f' or similar for reading, use '%f' instead
if formatting is required specify opt.displayformat='%.2f'
DEFAULTVALUE: opt.format ='';
opt.type : type of field
(not required if 'dealwith' or 'format' specified)
int : integers
double : doubles
str : str
url : url (e.g. http://www.modelit.nl)
filename : str (opt.filter)
directory: str
date : date dd/mm/yyyy mm/yyyy or yyyy
ddmmm : date dd/mm/yyyy dd/mmm or mmm
time : HH:MM
DEFAULTVALUE: opt.type ='';
opt.multiple : allow entering multiple values separated by ; or space (default 0)
works for type = int,double not tested for
other types
opt.required : forced field (empty not allowed)
DEFAULTVALUE: opt.required =0;
opt.emptywarn: warning to be provided when emptystring is
encountered
DEFAULTVALUE: opt.emptywarn ='Empty input not allowed for this field';
opt.emptystr : string that is displayed when field is empty
DEFAULTVALUE: opt.emptystr ='';
opt.filter : filter applicable when opt.type == filename
DEFAULTVALUE: opt.filter ='*';
opt.exist : if 1 (or not specified) check existence of file or directory
DEFAULTVALUE: opt.exist =1;
opt.minimum : minimum value (== is allowed)
DEFAULTVALUE: opt.minimum = -inf;
opt.minstr : message if value too low
DEFAULTVALUE: opt.minstr ='Value too low';
opt.maximum : maximum value (== is allowed)
DEFAULTVALUE: opt.maximum = inf;
opt.maxstr : message if value too high
DEFAULTVALUE: opt.maxstr ='Value too high';
opt.oldvalue : previous value (to be restored if new value is incorrect)
DEFAULTVALUE: opt.oldvalue =[];
opt.displayformat : format string for displaying
DEFAULTVALUE: opt.displayformat='';
opt.compact: works for type=filename
opt.settooltip: copy string into tooltip (for display of
long strings in small fields)
DEFAULTVALUE: opt.settooltip=0;
opt.codeword: (Only applicable if opt.type==filename)
accept this codewords even if they do not
match with filename
DEFAULTVALUE: {} (empty cell array)
EXAMPLES: opt.codeword='<NO SELECTION>'
opt.codeword={'<NO SELECTION>','<ALL FILES>'}
opt.parent: get options from specified parent
OUTPUT
val: value entered by user
ok : ok==1 if value is succesfully entered
EXAMPLE
figure
h=uicontrol('style','edit','str','20','callb',{@mbdparse,1});
opt=struct('type','int',...
'minimum',0,...
'minstr','value to low',...
'maximum',100,...
'maxstr','value to high',...
'compact',0,...
'oldvalue',50,...
'required',1,...
'feedback',1);
setappdata(h,'opt',opt);
mbdparse(h)
See also: val=mbdparsevalue
<TOOLBOX>
16-Aug-2008 11:53:20
25669 bytes
mbdpatchprops - return default line options for frame border (patch)
SUMMARY
This function returns a structure tha can be passed to the Matlab
"patch" command. If called without arguments it will produce the
settings that are needed to plot a "standard" border for a frame that
is showedusing a patch object.
The advantage of using a patch is that it provides a background color
(like a uicontrol frame) but does not obscure axeses and objects
plotted in it.
CALL
s=mbdpatchprops(varargin)
INPUT
property, value: any patch property
See also: lm_lineprops, lm_createframe
<TOOLBOX>\MBDresizedir
17-Aug-2008 10:36:50
2060 bytes
lm_pixelsize - get pixelsize of frame CALL: pixelsize = lm_pixelsize(hframe) INPUT: hframe: frame handle OUTPUT: pixelsize: vector [height, width] with the pixelsize of the frame EXAMPLE: position figure in the middle of the screen HWIN = figure; hmain = lm_createframe(HWIN,'splithor',0,'pixelsize',[300 200]); lm_resize(HWIN); pixelsize = lm_pixelsize(hmain); scrsz = get(0,'screensize'); mid = scrsz(3:4)/2; set(HWIN,'pos',[mid 0 0]+[-pixelsize/2 pixelsize]);
<TOOLBOX>\MBDresizedir
12-Aug-2008 12:12:34
1272 bytes
lm_resize - resize the figure and position all the objects it contains CALL: lm_resize(hfig, event) INPUT: hfig : figure handle event: standard Matlab callback argument, not used OUTPUT: All frames created with "lm_createframe" and all the objects linked to these frames with "lm_linkobj" are positioned in the figure. EXAMPLE: lm_resize(HWIN); set(HWIN,'Visible','on','ResizeFcn',@lm_resize); APPROACH: - maak een lijst van alle zichtbare mbdresize frames - zet alle objecten die in de MBD frames zitten uit - zet alle exit buttons uit - pas de sliderheight aan als de hoogte van het figuur groter is dan de sliderheight - pas de sliderheight aan - bereken de nieuwe posities van de mbdresize frames (inclusief de exit buttons) - zet de exit buttons van de zichtbare MBD frames weer aan - bepaal de sliderpositie - scroll het scherm tot de slider value weer klopt met het zichtbare scherm - bepaald voor alle zichtbare mbdresize frames de posities van de bijhorende objecten
<TOOLBOX>\MBDresizedir
12-Aug-2008 14:39:52
37325 bytes
lm_sortframes - create a sorted list of frames which are create with
lm_createframe, the frames are sorted based on level in hierarchy, parent
and rank
CALL:
[FrameData, parentIndex] = lm_sortframes(hfig)
INPUT:
hfig: figure handle
OUTPUT:
FrameData: structarray with collected information per frame
+----stack[]: debug informatie
| +----file (char array)
| +----name (char array)
| +----line (double)
+----treetop (logical)
+----parenthandle (double)
+----rank (double)
+----normsize (double array)
+----pixelsize (double array)
+----maxpixelsize (double array)
+----normposition (double array)
+----pixelposition (double array)
+----enable (logical)
+----splithor (double)
+----border (double)
+----exitbutton (logical)
+----exitfunction (char)
+----active (logical)
+----exitbuttonhandle (double)
+----minmarges (double array)
+----children (double)
+----textchildren (double)
+----javachildren (double)
+----uichildren (double)
+----slider (double)
+----patchhandle (double)
+----linehandle (double)
+----shadowlinehandle (double)
+----level (double)
+----showslider (double)
+----handle (double)
+----inborderpos (double)
+----outborderpos (double)
+----activenode (double)
+----enablednode (logical)
parentIndex: list with the parent indices corresponding to each element
in FrameData
APPROACH:
- maak een lijst van alle frames
- verwijder alle frames die niet met createMBDframe zijn aangemaakt uit de lijst
- bepaal het level van de overgebleven frames
- sorteer deze levels oplopend
- bereken eigenschap "pixelsize"
<TOOLBOX>\MBDresizedir
12-Aug-2008 14:59:38
11163 bytes
NOTE: THIS FUNCTION IS NOW OBOLETE
<TOOLBOX>
16-Aug-2008 13:59:24
594 bytes
This function is now obsolete ZIJPP 200 08 15
<TOOLBOX>
15-Aug-2008 16:43:19
262 bytes
mbdundoobj - ininitialize undoredo object
FUTURE NAME: this function will be superseeded by undoredo
CALL:
mbdundoobj(data,<property1>,<value1>,<property2>,<value2>,...)
INPUT
data: initial data content of undoredo object
PROPERTIES:(BY CATEGORY, ALL PROPERTIES ARE OPTIONAL)
Display properties
- displayfunction: function to call when content of undoredo object changes
Possible values : string with name of function or function-pointer
Default value : '' (no display function will becalled)
Remark : this function is called in the following way:
feval(signature,update,data,queued);
with:
update: function (string or pointer)
data : full data structure
queued: cell array containing information on modified fields
- signature: approximate time of object creation. Used as a reference
to the undoredo object (without requiring to pass on
the full object and its data). Signatureis passed on to
the objects displayfunction). Specify this property if
the content of the workspace is replaced, but no new
call is applied.
Autobackup properties
- backupfile: name of autobackup file (empty string: do not make backups)
Possible values : char str (Current path will be added to
filename)
Default value : '' (no automatic backups)
See also : ur_cleanupdisk
- timeoflastbackup: moment of last backup
Possible values : Matlab datenum
Default value : now()
- backupinterval: time between timed backups (1/1440= 1 minute)
Possible values : Any numeric value>0
Default value : 10/1440 (10 minutes between backups)
Undo/Redo properties
- mode: undo mode
Possible values : 'simple', 'memory', 'cached'
Simple: No undo. Use this option is no
undo is required.
memory: undo info stored in memory. Use
this option if no massive datasets are
needed
cached: undo info cached to disk if
needed. Use this option if
workspace contains many MB
Default value : 'memory'
Undo/Redo properties (continued)): Autocache properties
- cachefile: (applies only if mode=='cached')
Possible values : char str
Default value : 'urcache'
See also : ur_cleanupdisk
Remark : the name of the cache files will be derived from this parameter
- maxbytes : maximum number of bytes stored in memory before saving to disk
Possible values : integers>0
Default value : 64 Mb
Autostore properties
- storehandle: handle of GUI object with which undoredo object is saved
Possible values : a valid handle of a GUI object (for example a figure handle)
Default value : []
See also : mbdstore
- storefield: name of application data field to store undo redo object in
Possible values : char array
Default value : ''
See also : mbdstore
Remark : setting storefield=='userdata' causes undoredo data to be saved as:
set(storehandle,'userdata',obj)
setting storefield~='userdata' causes undoredo data to be saved as:
setappdata(storehandle,storefield,obj)
Other properties
- comitted: commited to disk. This value is set to 0 if contents of undoredo changes
Possible values : 0,1
Default value : 1
See also : iscommited, setcomitted
Remark : if this parameter equals zero, there may be unsaved data
OUTPUT
obj: undoredo object
obj.history: all data that is needed to perform
undo and redo actions on object
obj.data: data contentst of object
EXAMPLE
u=mbdundoobj(struct('field1',1','field2',2),...
'backupfile',C.autosave,...
'backupinterval',C.backupint',...
'displayfunction',@guishow,...
'storehandle',gcf,...
'storefield','undodata');
mbdstore(u); %store data
KNOWN RESTRICTIONS
In most cases undoredo objects can be applied using the same synatax
as normal matlab variables. A few exceptions exist:
STRVCAT
%Observe the following behavior:
U.a=struct('b',{'first','second','third'}) % U.a is a 3 element struct array
str1=strvcat(U.a.b) %str1 is a 3x6 char array
UU=undoredo(U)
str2=strvcat(UU.a.b)%str2 = 'first'
%Work-around:
aa=UU.a %returns "normal" struct array
st3=strvcat(aa.b)%str2 = 'first' %str3 is a 3x6 char array
%Background: If S is a Nx1 struct array, S.b returns N outputs.
Undoredo objects only return 1 output.
<TOOLBOX>\matlabguru\@undoredo\private
27-May-2006 15:57:02
10684 bytes
mbdvalue - evaluate value of undo object for specific transaction number
CALL
obj=mbdvalue(obj,targetstep)
INPUT
obj: undo object
obj.history.cur_transact: currently completed step
targetstep: number of modifications to include
OUTPUT
obj: undoredo object after applying required undo/redo operations
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:24:04
8796 bytes
FUTURE NAME: ur_depend
CALL
upd=mdlt_dependencies(ind,thistree,othertree1,othertree2,...)
INPUT
ind : substruct met te wijzigen velden OF waarde "all"
thistree : tree waarop "ind" betrekking heeft
othertree: wordt alleen gebruik om velden te inventariseren
OUTPUT
upd: een structure waar per scherm optie staat of deze geupdate moeten worden (1) of niet (0)
<TOOLBOX>\matlabguru\undoredocopy
17-Aug-2008 14:02:13
1884 bytes
mdlt_initupd - initialize update fields structure with INIT value
FUTURE NAME: ur_depend_init
%
CALL
upd=mdlt_initupd(agtree,INIT,oldupd)
INPUT
agtree
dependency tree
INIT
Initialize all fields of output structuer with this value.
Defaults to false.
oldupd
if specified. The output argument "upd" is initialized with this
value.
OUTPUT
upd
update structure after initialization
EXAMPLE
case 'install'
HWIN=create_fig; %create GUI objects
tree=GUIstructure; %define dependencies in GUI
agtree=mdlt_mastertree(tree); %aggregate tree (for fast searching)
setappdata(HWIN,'mastertree',agtree) %store result with this window for future use
..
% SOME USER ACTION
% "ind" now indexes in changed data fields
..
agtree=setappdata(HWIN,'mastertree') %retrieve result
upd=mdlt_initupd(agtree,0); %initialize all with 0
upd=mdlt_look4change(upd,agtree,ind); %find out which GUI elements need to be updated
show(upd); %call some function that selectively updates GUI
See also:
mdlt_mastertree: generate aggregate dependency tree
mdlt_initupd: initialize update structure
mdlt_look4change: find out which field must be updated as a result of a
structure update
COPYRIGHT
Nanne van der Zijpp
Modelit
Jan 2002
<TOOLBOX>\matlabguru\undoredocopy
17-Aug-2008 14:01:49
2114 bytes
mdlt_look4change: find out which field must be updated as a result of a
structure update
FUTURE NAME: ur_depend_apply
CALL
upd=mdlt_look4change(upd,ind,agtree)
INPUT
upd: previous update structure
ind: subs array into struct
agtree: tree containing list of screen attributes to be updated
CODE EXAMPLE
case 'install'
HWIN=create_fig; %create GUI objects
tree=GUIstructure; %define dependencies in GUI
agtree=mdlt_mastertree(tree); %aggregate tree (for fast searching)
setappdata(HWIN,'mastertree',agtree) %store result with this window for future use
..
% SOME USER ACTION
% "ind" now indexes in changed data fields
..
agtree=setappdata(HWIN,'mastertree') %retrieve result
upd=mdlt_initupd(agtree,0); %initialize all with 0
upd=mdlt_look4change(upd,agtree,ind); %find out which GUI elements need to be updated
show(upd); %call some function that selectively updates GUI
SEE ALSO
mdlt_mastertree: generate aggregate dependency tree
mdlt_initupd: initialize update structure
mdlt_look4change: find out which field must be updated as a result of a
structure update
REVISIONS
JUNE 2005: major redesign. This may affect details of the
functionality. The field updobjAggreg is introduced. This field
contains the content of updobj of the child nodes EXCLUDING current
node (downward aggregation).
updobj contains the content of updobj of this node and its parents
(upward aggregation)
<TOOLBOX>\matlabguru\undoredocopy
17-Aug-2008 13:58:16
3481 bytes
mdlt_mastertree - aggregate "updobj" over structure
FUTURE NAME: ur_depend_set
CALL
tree=mdlt_mastertree(tree)
INPUT
tree: dependency tree that defines which object need to be updated if field changes
OUTPUT
tree: dependency tree that defines which object need to be updated if field changes
the field updob has now been updated
NOTE:
atributes need not be defined at the lowest level, attributes passed on at a higher
level will be superimposed with the lower level attributes
CODE EXAMPLE
case 'install'
HWIN=create_fig; %create GUI objects
tree=GUIstructure; %define dependencies in GUI
agtree=mdlt_mastertree(tree); %aggregate tree (for fast searching)
setappdata(HWIN,'mastertree',agtree) %store result with this window for future use
..
% SOME USER ACTION
% "ind" now indexes in changed data fields
..
agtree=setappdata(HWIN,'mastertree') %retrieve result
upd=mdlt_initupd(agtree,0); %initialize all with 0
upd=mdlt_look4change(upd,agtree,ind); %find out which GUI elements need to be updated
show(upd); %call some function that selectively updates GUI
SEE ALSO
setdepend: part of undoredo toolbox
evaldepend: part of undoredo toolbox
mdlt_mastertree: generate aggregate dependency tree
mdlt_initupd: initialize update structure
mdlt_look4change: find out which field must be updated as a result of a
structure update
REVISIONS
JUNE 2005: major redesign. This may affect details of the
functionality. The field updobjAggreg is introduced. This field
contains the content of updobj of the child nodes EXCLUDING current
node (downward aggergation).
updobj contains the content of updobj of this node and its parents
(upward aggregation)
<TOOLBOX>\matlabguru\undoredocopy
17-Aug-2008 13:57:44
4705 bytes
meetreekscontrole -
CALL:
StatusW = meetreekscontrole(db, C)
INPUT:
C: <struct> met de Melissa constantes, relevant veld: OUTLIER
db: <undoredo object> met de centrale Melissa database
fname: <string> (optioneel) met stuurfile
OUTPUT:
db: <undoredo object> met de centrale Melissa database met de
statuscodes van de dias aangepast
S: <char array> met commentaar
See also: mrc, mrc_spike, mrc_stagger
<APPLICROOT>\melissa2006\MRC
15-Oct-2007 21:28:50
3809 bytes
mel_cmb_clear - verwijder de reeksencombinatie instellingen in de melissa
database
CALL:
mel_cmb_clear
INPUT:
geen invoer
OUTPUT:
geen directe uitvoer, de reeksencombinaties in de centrale melissa
database zijn verwijderd
See also: mel_cmb_save, mel_cmb_load
<APPLICROOT>\melissa2006\FUNCTIES
16-Dec-2006 11:37:04
723 bytes
mel_cmb - CALL: mel_cmb_load(fname) INPUT: fname: <string> OUTPUT: See also: mel_cmb_save, mel_cmb_clear
<APPLICROOT>\melissa2006\FUNCTIES
17-Dec-2006 15:03:52
3364 bytes
mel_cmb_save - schrijf de huidige reeksenlijst combinaties weg naar een
bestand
CALL:
mel_cmb_save(fname)
INPUT:
fname: <string>
OUTPUT:
geen directe uitvoer, de huidige reeksen combinatielijst is geexporteerd
naar een bestand
See also: mel_cmb_load, mel_cmb_clear
<APPLICROOT>\melissa2006\FUNCTIES
16-Dec-2006 11:35:16
1746 bytes
mel_cns - callback van menu 'Laad consistentiecriteria'
CALL:
mel_cns(fname)
INPUT:
fname: <string> naam van stuurfile
OUTPUT:
geen directe uitvoer, database en logbook worden aangepast
APPROACH:
Instellen consistentiecriteria
Kan zowel interactief als in batch optie worden aangeroepen
als fname gegeven is, geldt batch mode, anders wordt gebruiker
om filenaam gevraagd en kan de stuurfile geedit/gesaved/geladen worden.
Als geldige naam wordt opgegeven wordt voor ieder station voor de
variabele WATHTE in datebase een object van het type 'cnsread'
aangemaakt. Voor dit object zijn de volgende methodes gedefinieerd
> < - +
Deze symbolen worden door gebruiker gebruikt om consistentie
criteria in te stellen
Nu worden de regels uit de file gelezen en een voor een uitgevoerd
als er een fout optreedt wordt een foutmelding naar het scherm geprint.
Deze bevat
A: regelnummer van de fout
B: de foutieve instructie
de regel wordt verder genegeerd
De invoer van de gebruiker wordt vertaald naar ADD2LIST statements.
nadat het inlezen gereed is, wordt de variabele cnscriteria
in de database geupdated. Vervolgens wordt de outlierstatus herberekend.
Tot slot worden de consistentie criteria in alfanumeriek formaat in het
logboek opgenomen.
See also: stuurfile, cnsread
<APPLICROOT>\melissa2006\FUNCTIES
15-Mar-2007 12:27:30
3827 bytes
mel_val - callback van menu 'Laad validatiecriteria' CALL: mel_val(fname) INPUT: fname: <string> naam van stuurfile OUTPUT: geen, de centrale database wordt geactualiseerd APPROACH: Laad validatie criteria om outlier te bepalen. opbouw geldige invoer file STATNAME W1 W2 W1 : standaard afwijking factor (<= 0 betekent negeren) W2 : standaard afwijking constante (<= 0 betekent negeren) Nadat de validatiecriteria zijn geladen wordt de functie COMPUTESTATOUT aangeroepen om outlierstatus te (her) berekenen.
<APPLICROOT>\melissa2006\FUNCTIES
15-Oct-2007 15:20:28
3568 bytes
mel_vlg_clear - verwijder de reeksenvolgorde instellingen in de melissa
database
CALL:
mel_vlg_clear
INPUT:
geen invoer
OUTPUT:
geen directe uitvoer, de reeksenvolgorde in de centrale melissa database
is verwijderd
See also: mel_vlg_save, mel_vlg_load
<APPLICROOT>\melissa2006\FUNCTIES
16-Dec-2006 11:36:52
707 bytes
mel_vlg_load - importeer een melissa reeksenvolgorde .vlg bestand CALL: mel_vlg_load(fname) INPUT: fname: <string> van het bestand met de reeksenvolgorde (.vlg) OUTPUT: geen directe uitvoer, de reeksenvolgorde in de centrale melissa database is aangepast See also: mel_vlg_save, mel_vlg_clear
<APPLICROOT>\melissa2006\FUNCTIES
16-Dec-2006 11:47:22
2465 bytes
mel_vlg_save - save de huidige reeksen volgorde naar een melissa
reeksenvolgorde (.vlg) bestand
CALL:
mel_vlg_save(fname)
INPUT:
fname: <string> naam van het melissa reeksenvolgorde bestand (.vlg)
OUTPUT:
geen directe uitvoer, een nieuw bestand is gecreeerd
See also: mel_vlg_load
<APPLICROOT>\melissa2006\FUNCTIES
16-Dec-2006 11:35:26
1376 bytes
melissa - start melissa op of voer macro opdracht uit
CALL:
out = melissa(varargin)
INPUT:
varargin: lijst paren met 'menunaam', variabele
Als geen argumenten meegegeven: ==> Roep melissa aan
Anders: ==> voer menuoptie uit
OUTPUT:
out: uitvoer variabele (in geval van exporteren data)
See also: get_db_melissa, get_opt_melissa
<APPLICROOT>\Melissa2006
29-Jul-2008 16:25:47
77608 bytes
melissashowdata - Visualisatie van ALLE data in Melissa
CALL:
melissashow(signature,udnew,ind)
INPUT:
signature: <
udnew: < structure met data uit werkgebied
ind: een CELL array met
struct arrays met velden
'type'
'subs'
OUTPUT:
geen directe uitvoer, alle objecten die gerelateerd zijn aan data in het
werkgebied worden geactualiseerd.
<APPLICROOT>\melissa2006\HULPFUNCTIES
08-Feb-2007 13:42:56
1882 bytes
melissashowopts - Visualisatie van ALLE opties in Melissa
CALL:
melissashowopts(signature,optcontainer,ind)
INPUT:
signature:
opt: <struct> met settings
ind: <cell array> met struct arrays met velden:
'type'
'subs'
OUTPUT:
geen directe uitvoer, alle objecten die gerelateerd zijn aan settings
worden geactualiseerd.
<APPLICROOT>\melissa2006\HULPFUNCTIES
07-Mar-2007 11:24:00
1683 bytes
melissaview -
CALL:
melissaview(udnew,opt,upd,HWIN)
INPUT:
udnew: <struct> met Melissa WGB data
opt: <struct> met de settings database
upd: <struct> met 0(niet updaten) en 1(wel updaten) voor alle scherm
elementen
OUTPUT:
geen directe uitvoer
See also: melissa, melissashowopts, melissashowdata
<APPLICROOT>\melissa2006\HULPFUNCTIES
03-Mar-2008 09:57:26
25012 bytes
menus - display een lijstje met geldige menus op
het scherm
CALL:
varargout = menus
INPUT:
label: <string> naam van het batchmenu
OUTPUT:
een lijstje met geldige menus, als nargin == 0 wordt uitvoer op scherm
geprint, als nargin == 1 dan wordt de corresponderende menuhandle
teruggegeven
APPROACH:
Gebruik de utility LISTMENUS om menus op te halen en selecteer alleen
die menus met appdata batchlabel
<APPLICROOT>\melissa2006\HULPFUNCTIES
15-Oct-2007 11:31:32
957 bytes
mexprint - mex version of print
USE
shield print command from mcc -x -h command
1. compile mexprint.m mcc -x mexprint (produces mexprint.dll)
2. replace print with mexprint in all m files
3. compile application with mcc -x -h application mexprint.dll
<TOOLBOX>
03-Jul-2003 11:50:20
339 bytes
mlrti - Interface voor aanroepen MLRTI berekening CALL: mlrti INPUT: geen invoer, data wordt opgehaald uit de melissa database OUTPUT: geen, de centrale melissa database is aangepast met schattingen APPROACH: Er wordt een controle uitgevoerd of validatie criteria zijn ingesteld. Zo niet dan kan de gebruiker dit alsnog doen. Er wordt een controle uitgevoerd of consistentie criteria zijn ingesteld. Zo niet dan kan de gebruiker dit alsnog doen. Bij iedere berekening wordt een printbestand aangemaakt Tijdens de berekening wordt de melissa interface gedeactiveerd See also: modelbeheer
<APPLICROOT>\melissa2006\FUNCTIES
10-Oct-2007 20:59:48
8746 bytes
mls_agger - User interface voor de bepaling van hoog en laag water en
eventuele aggers
CALL:
mls_agger(tablefilename, targetfilename)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
De berekende NE-reeks wordt in de centrale Melissa database opgelagen
samen met eventueel gegenereerd commentaar, in batch modus wordt het
commentaar naar de gespecificeerde file weggeschreven.
APPROACH:
Uit een ASCII input file wordt de stuurparameters gelezen.
Deze worden tijdelijk opgeslagen in verschillende arrays.
De berekening wordt voor ieder station apart uitgevoerd.
Voor alle stations met code 'berekenen == 1' wordt functie f_hooglaag
aangeroepen. Als de berekening succesvol is verlopen worden alle
gegevens in 1 keer naar het werkgebied weggeschreven.
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:39:24
5204 bytes
mls_eqfit - User interface voor het fitten van een equidistante reeks op
een niet-equidistante reeks
CALL:
mls_eqfit
INPUT:
geen invoer
OUTPUT:
De berekende NE-reeks wordt in de centrale Melissa database opgelagen
samen met eventueel gegenereerd commentaar, in batch modus wordt het
commentaar naar de gespecificeerde file weggeschreven.
APPROACH:
De berekening wordt voor ieder station apart uitgevoerd.
voor alle stations met code berekenen==1 wordt functie f_eqfit
aangeroepen. Als de berekening succesvol is verlopen worden alle
gegevens in 1 keer naar het werkgebied weggeschreven.
<APPLICROOT>\melissa2006\FUNCTIES
12-Feb-2007 17:00:26
3110 bytes
mls_expgdps(fname) - User interface voor exporteren GDPS
CALL:
mls_expgdps(fname)
INPUT:
fname: <string> kan een waarde hebben als functie in batch mode wordt
aangeroepen
index: <integer> index in centrale database van de te exporteren gpds
OUTPUT:
Er wordt een mat file met naam fname weggeschreven
APPROACH:
Bewaar de getijdataparameterset voor de stations waarvoor deze berekend
is
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:11:08
1865 bytes
mls_havenget - User interface voor de bepaling van havengetallen
CALL:
mls_havenget(tablefilename, targetfilename)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
De property 'userdata' wordt aangepast: er wordt een NE-reeks naar toe geschreven
APPROACH:
Uit een ascii input file wordt de stuurparameters gelezen
Deze worden tijdelijk opgeslagen in verschillende arrays
Tijdens de berekening wordt de melissa interface gedeactiveerd
Voor alle stations met code 'berekenen==aan wordt functie f_havenget aangeroepen
de uitvoer van deze functie wordt tijdelijk opgeslagen in structure array 'data'
Als de berekening succesvol is verlopen, wordt het structure array doorgegeven aan
een zelfstandige GUI: AARDAPPELS. In deze GUI kan dan de aardappelgrafiek
worden bekeken. Er worden geen gegevens naar het werkgebied weggeschreven.
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:19:18
5305 bytes
mls_hooglaag - User interface voor de bepaling van hoog en laag water
CALL:
mls_hooglaag(fname)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
De berekende NE-reeks wordt in de centrale Melissa database opgelagen
samen met eventueel gegenereerd commentaar, in batch modus wordt het
commentaar naar de gespecificeerde file weggeschreven.
APPROACH:
Uit een ASCII input file wordt de stuurparameters gelezen.
Deze worden tijdelijk opgeslagen in verschillende arrays.
De berekening wordt voor ieder station apart uitgevoerd.
Voor alle stations met code 'berekenen == 1' wordt functie f_hooglaag
aangeroepen. Als de berekening succesvol is verlopen worden alle
gegevens in 1 keer naar het werkgebied weggeschreven.
<APPLICROOT>\melissa2006\FUNCTIES
16-Oct-2007 10:49:40
5163 bytes
mls_laaglaag - User interface voor de bepaling van laag laagwaterspring
CALL:
mls_laaglaag(fname)
INPUT:
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
geen, database en logboek worden bijgewerkt
APPROACH:
voor alle stations met code 'berekenen==aan wordt functie f_laaglaag
aangeroepen, deze routine voert met behulp van de getijparameterdataset
de berekening uit
<APPLICROOT>\melissa2006\FUNCTIES
11-Feb-2007 20:52:32
2528 bytes
mls_ongelijkheid - User interface voor de bepaling van de dagelijkse
ongelijkheid
CALL:
mls_ongelijkheid(fname)
INPUT:
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
Er wordt alleen gegevens naar een overzicht weggeschreven
APPROACH:
Voor alle stations met code berekenen==1 wordt functie
f_ongelijkheid aangeroepen
<APPLICROOT>\melissa2006\FUNCTIES
14-Feb-2007 22:57:24
2841 bytes
mls_tussenschr - User interface voor de bepaling van de tussenschrijding
CALL:
mls_tussenschr(tablefilename, targetfilename)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
geen
APPROACH:
Eerst worden de stuurparameters uit een invoerfile gelezen.
Voor alle stations met code berekenen == true wordt functie f_tussenschr
aangeroepen.
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:39:10
4648 bytes
mls_vliegplan - User interface voor de bepaling van het vliegplan
CALL:
mls_vliegplan(tablefilename, targetfilename)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
Er wordt alleen uitvoer naar een overzicht geschreven.
APPROACH:
Eerst worden de stuurparameters uit een invoerfile gelezen.
Voor alle stations met code 'berekenen==aan wordt functie f_vliegplan
aangeroepen.
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:30:48
4876 bytes
mls_zuiver - User interface voor het zuiveren van aggers
CALL:
mls_zuiver(fname)
INPUT:
tablefilename: <string> kan een waarde hebben als functie in batch mode
wordt aangeroepen
targetfilename: <string> wordt gebruikt om het overzicht naar toe te
schrijven
OUTPUT:
De berekende NE-reeks wordt in de centrale Melissa database opgelagen
samen met eventueel gegenereerd commentaar, in batch modus wordt het
commentaar naar de gespecificeerde file weggeschreven.
APPROACH:
De berekening wordt voor ieder station apart uitgevoerd.
voor alle stations met code berekenen==1 wordt functie f_zuiver
aangeroepen. Als de berekening succesvol is verlopen worden alle
gegevens in 1 keer naar het werkgebied weggeschreven.
<APPLICROOT>\melissa2006\FUNCTIES
17-Oct-2007 10:39:40
4240 bytes
modelbeheer - installeer de modelbeheer GUI voor het importeren,
schatten en exporteren van schattings modellen
CALL:
modelbeheer(obj, event)
INPUT:
obj: <handle> van de 'calling' uicontrol, (wordt niet gebruikt)
event: <leeg> standaard argument van een callback (wordt niet gebruikt)
OUTPUT:
geen directe uitvoer, het modelbeheer scherm wordt geopend
METHODE:
Deze functie kijkt of het modelbeheer scherm al is geinstalleerd en
maakt het in dat geval current.
Zo niet, dan wordt het modelbeheer scherm geinitialiseerd.
Deze functie module bevat alle define- functies waarmee het scherm
wordt opgebouwd, en de meeste van de callback functies die vanuit het
scherm kunnen worden aangeroepen.
See also: modelbeheerview
<APPLICROOT>\melissa2006\MODELBEHEER
08-Mar-2008 10:09:52
20905 bytes
modelbeheer_instellingen - gui voor het specificeren van de locatie van
het culminatie en metainfo bestand
CALL:
opt = modelbeheer_instellingen(C, opt)
INPUT:
C: <struct> met de melissa constantes
opt: <struct> met de settings, de velden corresponderen met de settings
in modelbeheer:
- coefmsw
OUTPUT:
opt: <struct> met de nieuwe instellingen voor modelbeheer
See also: getijbeheer
<APPLICROOT>\melissa2006\MODELBEHEER
29-Mar-2007 17:14:54
7164 bytes
modelbeheer_msg - functie om alle foutmeldingen van modelbeheer af te
handelen
CALL:
modelbeheer_msg(actie)
INPUT:
actie: <string> met omschrijving van de fout, zie code voor details.
OUTPUT:
<geen>
<APPLICROOT>\melissa2006\MODELBEHEER
02-Apr-2007 12:43:08
514 bytes
modelbeheerview - view functie voor het modelbeheer scherm CALL: modelbeheerview(udnew,opt,upd,C,HWIN) INPUT: udnew: <struct> de centrale database opt: <struct> GUI settings voor netwerkbeheer upd: <struct> de te updaten scherm elementen C: <struct> de melissa constantes HWIN: <handle> van het modelbeheer scherm OUTPUT: geen directe output, het modelbeheer scherm is geupdate See also: modelbeheer
<APPLICROOT>\melissa2006\MODELBEHEER
03-Mar-2008 10:00:14
2792 bytes
modelitIcon - install Modelit icon on current window
CALL
modelitIcon(obj,event)
INPUT
obj,event: bot used
OUTPUT
none (icon of current window will be changed)
SEE ALSO
icon2png
seticon
EXAMPLE
set(0,'DefaultFigureCreateFcn',@modelitIcon);
<TOOLBOX>
16-Aug-2008 09:56:32
583 bytes
MONITORMATLAB Displays runtime diagnostic information This task manager like tool displays real time memory state of MATLAB, HG, and Java using time based strip charts. The following information is displayed: * Memory allocated by MATLAB * Memory allocated by Java * Memory allocted by the O/S * Number of HG objects in memory * Number of MFiles in MATLAB memory * Size of m-file parsing stack To see real time MATLAB memory allocation, start MATLAB with the O/S environment flag "MATLAB_MEM_MGR" set to a "debug" as in: set MATLAB_MEM_MGR = debug. Example: monitormatlab bench NOTE: this is u utility obtained from a thisrd party. It is used as-is, primarily as a commandline tool.
<TOOLBOX>
16-Aug-2008 12:07:46
30083 bytes
movegui_align - similar to MOVEGUI but position figure relative to other
figure instead of position on screen. Treat other window as
scree area
CALL
movegui_align(fig,hrelfig,position)
INPUT
fig: Handle of figure that is to be moved
hrelfig: Position relative to this object. Possible values
Figure handle
"pointer" position relative to pointer
position: way of positioning
The POSITION argument can be any one of the strings:
'north' - top center edge of screen
'south' - bottom center edge of screen
'east' - right center edge of screen
'west' - left center edge of screen
'northeast' - top right corner of screen
'northwest' - top left corner of screen
'southeast' - bottom right corner of screen
'southwest' - bottom left corner of screen
'center' - center of screen
'onscreen' - nearest onscreen location to current position.
'pointer' - nearest onscreen location to current position.
EXAMPLE:
movegui_align(gcf,'pointer','northwest'),movegui(gcf,'onscreen');
See also: movegui
<TOOLBOX>
16-Aug-2008 10:07:18
4580 bytes
movingaverage - calculate moving average, ignoring NaN's
CALL:
Y = movingaverage(X,windowsize)
INPUT:
X: <vector of double> data to be averaged
window: <integer> length == 2
element 1: number of historic observations
element 2: number of future observations
OUTPUT:
Y: <vector of double> with averaged data
See also: nanmean
<TOOLBOX>
05-Jan-2007 14:33:08
768 bytes
mrc - Start meetreekscontrole CALL: mrc(fname) INPUT: fname: <string> (optioneel) met stuurfile OUTPUT: geen uitvoer, de Melissa database wordt aangepast
<APPLICROOT>\melissa2006\MRC
15-Oct-2007 21:29:58
637 bytes
mrc_spike - Zoek spikes in meetreeks
CALL:
[StatusW, AANTAL] = MRC_SPIKE(W, StatusW, PS)
INPUT:
C: <struct> met de Melissa constantes, relevant veld: OUTLIER
W: <vector of double> met gemeten waarden
StatusW: <vector of uint8> met Status van de gemeten waarden
ps: <integer> instelling voor detectie: aantal centimeter
OUTPUT:
StatusW: <vector of double> aangepaste vector met Status van de gemeten
waarden spikes worden behandeld als OUTLIER
aantal: <integer> het aantal gevonden spikes
See also: mrc, meetreekscontrole, melissa
<APPLICROOT>\melissa2006\MRC
14-Feb-2007 21:56:16
854 bytes
mrc_stagger - bepaal de staggers in een tijdreeks
CALL:
[StatusW, aantal] = MRC_STAGGER(W, StatusW, ps)
INPUT:
C: <struct> met de Melissa constantes, relevant veld: OUTLIER
W: <vector of double> met gemeten waarden
StatusW: <vector of uint8> met Status van de gemeten waarden
ps: <vector of integer> met parameterinstellingen
OUTPUT:
StatusW: <vector of double> aangepaste vector met Status van de gemeten
waarden, staggers worden daarbij behandeld
als OUTLIER
aantal: <integer> het aantal gevonden staggers
See also: mrc, meetreekscontrole, melissa
<APPLICROOT>\melissa2006\MRC
14-Feb-2007 21:57:06
2181 bytes
msg_temp - display message that goes away after a few second INPUT/OUTPUT: see warndlg
<TOOLBOX>
15-Aug-2008 16:36:33
1147 bytes
multiwaitbar - plot one or more waitbars in a unique figure
CALL:
HWIN = multiwaitbar(bartag,x,wbtext,varargin)
HWIN = multiwaitbar(bartag,x,wbtext,'stopb','abort',varargin)
HWIN = multiwaitbar(bartag,x,wbtext,'suspb','abort',varargin)
HWIN = multiwaitbar(bartag,x)
HWIN = multiwaitbar(bartag,-1)
INPUT:
bartag: <string> signature of waitbar
x: <double> progress (in % ==> range = 0-100)
Note: set x to NaN for indefinite waitbar
wbtext: <string> text above waitbar
Note: the space reserve for this text is determined
at startup of waitbar
varargin: <varargin{:}> properties to be passed on to the "figure" command (has no
effect when figure already exists)
SPECIAL KEYWORDS:
- " 'stepsize',5" changes default stepsize to 5. Aall
calls will be ignored, unless
rem(x,5)==0.
- " 'stopb','abort' " adds a stopbutton with text 'abort'
- " 'suspb','abort' " adds a suspend button with text
'abort' this works together with
function "stopwaitbar"
NOTE: the arguments passed in "varargin" are only used when
the waitbar is created. In other words: these arguments vcan
not be used to change an existing waitbar figure.
OUTPUT:
HWIN: <handle> of the figure with the waitbar(s)
EXAMPLE:
for k=1:10
hwait=multiwaitbar('loop1',10*k,sprintf('k=%d',k));
for r=1:5:100
if stopwaitbar(hwait),return;end
multiwaitbar('loop2',r,sprintf('r=%d',r));
pause(0.01)
end
end
multiwaitbar('loop1',-1);
multiwaitbar('loop2',-1);
See also
stopwaitbar
<TOOLBOX>
02-Apr-2008 13:12:31
12730 bytes
nanmean - Mean value, ignoring NaNs.
CALL
m = nanmean(x)
m = nanmean(x,dim)
INPUT
x : data matrix
dim: work along this dimension (defaulst to 1)
OUTPUT
m: the sample mean of x, treating NaNs as missing values.
NOTE
nanmean is also defined in one of the Matlab toolboxes
<TOOLBOX>
16-Aug-2008 10:02:55
913 bytes
newcolumn - start new coulum in help menu
CALL
obj=newcolumn(obj)
INPUT
obj: object of class helpmenuobj
OUTPUT
obj: object of class helpmenuobj after updates
<TOOLBOX>\@helpmenuobj
17-Aug-2008 12:47:41
359 bytes
nldate - maak datum string dd/mm/yy hh/mm (14ch), afronding op minuten
CALL:
str = nldate(T,opt)
INPUT:
T: <vector of double> elements in datenum format
opt: <integer> option (optional)
0: (default) maak datum string dd/mm/yy hh:mm (14ch),
afronding op minuten
15: hh:mm (5ch), afronding op minuten
bijv: 16:45:35 ==> 16:46
OUTPUT:
str: <string> datum string eventueel afgerond op minuten
See also: dispperiode, datestr, datenum
<APPLICROOT>\melissa2006\HULPFUNCTIES
10-Jan-2007 17:09:12
1224 bytes
noNodes - get the total number of nodes present in the DOM-representation
of the xml document
CALL:
N = noNodes(obj)
INPUT:
obj: <xml-object>
OUTPUT:
N: <integer> with the total number of nodes in the DOM object
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
noNodes(obj)
See also: xml, xml/getRoot
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:14:12
585 bytes
node2treepath - CALL: treepath = node2treepath(node) INPUT: node: OUTPUT: treepath
<TOOLBOX>\jacontrol
24-Oct-2005 20:33:30
553 bytes
Enumerate fields for jacontrol object
<TOOLBOX>\jacontrol\@jacontrol\private
11-Jan-2008 12:56:26
269 bytes
offon - replace 0 with 'off' and 1 with 'on'
CALL
val = offon(val)
INPUT
val: 0,1 or character string
OUTPUT
val: 'off' or 'on'
<TOOLBOX>
16-Aug-2008 14:00:11
290 bytes
lm_parentframe - find out to which frame the object with handle h is linked CALL hframe = lm_parentframe(h) INPUT: h: object handle OUTPUT: hframe: handle of frame to which h is linked See also: lm_isparent
<TOOLBOX>\MBDresizedir
11-Aug-2008 22:25:54
2398 bytes
parseTC - Utility om een aantal sleutels op te delen in 1 sleutel per
tshift zodat ze gebruikt kunnen worden voor de
regressiemodellen
CALL:
S = parseTC(TC)
INPUT:
TC: <struct array> met sleutels, zie emptystruct('TC')
velden: - sLoccod: <string>
- sParcod: <string>
- tShift: <integer> lengte 1 of meer
- coef: <integer> leeg of zelfde lengte als tShift
OUTPUT:
S: <struct array> aantal inputs (1 per tijdstip) lang met sleutels
velden: - sLoccod: <string>
- sParcod: <string>
- tShift: <integer> lengte 1
- coef: <integer> leeg of lengte 1
See also: emptystruct
<APPLICROOT>\melissa2006\HULPFUNCTIES
21-Mar-2007 22:13:04
1352 bytes
pathcomplete - extend filename with path
CALL
pnamefname=pathcomplete(CurrentPath,fname)
IMPUT
fname : filename (possibly includes path)
OUTPUT
CurrentPath
pnamefname
<TOOLBOX>
28-Apr-2003 14:21:09
427 bytes
pcolorBar - plot vector as a collection of colored boxes
CALL:
h = pcolorPlot(X, Y, varargin)
INPUT:
X: vector met xdata
Y: matrix met data to plot against xdata
varargin: <parameter-value pairs)
'xax' - <vector> indicating edges of boxes, length is
size(data,2) + 1
'yticks' - <cellstring> specifies the yticks, length is
size(data,1);
OUTPUT:
h: <matrix> with patchhandles
See also: pcolor
<TOOLBOX>
22-Nov-2007 04:13:12
1858 bytes
pcolorPlot - plot matrix as a collection of colored boxes
CALL:
pcolorPlot(X, Y, varargin)
INPUT:
X: vector met xdata
Y: matrix met data to plot against xdata
varargin: <parameter-value pairs)
'xax' - <vector> indicating edges of boxes, length is
size(data,2) + 1
'yticks' - <cellstring> specifies the yticks, length is
size(data,1);
OUTPUT:
geen uitvoer
See also: pcolor, pcolorBar
<TOOLBOX>
27-Mar-2008 11:09:32
2164 bytes
pix2norm - convert pixel to normalized coordinates
SUMMARY
This function may be used to annotade objects that arre plotted in an
axes.
CALL
[X,Y]=pix2norm(x,y,shiftx,shifty)
INPUT
x,y:
normalized coordinates (scalar or vector)
shiftx, shifty:
shifts in pixels (scalar or vector)
OUTPUT
X,Y:
normalized coordinates as in input, shifted with shiftx and
shifty pixels
EXAMPLE
[X,Y]=pix2norm(1,1,[0 20 20 0],[0 0 5 5]);patch(X,Y,'r')
<TOOLBOX>
15-Aug-2008 12:44:06
1104 bytes
plot_geo - plot topografie en kaartbladen
CALL
plot_geo(h_kaart,kaartblad,setlabels,coord,mode)
INPUT
h_kaart <axes handle>:
handles of axes objects that will hold plotted objects
defaults to gca
kaartblad <logical>:
if True, plot "kaartblad" layer
defaults to True
setlabels <logical>
if True add labels that will appear in legend
defaults to True
coord <string>
coordinate system of axes "h_kaart". If anaything else then RD,
coordinates will be transformed.
defaults to 'RD'
mode <string>
if mode=="noordzee" additional stylistic info is plotted
mode defaults to nederland"
INDIREC INPUT
File: 'Kaartbladen.w3h'
OUTPUT
This function returns no output arguments
<TOOLBOX>
16-Aug-2008 10:37:07
4780 bytes
points2pixels - short hand for converting points to pixels
CALL
pixels = points2pixels(points)
INPUT
points: <double>
position in points
OUTPUT
points: <double>
position in pixels
<TOOLBOX>
16-Aug-2008 12:15:59
420 bytes
postcode2pos - return WGS position from Dutch Zip code
CALL
[pos,adress,msg]=postcode2pos(PC)
INPUT
PC : 4 digit or 6 digit dutch Zip code
OUTPUT
pos : [Longitude, Latitude] !!! note that Longitude comes first !!
adress : PC, City (State) Country
msg : error message if applicable (empty==> no error)
EXAMPLE
Verification:
Rotterdam is a city in Zuid-Holland at latitude 51.923, longitude 4.478.
postcode2pos('3042as')==> pos= [4.4294 51.9344]
<TOOLBOX>
16-Aug-2008 19:05:01
8228 bytes
print2file - start GUI for exporting graph
CALL
HWIN=print2file
HWIN=print2file(hfig)
HWIN=print2file(obj,event,hfig,varargin)
INPUT
obj,event:
arguments passed when called as callback
hfig:
figure for which to create plot
varargin:
property value pairs. Accepted property names:
PROPERTY DEFAULT
language 'dutch';
constants [];
visible true;
OUTPUT
HWIN: handle of GUI figure
EXAMPLE
uimenu(hFile,'lab','Print figure','callb',@print2file);
See also:
print2file_Execute: perform print action and close screen
<TOOLBOX>
16-Aug-2008 15:21:00
22562 bytes
pshape - provide cursor for used in zoomtool
CALL
shape=pshape
INPUT
1 input argument allowed, no input arguments used
OUTPUT
pshape
16*16 array that can be used as cursor
EXAMPLE
set(gcf,'pointershapecdata',pshape);
See also: zoomtool
<TOOLBOX>
15-Aug-2008 11:19:04
1592 bytes
putfile - selecteer file met specifieke extensie voor schrijven
CALL
[fname,pname]=putfile(ext,showstr,BATCHMODE,fname,N)
INPUT
ext : extensie die te selecteren file moet hebben
(defaultwaarde: '.m')
showstr : Text string die gebruiker te zien krijgt
(defaultwaarde: '')
BATCHMODE : zet deze op 1 voor onderdrukken interactie
(defaultwaarde: 0)
fname : default filenaam
(defaultwaarde: *.ext)
N : default categorie file t.b.v. bewaren default directory
(defaultwaarde: 1)
OUTPUT
fname : de geselecteerde filenaam, of 0
LET OP!: fname==0 en niet fname='' staat voor cancel!!
pname : het bijbehorende pad
USER INPUT
gebruiker selecteert filenaam
EXAMPLE
[fname,pname]=putfile('txt','Save ASCII file',0,'MyFile',C.DEFAULTDIR.TXTFILE);
if ~fname
return
end
fname=[pname fname];
..
See also: UIPUTFILE PUTFILE
<TOOLBOX>
16-Aug-2008 14:12:45
3245 bytes
select range than execute Commanstr
CALL
rbline('hor')
rbline(1,CommandStr)
INPUT
arg1: mode of operation
CommandStr: cell array:
{FuncPonter, arg1,arg2,...}
OUTPUT
no direct output: Function Commandstr is called with srange(1) and xrange(2)
<TOOLBOX>
15-Aug-2008 15:39:23
3323 bytes
readComments - similar to help but returns a cell array with help CALL: C = readComments(filename) INPUT: filename: <string> OUTPUT: C: <cell array> See also: help
<TOOLBOX>
27-Sep-2006 21:32:14
879 bytes
readasciimodel - lees netwerken in ascii formaat in
CALL:
[networkArray,db] = readasciimodel(filename,db)
INPUT:
filename: <string> met het in te lezen bestand
db: <undoredo object> de centrale database, alleen voor
bijwerken logboek gebruikt. Mag []
zijn als functie voor preview doelen
wordt gebruikt.
OUTPUT:
modelArray: <array of struct> met netwerken
Opmerking: wanneer aanroep niet
succesvol is wordt een leeg
[0x1] structure array gererourneerd.
In de aanroepende routine kan dus evt.
getest worden of isempty(networkArray)
db: <undoredo object> de bijgewerkte centrale database.
METHODE:
- lees de file in en verwijder commentaar (% regels)
- bepaal de indices van de blokken (sjabloon en netwerk)
- lees de sjablonen in en construeer tmpnetworkStruct
voor elk sjabloon met daarin de opgegeven velden
- lees de netwerken in en construeer voor elk netwerk
een tmpnetworkStruct met daarin de gedefinieerde
velden
- combineer de tmpnetworkStruct van de sjablonen met de
tmpnetworkStruct van de netwerken tot een
netwerkstruct
<APPLICROOT>\melissa2006\MODELBEHEER
09-Oct-2007 10:36:06
7181 bytes
readcell - lees character array weg van file
CALL:
strs = readcell(fname, n)
INPUT:
fname: in te lezen file
n: aantal te lezen regels
OUTPUT:
str:
See also: writestr, readstr
<TOOLBOX>
27-Mar-2008 14:10:26
549 bytes
readdia_R14 - Read a DIA file to a Matlab structure.
CALL:
data = readdia_R14(fname)
INPUT:
fname:
String with the name of the DIA file to be read.
OUTPUT:
data:
Dia Structure (empty on error), with fields:
+----IDT
| +----sFiltyp (char)
| +----sSyscod (char)
| +----lCredat (double)
| +----sCmtrgl (char)
+----blok
+----W3H (struct): see emptyW3H
+----MUX (struct): empty, see emptyMUX
+----TYP (struct): empty
+----RGH (struct): empty, see emptyRGH
+----RKS (struct): see emptyRKS
+----TPS (struct): empty, see emptyTPS
+----WRD (struct): see emptyWRD
See also: writedia_R14
<TOOLBOX>\diaroutines
18-Aug-2008 12:10:58
1394 bytes
<TOOLBOX>\diaroutines
14-Aug-2008 10:06:50
118784 bytes
readstr - lees character array weg van file
CALL:
readstr(fname, n, decomment)
INPUT:
fname: in te lezen file
n: aantal te lezen regels
decomment: if true do not return commented lines
OUTPUT:
str: string met bestandsinhoud
See also: writestr, readcell
<TOOLBOX>
24-Jan-2008 10:06:36
1959 bytes
real2str - print real data in columns
SUMMARY
real2str is equivalent to num2str but much faster
CALL
[str,W]=real2str(X,N)
INPUT
X: vector or matrix
N: number of digits after comma
OUTPUT
str: output string
W: Width of each column
See also: vec2str
<TOOLBOX>
16-Aug-2008 14:12:03
2497 bytes
mbdredo - redo modifications to undoredo object
CALL
obj=redo(obj,N)
INPUT
obj : undoredo object
N : number of redo steps (default: N=1)
OUTPUT
obj : updated undoredo object
See also: undo
<TOOLBOX>\matlabguru\@undoredo
15-Aug-2008 15:46:05
624 bytes
refresh - update the list with files in the filechooser CALL: refresh(obj) INPUT: obj: <filechooser-object> OUTPUT: none, the list with files in the filechooser is updated
<TOOLBOX>\@filechooser
12-Jun-2008 08:07:28
356 bytes
removens - remove a namespace definition from the xml-object
CALL:
obj = removens(obj,S)
INPUT:
obj: <xml-object>
S: <char array> with names of the namespace definitions to be removed
<cell array> with names of the namespace definitions to be removed
OUTPUT:
obj: <xml-object>
EXAMPLE
%create an xml-object
obj = xml(fullfile(pwd,'examples','namespaces.xml'))
%add namespace
addns(obj,{'nsdim','http://www.modelit.nl/dimension'})
%get attribute
obj.width.('@nsdim:dim')
%remove namespace
removens(obj,{'nsdim'})
%try to get attribute
obj.width.('@nsdim:dim')
See also: xml, xml/listns, xml/clearns, xml/addns, xml/getns
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 06:26:44
896 bytes
renameColumn - rename column(s) of table CALL: obj = renameColumn(obj,varargin) INPUT: obj: <table-object> varargin: <string> with (name,newname)-pairs OUTPUT: obj: <table-object> See also: table, table/keepColumn, table/deleteColumn
<TOOLBOX>\@table
20-Sep-2006 10:16:52
870 bytes
reset_val - reset validatiestatus van reeksen naar ongevalideerd CALL: reset_val(obj, event, sorttable) INPUT: obj: <handle> van de 'calling' uicontrol, (niet gebruikt) event: <leeg> standaard argument van een callback (niet gebruikt) sorttable: <jacontrol> (optioneel) lijst met geselecteerde reeksen OUTPUT: geen uitvoer, de database wordt bijgewerkt APPROACH: Er wordt gekeken of er sprake is van een callback aanroep. Zoja, dan wordt om bevestiging gevraagd. Daarna wordt het veld 'StatusValidat' op 0 (niet gevalideerd) gezet.
<APPLICROOT>\melissa2006\FUNCTIES
16-Oct-2007 05:02:36
1299 bytes
rethrow - identical to Matlab rethrow. Indicate last executed line, but
ignore all Matlab toolbox code
CALL
rethrow(S)
INPUT
S: output from lasterror
+----message
+----identifierd
+----stack
OUTPUT
none
EXAMPLE
rethrow(lasterror)
<TOOLBOX>\debug
17-Aug-2008 13:51:17
1188 bytes
rightalign - make right aligned header of exactly N positions
CALL
RA_header=rightalign(LA_header,N)
INPUT
LA_header : Left aligned string NOTE!! vectorized input is supported
N : Number of digits required
OUTPUT
RA-header : Right aligned header
EXAMPLE
[str,N]=real2str(1000*rand(5,2));
la_hdr=strvcat('col1','col2');
hdr=rightalign(la_hdr,N);
disp(hdr);
disp(str);
SEE ALSO
leftalign
<TOOLBOX>
02-Nov-2004 18:57:33
1212 bytes
table/rmfield - apply rmfield method to table object
CALL
T=rmfield(T,fieldslist)
T=rmfield(T,field1,field1,...)
INPUT
T:
table object
fieldlist:
cell array containing fieldnames
field1,field2,...:
fields listed seperately
OUTPUT
T:
table object after update
<TOOLBOX>\@table
17-Aug-2008 10:07:52
455 bytes
rmfield - remove elements and attributes from an xml-object which satisfy
the indexing 'sub'
CALL:
rmfield(obj,sub)
INPUT:
obj: <xml-object>
sub: <string> index into xml document (same format as indexing into
Matlab structures) e.g. 'book(1)' or 'book(1).title'
result in the same substructs as would be obtained if
S.book(1)or S.book(1).title were used (S a Matlab
structure)
<string> with xpath expression
OUTPUT:
none, the xml-object is updated
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
rmfield(obj,'book(1:2)')
rmfield(obj,'book(2).@category')
inspect(obj)
%examples with xpath expression
obj = xml(fullfile(pwd,'examples','books.xml'))
%remove books cheaper than 30 euro
rmfield(obj,'bookstore/book[price < 30]')
inspect(obj)
obj = xml(fullfile(pwd,'examples','books.xml'))
%remove books in the category 'WEB'
rmfield(obj,'bookstore/book[@category = ''WEB'']')
inspect(obj)
See also: xml, xml/fieldNames, xml/isfield
<TOOLBOX>\xml_toolbox\@xml
02-Jun-2006 17:18:00
1731 bytes
rmfiles - remove files/directories (for safety the full path must be
specified)
CALL:
rmfiles(files)
INPUT:
files: <cellstr> with filenames
<chararray> with filenames
OUTPUT:
none, the specified files/directories are deleted
See also: rmdir, delete
<TOOLBOX>
27-Sep-2006 09:53:24
1659 bytes
row_is_in - recognize rows of matrix A in matrix B (and vice versa)
CALL
[A2B,B2A]=row_is_in(A,B,Aunique)
INPUT
A,B: matrices
Aunique: set this argument to 1 if A consists of unique rows
OUTPUT
A2B: vector with length= size(A,1)
if A2B(i)~=0: A(i,:) == B(A2B(i,:))
B2A: vector with length= size(B,1)
if B2A(i)~=0: B(i,:) == A(B2A(i,:))
REMARKS
returns indices >1 for each element of A which corresponds to elements of B
returned value corresponds with FIRST occurance in B
NOTE
In some cases "unique" is more efficient. Example:
INEFFICIENT CODE:
u_rows=unique(strs,'rows');
indx=row_is_in(strs,u_rows);
EFFICIENT CODE:
[u_rows,dummy,indx]=unique(strs,'rows');
SEE ALSO
is_in (deals with vectors)
row_is_in (deals with rows of a matrix)
is_in_struct (deals with structures)
is_in_eq (deals with equidistant time series)
is_in_sort (deals with sorted time series)
strCompare
unique
<TOOLBOX>
16-Aug-2008 10:37:54
4736 bytes
runlength - determine the runlength of values in a vector CALL: [len val] = runlength(x) INPUT: x: <vector of double> OUTPUT: len: <vector of integer> number of consecutive repetitions of value val: <vector of double> value See also: invrunlength
<TOOLBOX>
20-Oct-2007 12:04:06
427 bytes
save - save a tablefile-object CALL: obj: <tablefile-object> INPUT: obj: <tablefile-object> filename: <string> OUTPUT: none, the tablefile-object has been saved See also: tablefile, tablefile/load
<TOOLBOX>\@tablefile
28-Aug-2007 11:17:42
1851 bytes
save - save the xml-object as an xml file
CALL:
obj = save(obj,fname)
INPUT:
obj: <xml-object>
fname: <string> (optional) the name of the xml file, if fname is not
specified a save dialog will pop up
OUTPUT:
obj: <xml-object> the file field of the xml-object is updated and an xml
file is created
EXAMPLE:
obj = xml %create an empty xml object
obj.date = datestr(now) %add fields with values
obj.description = 'test'
obj = save(obj,'test.xml') %save object by specifying filename
obj = xml('test.xml')
inspect(obj);
See also: xml, xml/view, xml/inspect
<TOOLBOX>\xml_toolbox\@xml
06-Jun-2006 07:00:26
1336 bytes
select - invoke tableselect method on table object
CALL:
T = select(S,indx,flds)
T = select(S,indx)
T = select(S,flds)
INPUT:
S: table object
indx: index array
flds: cell array
OUTPUT:
T: table object after update
<TOOLBOX>\@table
17-Aug-2008 10:03:52
366 bytes
selectIndex - select one or more rows in a table
CALL:
obj = selectIndex(obj,index)
INPUT:
obj: <table-object>
index: <integer> index of table rows to be selected
varargin: <string> fieldnames of the table-object -> restrict output to
these columns
OUTPUT:
varargout: <table-object> if nargout == 1 && varargin == 2,4,5,....
varargout: <array> if nargout == varargin
See also: table, table/selectKey, table/is_in
<TOOLBOX>\@table
17-Sep-2006 21:43:00
1626 bytes
selectKey - select one or more rows in a table with keyvalues
CALL:
varargout = selectKey(obj,key,value,varargin)
INPUT:
obj: <table-object>
key: <cell array> table columnnames
value: <cell array> value to look for in specified columns
varargin: <string> fieldnames of the table-object -> restrict output to
these columns
OUTPUT:
varargout: <table-object> if nargout == 1 && varargin == 2,4,5,....
varargout: <array> if nargout == varargin
See also: table, table/selectIndex, table/is_in
<TOOLBOX>\@table
19-Sep-2006 16:19:56
1002 bytes
selectNodes - select nodes from the XML DOM tree
CALL:
nodesList = selectNodes(obj,ind)
INPUT:
obj: <xml-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
<string> with an xpath expression
OUTPUT:
nodesList: <java object> java.util.ArrayList with tree nodes
See also: xml, xml/xpath, xml/subsref, xml/subsasgn,
xml/private/buildXpath
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 07:17:48
968 bytes
select_interval - gui voor het specificeren van een lineaire functie door
het opgeven van twee punten
CALL:
[xbegin,ybegin,xeind,yeind] = select_addition(xbegin,xeind)
INPUT:
xbegin: <datenum>
xeind: <datenum>
OUTPUT:
ybegin: <datenum>
ybegin: <double>
xeind: <datenum>
yeind <datenum>
See also:
<APPLICROOT>\Melissa2006
30-Dec-2006 10:02:38
9601 bytes
select_donar - gui voor het specificeren van donar instellingen
CALL:
donar = select_donar(C, donar)
INPUT:
C: <struct> met de melissa constantes
donar: <struct> met de locatie van het bestand voor aanroepen van
Donar
OUTPUT:
donar: <struct> met de nieuwe locatie van het bestand voor aanroepen
van Donar
See also:
<APPLICROOT>\Melissa2006
26-Mar-2007 17:31:56
8985 bytes
select_filter - gui voor het selecteren van een tijdsinterval voor het
berekenen van een moving average
CALL:
[dagen,uren,minuten] = select_filter(dagen,uren,minuten)
INPUT:
begin: <double> aantal dagen voor berekening van het moving average
eind: <double> aantal uren voor berekening van het moving average
OUTPUT:
begin: <double> aantal dagen voor berekening van het moving average
eind: <double> aantal uren voor berekening van het moving average
See also:
<APPLICROOT>\Melissa2006
22-Jan-2007 20:22:42
8854 bytes
select_interval - gui voor het selecteren van een tijdsinterval voor het
uitbreiden of inperken van het tijdsinterval van het
werkgebied
CALL:
[begintijd,eindtijd] = select_interval(begintijd,eindtijd)
INPUT:
begintijd: <datenum> originele begintijd, wordt getoond in gui
eindtijd: <datenum> originele eindtijd, wordt getoond in gui
tijdstap: <integer> originele tijdstap in minuten, NaN als originele
tijdstap aangehouden moet worden, wordt getoond in
gui
OUTPUT:
begintijd: <datenum> nieuwe begintijd
eindtijd: <datenum> nieuwe eindtijd
tijdstap: <integer> nieuwe tijdstap in minuten, NaN als originele
tijdstap aangehouden moet worden
See also:
<APPLICROOT>\melissa2006\DATABEHEER
08-Feb-2007 17:56:28
10154 bytes
selectdate - select date by clicking on calender
CALL
[date,rc]=selectdate(datenr)
[date,rc]=selectdate
INPUT
datenr: initial date valaue (defaults to today)
OUTPUT
datenr: selected date value (empty if cancel)
SEE ALSO
dateselector
<TOOLBOX>
11-Oct-2005 09:40:50
3735 bytes
selectdir - Open the directory selector and wait for user reply
CALL:
pth = selectdir(obj,event,curdir,N)
pth = selectdir(obj,event,curdir)
pth = selectdir(obj,event)
INPUT:
obj,event: not used
curdir: (string) initial directory. If curdir is not a valid directory, pwd
will be assumed
N: (integer) directoryTypeIdentifier. This number will be used to retreive and
store the history of selected directories
OUTPUT:
pth: -1- if not empty: the name of a directory of which its existence has
been verified.
-2- NOTE: pth includes the "\" sign at the end
-3- empty if user has cancelled.
-4- When a directory is succesfully selected, selectdir issues a
call to defaultpath using directoryTypeIdentifier N. The
next time the directory selector opens this directory is
presented as one of the alternatives.
SEE ALSO: defaultpath
<TOOLBOX>
15-Aug-2008 18:33:42
8250 bytes
selecthairlinerange - selecteer een of meerdere periodes m.b.v. een
hairline
CALL:
selectraairange(x1,x2,y1,y2)
INPUT:
nargin == 0 -> Selecteer eerste geldige periode na aangeklikte plaats
nargin == 1 -> Selecteer aangegeven punten
x1: <array of integer> met periode indices
nargin == 2 -> selecteer punten in tijdsinterval
x1: <double> begin selectie periode
x2: <double> einde selectie periode
nargin == 4 -> selecteer punten in rechthoek
x1: <double> kleinste x-coordinaat
x2: <double> grootste x-coordinaat
y1: <double> kleinste y-coordinaat
y2: <double> grootste y-coordinaat
OUTPUT:
geen directe uitvoer, 1 of meerdere periodes worden geselecteerd
See also:
<APPLICROOT>\melissa2006\HULPFUNCTIES
20-Sep-2007 09:38:44
3337 bytes
selectrange - CALL: selectrange(obj,event,mode,x1,x2,y1,y2) INPUT: obj: event: mode: x1: x2: y1: y2: OUTPUT: geen uitvoer See also: rbline, drawbox
<APPLICROOT>\melissa2006\GETIJBEHEER
30-Nov-2006 12:29:42
2007 bytes
selectrange_mel - CALL: selectrange(obj,event,mode,x1,x2,y1,y2) INPUT: obj: <handle> van de aanroepende uicontrol event: <leeg> standaard matlab callback argument mode: x1: x2: y1: y2: OUTPUT: geen uitvoer See also:
<APPLICROOT>\Melissa2006
16-Oct-2007 17:01:22
3073 bytes
separatestr - deel de string op in delen die gescheiden worden door een
spatie ' '
CALL:
varargout = separatestr(string)
INPUT:
string: <string> de string die opgedeeld moet worden
OUTPUT:
varargout: <string> hierin komen de delen van de op te delen string
EXAMPLE:
[a,b,c] = separatestr('A B C') => a == 'A', b == 'B', c == 'C'
[a,b] = separatestr('A B C') => a == 'A', b == 'B C'
[a,b,c,d] = separatestr('A B C') => a == 'A', b == 'B', c == 'C', d == ''
<TOOLBOX>
15-Aug-2008 18:45:29
755 bytes
serializeDOM - serialise a DOM by transformation to a string of file
CALL:
String = serialize(DOM,fileName)
INPUT:
DOM: <java-object> org.apache.xerces.dom.DocumentImpl
fileName: <string> (optional) met een geldige bestandsnaam
OUTPUT:
String: <string> if nargin == 1 the serialised DOM
<boolean> if nargin == 2,
0 -> saving to fileName not successful
1 -> saving to fileName successful
EXAMPLE:
obj = xml %create an empty xml object
obj.date = now %add fields with values
obj.type = 'test'
save(obj,'test.xml')
obj('test.xml')
inspect(obj)
See also: xml, xml/inspect, xml/view, xml/save
<TOOLBOX>\xml_toolbox
08-Jun-2006 07:37:18
2063 bytes
dateselector/set - change property of calendar object
CALL
set(obj,property,value,...)
set(obj,propertystruct,...)
INPUT
<option>,<argument>
See dateselector constructor for list of possible options
OUTPUT
obj: Calendar object after update
SEE ALSO
dateselector/get
<TOOLBOX>\MBDresizedir\@dateselector
17-Aug-2008 10:42:02
3335 bytes
set - set methode van het jacontrol object CALL: obj = set(obj, varargin) INPUT: obj: jacontrol object varargin: <option>, <argument> paren OUTPUT: obj: jacontrol object See also: jacontrol/get, jacontrol
<TOOLBOX>\jacontrol\@jacontrol
09-Jun-2008 17:45:50
153292 bytes
set - set the value of the specified property for an xml-object
CALL:
set(obj,prop_name,prop_value)
INPUT:
obj: <xml-object>
prop_name: <string> propertyname, possible values:
- DOM <org.apache.xerces.dom.DeferredDocumentImpl>
with the DOM representation of the xml
- file <string> with filename
- NS <java.util.HashMap> with namespaces
prop_value: the value of the property to be set for the xml-object
OUTPUT:
obj: <xml-object> with the property prop_name set to prop_value
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
%get all property-value pairs
get(obj,'file')
%get the (D)ocument (O)bject (M)odel
obj = set(obj,'file',fullfile(pwd,'examples','books_changed.xml'))
get(obj,'file')
See also: xml, xml/get
<TOOLBOX>\xml_toolbox\@xml
01-Jun-2006 17:28:20
2025 bytes
setMouseWheel - set callback for mouseWheel for figure
CALL
setMouseWheel(fcn)
setMouseWheel(fcn,HWIN)
INPUT
fcn: calbback function
HWIN: handle of figure
Nanne van der Zijpp
Modelit
www.modelit.nl
<TOOLBOX>
15-Aug-2008 21:30:04
3569 bytes
setPassive - communicate with server in "passive" mode, even if this is
not the server's default. Some DSL modums do not support the active ftp
mode
CALL
setPassive(ftpobj)
INPUT
ftpobj <class ftp>:
ftp connection
OUTPUT
This function returns no output arguments
<TOOLBOX>
16-Aug-2008 11:10:26
472 bytes
setPieceBarColors - set colors for PieceBarRenderer in sorttable CALL: hideColumn(sorttable, columnname, hide) INPUT: jac: <jacontrol> type jxtable key: <double> key value for corresponding color, size is Nx1 colors: <boolean> color corresponding to key, size is Nx3 OUTPUT: no output, the colors for the PieceBarCellRenderer are set See also: jacontrol
<TOOLBOX>\jacontrol\@jacontrol
28-Aug-2007 14:12:50
971 bytes
setTitleAt - zet de titels van de tabbladen van een JTabbedPane jacontrol
CALL:
setTitleAt(index,title)
INPUT:
jac: <jacontrol object> van het type JTabbedPane
index: <vector of integer> index van het tabblad waarvoor de titel
aangepast moet worden
title: <string> titel van het tabblad als length(index) == 1
<cellstring> met titels als length(index) > 1
OUTPUT:
geen directe uitvoer, de titel van het tabblad op plaats index is
aangepast
See also: jacontrol
<TOOLBOX>\jacontrol
18-Dec-2006 05:10:28
1254 bytes
setValue - zet waarde in een sorteerbare tabel, deze nieuwe waarde moet
wel van hetzelfde type zijn als de oude waarde
CALL:
setValue(jac,arg,row,col)
INPUT:
jac: <object> van het type jacontrol met style SortTable
arg: de waarde die in de tabel gezet moet worden
row: <integer> rij waarin de waarde gezet moet worden
col: <integer> kolom waarin de waarde gezet moet worden
OUTPUT:
geen directe uitvoer, de waarde is in de tabel gezet in de opgegeven rij
en kolom (rij en kolom beginnen bij 1)
<TOOLBOX>\jacontrol\@jacontrol
12-Jan-2007 23:29:36
1115 bytes
set_directory - change directory in the filechooser CALL: set_directory(obj,value) INPUT: obj: <filechooser-object> value: <string> new directory OUTPUT: none, the directory and the list with files in the filechooser are updated
<TOOLBOX>\@filechooser
19-Aug-2008 14:25:36
790 bytes
set_filter - change filefilter CALL: set_filter(obj,value) INPUT: obj: <filechooser-object> value: <string> new filter OUTPUT: none, the filter and the list with files in the filechooser are updated
<TOOLBOX>\@filechooser
02-Mar-2008 20:35:40
440 bytes
set_taxis - Make RKS or TPS block by specifying begintime, endtime,
timeunit and timestep.
CALL:
S = set_taxis(S, tbegin, teind, tijdstapeenheid, tijdstap)
INPUT:
S:
Existing RKS or TPS administrationbuffer, may be empty.
tbegin:
Datenum with begin time.
teind:
Datenum with end time.
tijdstapeenheid:
(Optional) String with timeunit, see DONAR Manual Part 7, section 2.9.3
tijdstap:
(Optional) timestep in tijdstapeenheid units.
OUTPUT:
S:
Structure with RKS or TPS (reeksadministratiebuffer) with new values.
APPROACH:
Convert Matlab datenum to DONAR date and time.
Substitutue values. Check if timeunit en timestep need to be added.
Check if timeunit and timestep are valid
EXAMPLE:
blok(k).RKS=set_taxis(blok(k).RKS,min(taxis_totaal),max(taxis_totaal));
blok(k).TPS=set_taxis(blok(k).TPS,min(taxis_totaal),max(taxis_totaal));
See also: combineRKS, combineTPS, cmp_taxis
<TOOLBOX>\diaroutines
18-Aug-2008 17:38:26
2005 bytes
overload setappdata for jacontrol objects INPUT
<TOOLBOX>\jacontrol\@jacontrol
19-Mar-2008 11:39:34
229 bytes
setcommitted - set 'committed' status of object to
SUMMARY
When an undoredo object is initialized its committed status is
initialized als TRUE.
Each time the undoredo object is modified, its committed status is
set to FALSE. If an application contains a function that saves the
data to disk, a call to setcomitted can be used to indicate that data
have been saved. If the application is closed a call to setcommitted can
reveal if modifications have been made since last save.
CALL
obj=setcommitted(obj)
obj=setcommitted(obj,comitted)
INPUT
obj: undoredo object
comitted: Comitted status (TRUE or FALSE)
Comitted status is TRUE ==> all transactions have been
comitted (saved to disk of
stored otherwise)
Comitted status is FALSE ==> one or more transaactions
have not been comitted
OUTPUT
obj: updated version of undoredo object
EXAMPLE
(code example save data)
ud = getdata(db);
save(fname,'ud'); %WIJZ ZIJPP OKT 2006
db=setcommitted(db);
store(db);
(code example close request function)
function closereq(hFig,event)
db = get_db;
if isempty(db)||iscomitted(db)
delete(hFig);
return
end
%Ask and store unsaved data
switch questdlg('Save data?,'Close application','Yes','No','Cancel','Yes')
case 'Yes'
savedata(db);
delete(hFig);
case 'No'
delete(hFig);
return
case 'Cancel'
return;
end
See also
undoredo/iscommitted
undoredo/subsasgn
undoredo/mbdvalue
undoredo/isopen
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 22:06:13
2178 bytes
setdata - overload method for "=" operator
SUMMARY
The subsasgn method proides no way to replace the datacontent of an
undoredo object with a new matlab variable. This method does the job.
The extra argument may be used to indicate whether or not the undo
history whould be cleared or not
CALL
obj=setdata(obj,data)
obj=setdata(obj,data,reset)
INPUT
obj: undoredo object
data: new data for object
reset: (optional, defaults to true)
if true reset the undo history of the object
See also: getdata subsasgn
<TOOLBOX>\matlabguru\@undoredo
08-Aug-2008 22:01:23
3850 bytes
setdepend - register dependency tree for object with window
SUMMARY
A dependency tree is used by evaldepend to derive the so-called
update structure using the substruct arguments used in vatious
assignments to an undoredo object.
A dependency tree is specified in a user defined function that
returns a structure that resembles the datamodel of an application.
At each node of this structue a field "updobj" may be added. This
field should contain a cell array with the name or names of the
update actions that are required when an assignment is made that
effects this node or any of its children.
See the example for an illustration.
CALL
setdepend(db,HWIN,deptree)
INPUT
HWIN : figure handle
db : undoredo object
deptree: dependency tree
OUTPUT
This function returns no output arguments, but registers the
dependency tree in the application data "ur_depend" of the figure
EXAMPLE
function example
%initialize
data.a=1;
data.b.c=2;
HWIN=figure; %create application figure
db=undoredo(data,'disp',@view,'storeh',HWIN,'storef','userdata'); %define database
deptree.a.updobj={'update_a'};
deptree.b.updobj={'update_b'};
deptree.b.c.updobj={'update_c'};
deptree.b.d.updobj={'update_d'};
setdepend(HWIN,db,deptree); %register dependency tree
%end of initialize
%do some assignments and view what happens, make sure the function
%"view" (see below) is available
db.b.c=1;
db=flush(db);
% ==>upd =
% update_a: 0
% update_b: 1
% update_c: 1
% update_d: 0
db.b=1;
db=flush(db);
% ==>upd =
% update_a: 0
% update_b: 1
% update_c: 1
% update_d: 1
db.a=1;
db=flush(db);
% ==>upd =
% update_a: 1
% update_b: 0
% update_c: 0
% update_d: 0
function view(signature,S,ind)
upd=evaldepend(gcf,ind,signature)
See also: getdepend, evaldepend
Create the structure that should be stored
<TOOLBOX>\matlabguru\@undoredo
09-Aug-2008 14:14:35
3352 bytes
seticon - change the icon of a matlab figure
CALL
seticon(HWIN,iconfile):
set icon of HWIN to data in file "iconfile". Supported file
formats: PNG, GIF, BMP,ICO (only GIF and PNG support transparancy
data). This is the most common way to call seticon.
seticon(HWIN):
set icon of HWIN to previously used value
seticon:
set icon of current window to previously used value
seticon(HWIN,cdata):
set icon of HWIN to cdata.
Note: cdata is not "remembered" so a next call to seticon without
arguments will NOT reproduce this icon
seticon(HWIN,X,MAP):
set icon of HWIN to [X,map]
Note: [X,map] is not "remembered" so a next call to seticon
without arguments will NOT reproduce this icon
seticon(0)
Reset persistent icon (do not update figure)
INPUT
HWIN:
figure to operate on
iconfile:
file to read icon from
cdata:
truecolor image
[X,map]:
indexed image
OUTPUT
This function returns no output arguments
NOTES
On windows, best results are obtained when using bitmaps of 16 x 16 pixels
When transparant icons are required, use a GIF or PNG format
This version has been tested with Matlab 7.0, 7.01 and 7.04 and the
corresponding Matlab Compilers (see Details below)
LIMITATIONS
In Matlab version 7.04, seticon has no effect on figures for which the
attribute 'visibility' is set to 'off'. It is expected that this problem
can be solved in a later version. In earlier Matlab versions this problem does not occur.
To obtain optimal results across versions one may invoke seticon twice, see
example below.
NOTE August 5 2005: the problems seems to be solved by introducing a
timer that tries untill the window becomes
visible
EXAMPLE(1): set icon on 1 window
HWIN=figure('vis','off') %hide window while construction is in progress
seticon(HWIN,'modelit.png'); % (typical for Matlab v7.0/v7.01)
<create graphs and uicontrols>
set(HWIN,'vis','on');
drawnow; %<< (only required for Matlab v7.04)
seticon(HWIN); %<< (only required for Matlab v7.04)
EXAMPLE(2): set icon on each future window
set(0,'DefaultFigureCreateFcn',@modelitIcon)
function modelitIcon(obj,event)
seticon(obj,'modelit.png');
COMPATIBILTY NOTE
The behaviour of seticon may change when new Java or Matlab versions
are installed. The Seticon utility relies on some undocumented Matlab
features that may change or disappear in future Matlab versions. It
is expected that seticon can be adapted to such changes. However no
guarantees of whatever kind are given that a seticon version will be
available for Matlab versions beyond 7.04.
See also: imread, icon2png
<TOOLBOX>
16-Aug-2008 10:16:48
10087 bytes
setlabel - set label for undo menu for current group
SUMMARY
In the undo/redo menu, all transactions in a group are presented as
one line. The closegroup commans is used to separate different groups
of transactions. Normally the closegroup command is not needed as the
store method closes a group of transactions before storing the
undoredo object.
closegroup is needed in the specific case where you are performing a
series of operations that should appear seperately in the undo list,
but there is no reason to the store the database in between.
CALL:
obj = setlabel(obj, menustring)
INPUT:
obj: <undoredo object>
menustring: <string> for undo/redo menu
(default value: menustring='Modify object')
NOTE: a new goup must be initialized with a call to ur_assign. Example:
Wrong:
db=setlabel(db,'My group')
db=ur_assign(...); (Result: this group has label "My group")
Right:
db=ur_assign(...);
db=setlabel(db,'My group') (Result: this group has no label)
See also: ur_closegroup, ur_assign
EXAMPLE:
db=ur_assign(db,substruct('.','raai','()',{refindx}),...
[]);
db=ur_assign(...);
db=setlabel(db,'str')
db=ur_closegroup(db);
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 15:20:21
1801 bytes
setprop - implement set method for undoredo object
SUMMARY:
This methods implements a "set" method for fields of an undoredo that
normally are not visible. The function is intentinally not
documented.
INPUT
<option>,<argument>
OUTPUT
none
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 15:22:01
1281 bytes
show - show image file
CALL
image: filename (with or without extension)
Modelit
www.modelit.nl
<TOOLBOX>\docutool
30-Apr-2003 18:56:03
450 bytes
show - directlty caal the display function of an undoredo object.
SUMMARY
Usage of this function allows one to paint (part of) the interface
without changing the data.
Note: usage of this function is not recommended programming practice.
In almost any case the objective cabn be reached by using the
flush method.
CALL
show(db,ind)
INPUT
db: undoredo object
ind: struct array with fields (defaultvalue='all')
type: '()'/'[]'/{}','.'
subs: cell array
EXAMPLE
typical use: visualise parts of the GUI that does not depend on the database
but instead on the value of for example a uicontrol
FAQ SECTION
Problem:
show(db,'all') does not give the expected result (nothing happens)
Cause:
the 'all' argument (string) is passed on as {'all'} (cell array)
Remedy:
use show(db). This will call the display function with 'all' as an argument
<TOOLBOX>\matlabguru\@undoredo
10-Aug-2008 19:07:05
1404 bytes
size - determine the size of the table
CALL:
[m,n] = size(obj,dim)
INPUT:
obj: <table-object>
dim: <integer> (optional) possible values:
1 (default) --> vertical (number of rows)
2 --> horizontal (number of columns)
OUTPUT:
m: <integer> number of rows in the table
n: <integer> number of columns in the table
See also: table, table/length
<TOOLBOX>\@table
19-Sep-2006 22:28:06
942 bytes
slashpad - complement path with filesep symbol
CALL
str=slashpad(str)
INPUT
str: filename
OUTPUT
setr: filename appended with file separator
<TOOLBOX>
15-Aug-2008 13:03:27
357 bytes
sort - sort table according to specified field and direction
CALL:
obj = sort(obj, keys, mode)
INPUT:
obj: <table-object>
keys: <cellstring> columnnames of the table to be sorted
mode: <array of integer> (optional) sorting direction, allowed values:
1 --> 'ascend' (default)
-1 --> 'descend'
OUTPUT:
obj: <table-object> sorted according to specified columns/directions
See also: table
<TOOLBOX>\@table
25-Apr-2007 16:03:42
1037 bytes
sortmkey - sort on multiple keys, identical to sortrows, but allows data
to be mixed character, number array
CALL:
indx = sortmkey(varargin)
INPUT:
varargin: <cell array> colums to be sorted
OUTPUT:
indx: <index>
See also: sortrows
<APPLICROOT>\melissa2006\HULPFUNCTIES
26-Mar-2007 21:52:32
640 bytes
stationCallback - selecteer station door op de kaart te klikken CALL: stationCallback(obj,event,sorttable) INPUT: obj: <handle> van het aangeklikte station event: <leeg> standaard matlab callback argument sorttable: <jacontrol> met de lijst met stations S: <struct> met aanvullende eisen voor weer te geven station OUTPUT: geen directe uitvoer APPROACH: in de applicationdata van het aanroepende uicontrol (een patch) zitten de x en y coordinaten van het meetstation, deze informatie wordt gebruikt om het meetstation in de tabel op te sporen en te selecteren See also: displayStations
<APPLICROOT>\melissa2006\HULPFUNCTIES
02-Jan-2007 12:23:56
1352 bytes
waitstatus - return false if waitbar has been removed or stopped
CALL:
stop = stopwaitbar(HWIN)
INPUT:
HWIN: <handle> of the figure with the waitbar(s)
HWIN==-1: ignore mode
OUTPUT
stop: TRUE ==> stop
FALSE ==> continue
EXAMPLE:
for k=1:10
hwait=multiwaitbar('loop1',10*k,sprintf('k=%d',k));
for r=1:5:100
if stopwaitbar(hwait),return;end
multiwaitbar('loop2',r,sprintf('r=%d',r));
pause(0.01)
end
end
multiwaitbar('loop1',-1);
multiwaitbar('loop2',-1);
See also
multiwaitbar
<TOOLBOX>
18-Apr-2008 01:25:41
898 bytes
store - store object with specified handle and field
SUMMARY
When an undoredo object is created the properties "storehandle" and
"storefield" may be specified. This allows an undoredo object to
store itself.
The store operator is similar to the commit action known in
databases.
Before an undoredo object is stored the group of transactions is
closed, so that the next change will initialize a new group.
CALL
store(obj)
INPUT
obj : undoredo object
OUTPUT
this function returns no output arguments, but updates userdata or
applicationdata of specified handle
See also: closegroup
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 15:19:40
1177 bytes
store - replacement for undoreo/store.m that will be called if flush
returns empty set in common ststements line "store(flush(db)).
CALL
store(obj)
INPUT
obj : any object
See also:
undoredo/flush
<TOOLBOX>\matlabguru
20-Mar-2008 12:34:48
282 bytes
list1,list2 char arrays or cell strings
returns for each element in list1 FIRST location of occurence in list2
if element does not appear in list2 0 is returned for that element
voorbeeld: str_is_in(strvcat('aa','ggg','h'),strvcat('sss','aa','bb'))=[2 0 0]'
<TOOLBOX>\docutool
03-Jul-1999 15:55:02
561 bytes
struct - return data component of table object
CALL
S=struct(T)
INPUT
T:
table object
OUTPUT
S:
data content of tabel objeect. this is a table structure
<TOOLBOX>\@table
17-Aug-2008 10:09:29
262 bytes
struct2Comment - display structure in comment style
CALL
strs=struct2Comment(s)
strs=struct2Comment(s,fldname)
strs=struct2Comment(s,fldname,DISPMODE)
INPUT
s : structure for analysis
fldname : default: '<root>'
DISPMODE : Display mode argument, to be passed on recursively.
default: 'class'
options: 'class': display fieldname and class
'none' : display fieldname
'field': display field content
OUTPUT
strs
<TOOLBOX>\docutool
09-Jun-2008 12:14:02
2126 bytes
struct2cellstr - converteer structure naar een cellarray met strings
CALL:
C = struct2cellstr(S, fields)
INPUT:
S: structure
C: (optioneel) cellstr met te gebruiken velden
OUTPUT:
C: cell array met in kolom 1 de veldnamen en
kolom 2 de waarden als string, omgezet met toStr
See also: toStr
<TOOLBOX>
20-Jan-2008 11:32:34
550 bytes
struct2char - convert single structure to horizontally concatinated char
array
CALL:
report = struct2char(S, flds)
INPUT:
S: structure
flds: cell array of fields to display
OUTPUT:
report : string to display
See also: rightalign, struct2str
<TOOLBOX>
20-Jan-2008 11:29:20
883 bytes
struct2hash - convert a matlab structure into a java hashmap
CALL:
H = struct2hash(S,H)
INPUT:
S: <struct> fieldnames --> hashmap keys
values --> hashmap entries
H: <java object> (optional) java.util.HashMap
OUTPUT:
H: <java object> java.util.HashMap
See also: xml, xml/private/buildXpath
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:28:36
577 bytes
struct2treemodel - fast way to convert structure to treemodel
CALL:
model = struct2treemodel(S, model, parent)
INPUT:
S:
array of structures
model:
paramter that can be passed to jacontrol with style JXTable
parent:
initial parent
OUTPUT:
model:
paramter that can be passed to jacontrol with style JXTable
EXAMPLE
[table h] = jacontrol('style','JXTable',...
'scrollb',true,...
'ColumnControlVisible',true,...
'SelectionMode',3,...
'showgrid','none');
set(table,'Content',struct2treemodel(S));
<TOOLBOX>
16-Aug-2008 13:52:44
1722 bytes
struct2xmlobj - convert a structure to an xml-object CALL: obj = struct2xmlobj(S) INPUT: S: <struct> or <struct array> OUTPUT: obj: <xml-object> EXAMPLE: S = dir obj = struct2xmlobj(S) inspect(obj) See also: xml
<TOOLBOX>\xml_toolbox
26-Jun-2008 13:21:39
4607 bytes
structarray2table - convert array of structures to stucture of arrays
CALL:
T = structarray2table(S)
INPUT:
S: <structarray>
OUTPUT:
T: <struct> structure of arrays
APPROACH:
concatenate numeric fields
convert fields with strings into cellstrings
See also: table
<TOOLBOX>\@table\private
16-Sep-2006 12:21:36
947 bytes
strvscat - equivalent aan strvcat, maar beschouw '' als lege regel
CALL:
s = strvscat(a,b,c,...)
INPUT:
a,b,c,... <char array>
OUTPUT:
s: <char matrix>
EXAMPLE:
strvscat(strvcat('aa','bb'),'','d')
ans =
aa
bb
d
SEE ALSO: strvcat
<TOOLBOX>
25-Jul-2006 16:51:58
443 bytes
stuurfile - edit a tablefileobject
CALL:
str = stuurfile(fname)
INPUT:
fname: <string> naam van bestand met stuurfile
N: <integer> (optioneel) default categorie file t.b.v. bewaren
default directory (defaultwaarde: 1)
batch: <boolean> true -> batch mode (laad stuurfile zonder commentaar)
false -> laad en edit stuurfile
OUTPUT:
str: <string> met stuurfiledata (zonder commentaar)
See also: tablefile, table
<TOOLBOX>
26-Jul-2008 10:39:12
12827 bytes
sub2ind - convert a string into a struct array of type substruct, for
indexing into xml documents as if they were Matlab structures
CALL:
ind = sub2ind(S)
INPUT:
S: <string> index into xml document (same format as indexing into
Matlab structures) e.g. 'book(1)' or 'book(1).title' result
in the same substructs as would be obtained if S.book(1) or
S.book(1).title were used (S a Matlab structure).
OUTPUT:
ind: <struct array> with fields:
- type -> subscript types '.', '()', or '{}'
- subs -> actual subscript values (field names or
cell arrays of index vectors)
EXAMPLE:
ind = sub2ind('book(1)')
See also: xml, xml/isfield, xml/rmfield, substruct
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:29:08
1223 bytes
subsasgn - assign new values to a table-object
CALL:
obj = subsassgn(obj,ind,data)
INPUT:
obj: <table-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
data: with the values to be put in the by ind defined fields in the
table-object, allowed types:
- <number>
- <boolean>
- <string> or <cellstr>
OUTPUT:
obj: <table-object>
See also: table, table/subsref, subsasgn
<TOOLBOX>\@table
17-Sep-2006 21:39:26
1454 bytes
subsasgn - assign new values to a tablefile-object
CALL:
obj = subsassgn(obj,ind,data)
INPUT:
obj: <tablefile-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
data: with the values to be put in the by ind defined fields in the
tablefile-object, allowed types:
- <number>
- <boolean>
- <string> or <cellstr>
OUTPUT:
obj: <tablefile-object>
See also: table, tablefile/subsref, table/subsref, table/subsasgn
<TOOLBOX>\@tablefile
21-Sep-2006 16:43:56
783 bytes
subsasgn - equivalent to Matlab subsasgn but fo undo objects
CALL
obj=subsassgn(obj,ind,data)
INPUT
obj: current object
obj: undoredo object
obj.history: all data that is needed to perform
undo and redo actions on object
obj.data: data contents of object
ind: substruct array with fields (see substruct)
type: '()'/'[]'/{}','.'
subs: cell array
data: the contents of this field depend on the mode of operation:
SEE ALSO
getdata
label
flush
store
<TOOLBOX>\matlabguru\@undoredo
20-Jan-2007 19:40:41
3980 bytes
subsasgn - assign new values to the xml document in an xml-object
CALL:
obj = subsassgn(obj,ind,data)
INPUT:
obj: <xml-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
<string> with an xpath expression
data: (optional) with the values to be put in the by ind defined
fields in the xml-object, allowed types:
- <struct> matlab structure
- <xml-object>
- <org.apache.xerces.dom.ElementImpl>
OUTPUT:
obj: <xml-object>
See also: xml, xml/subsref, xml/xpath, subsasgn
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 07:14:00
960 bytes
This function is now obsolete
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:24:55
4452 bytes
subsref - subscripted reference for a table-object
CALL:
S = subsref(obj,ind)
INPUT:
obj: <table-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
OUTPUT:
S: <array> with the contents of the referenced field
See also: table, table/subsasgn, subsref
<TOOLBOX>\@table
17-Sep-2006 21:06:36
535 bytes
subsref - subscripted reference for a tablefile-object
CALL:
S = subsref(obj,ind)
INPUT:
obj: <table-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
OUTPUT:
S: <array> with the contents of the referenced field
See also: table, table/subsasgn, subsref
<TOOLBOX>\@tablefile
21-Sep-2006 16:40:46
532 bytes
subsref - overloaded subsref function for undoredo object
CALL
[data,varargout]=subsref(obj,ind)
INPUT
obj: undoredo object
ind: suvsref expression
OUTPUT
result from subseref statement on object
NOTES
KNOWN RESTRICTIONS
In most cases undoredo objects can be applied using the same synatax
as normal matlab variables. A few exceptions exist:
STRVCAT
%Observe the following behavior:
U.a=struct('b',{'first','second','third'}) % U.a is a 3 element struct array
str1=strvcat(U.a.b) %str1 is a 3x6 char array
UU=undoredo(U)
str2=strvcat(UU.a.b)%str2 = 'first'
%Work-around:
aa=UU.a %returns "normal" struct array
st3=strvcat(aa.b)%str2 = 'first' %str3 is a 3x6 char array
%Background: If S is a Nx1 struct array, S.b returns N outputs.
Undoredo objects only return 1 output.
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 15:24:30
5804 bytes
subsref - subscripted reference for an xml object
CALL:
S = subsref(obj,ind)
INPUT:
obj: <xml-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
<string> with an xpath expression
OUTPUT:
S: <cell array> with contents of the referenced nodes, can contain
xml objects, strings or numbers
See also: xml, xml/subsasgn, xml/xpath, subsref
<TOOLBOX>\xml_toolbox\@xml
08-Jun-2006 07:13:44
665 bytes
subsref - overloaded subsref function for undoredo object
<TOOLBOX>\matlabguru\@undoredo
25-Jul-2007 14:00:01
4438 bytes
table - constructor for table-object
CALL:
obj = table(T)
INPUT:
T: <array of struct>
<structarray>
OUTPUT:
obj: <table-object>
Example:
S(1).number = 1;S(1).string = 'one'
S(2).number = 2;S(2).string = 'two'
T = table(S);
<TOOLBOX>\@table
22-Oct-2007 18:35:44
773 bytes
table2int32 - replace table cells with numeric values.
SUMMARY
This function replaces each cell with its index in the set of unique
rows. This is useful when determinig unique rows in a table of
membership of 1 table in another.
CALL
M=table2uint32(table,flds)
INPUT
table: structure of equal height arrays (table)
+----fld1(N,:)
+----fld2(N,:)
flds: [cell array of chars] fields to sort on (optional) (default:
fieldnames(table))
OUTPUT
M(N,P): [int32] P=length(flds). Matrix with rank indices
EXAMPLE
[1.7;8;-1;8] will be replaced with [2,3,1,3]. In other words: sort
will be supplied.
If you need different behavior, for example output [ 1 2 3 2], use
table2ID
See also: table2ID
<TOOLBOX>
16-Aug-2008 19:00:42
1592 bytes
tableAction - programmatically select a row in a jxtable. With this
routine the first, last, previous or next row can be
selected in the current table (with its current sorting and
filtering status).
CALL:
tableAction(sorttable, actionKey)
INPUT:
sorttable: <jacontrol-object> of type jxtable
actionKey: <string> action, allowed values:
- 'selectPreviousRow'
- 'selectNextRow'
- 'selectFirstRow'
- 'selectLastRow'
OUTPUT:
No direct output, the selection of the table will be changed.
See also: jacontrol
<TOOLBOX>\jacontrol
09-Jun-2008 18:02:06
1162 bytes
tableFormat - converteert jacontrol naar een structure aan met een data
veld met een cell array en een header veld met de
kolomnamen in een cellstring, dit formaat kan gebruikt
worden om het component te visualiseren in een jxtable
CALL:
S = tableFormat(obj)
INPUT:
obj: jacontrol object
OUTPUT:
S: structure met velden 'header' - cellstring met kolomnamen
'data' - cellarray met data
<TOOLBOX>\jacontrol\@jacontrol
20-Jan-2008 11:51:28
765 bytes
tableWindow - maak scherm met tabel aan en vul deze met tableComposer
CALL:
table = tableWindow(tableComposer)
INPUT:
tableComposer: <function handle> dit is een function met uitvoer een
struct om de lijst mee te vullen, heeft de volgende vorm:
'data' cell array met waarden
'header' cellstr met de namen van de kolommen
<table struct> af te beelden tabel, zie ook istable
args: <cell array> met argumenten voor tableComposer
OUTPUT:
HWIN: handle van aangemaakt figuur
table: jacontrol van het type jxtable
See also: jacontrol
<TOOLBOX>
02-May-2008 14:22:25
4554 bytes
tablefile - constructor for tablefile-object
CALL:
obj = tablefile(fields,format,filename,N)
INPUT:
fields: <cellstring> with names of the tablecolumns
format: <cellstring> with format of tablecolumns, see format2convchar
filename: <string> of filename to load from and save to
N: <integer> (optional) default directory, see defaultpath
(default == 1)
varargin: parameter waarden paren, mogelijke paren:
- 'delimiter': <string> met delimiter b.v. ';' of ' '
OUTPUT:
obj: <tablefile-object>
See also: table, tablefile, tablefile/private/format2convchar,
defaultpath
<TOOLBOX>\@tablefile
28-Aug-2007 11:19:28
1580 bytes
tableheight - get height (number of rows) of table
CALL:
N = tableheight(S)
INPUT:
S: <struct> a table structure
OUTPUT
N: <integer> height of table
See alos: istable
<TOOLBOX>
16-Jan-2007 17:07:16
388 bytes
tableselect - select data from struct of arrays (both rows and columns)
CALL:
T = tableselect(S,indx,flds)
T = tableselect(S,indx)
T = tableselect(S,flds)
INPUT:
S: struct of arrays(tablestruct), all fields must be (N x 1)
indx: index array
flds: cell array
OUTPUT:
S: struct of arrays (tablestruct), all fields must be (N x 1)
See also: table2structarray, tableunselect, structarrayselect
<TOOLBOX>
07-Nov-2007 17:22:32
1254 bytes
tableunique - get unique rows of table
CALL
[f,T2T,fNotUnique]=tableunique(table,flds)
INPUT
table1: first structure of arrays (table)
+----fld1(N1,:)
+----fld2(N1,:)
table2: second structure of arrays (table)
+----fld1(N1,:)
+----fld2(N1,:)
flds={key1,key2,key3,...}
OUTPUT
f: indices of unique rows in table
T2T: table-to-table indices
elements found in "table" match elements T2T in "tableselect(f)"
fNotUnique: indices of rows that occur more then once
EXAMPLE (1)
get unique rows of table:
f_unique=tableunique(table)
T=tableselect(table,f_unique);
EXAMPLE (2)
find out if (combined) key is in fact a key
[f_unique,T2T]=tableunique(table,{'key1','key2'})
SEE ALSO
tableselect
table2structarray
tablesort
tablenorepeat
<TOOLBOX>
16-Aug-2008 19:01:27
2154 bytes
taxisSynchronize - synchroniseer tijdassen van equidistante reeksen CALL blok=taxisSynchronize(blok) INPUT blok: een array van DIA blok structures OUTPUT blok: een array van gesynchroniseerde DIA blok structures
<APPLICROOT>\melissa2006\GETIJBEHEER
11-Jan-2007 02:16:20
3383 bytes
function [handles,levels,parentIdx] = findjobj(container,varargin)
%findjobj Find java objects contained within a specified java container or Matlab GUI handle
%
% Syntax:
% [handles, levels, parentIds, classes] = findjobj(container, 'PropName',PropValue(s), ...)
%
% Input parameters:
% container - optional handle to java container uipanel or figure. If unsupplied then current figure will be used
% 'PropName',PropValue - optional list of property pairs (case insensitive). PropName may also be named -PropName
% 'position' - filter results based on those elements that contain the specified X,Y position or a java element
% Note: specify a Matlab position (X,Y = pixels from bottom left corner), not a java one
% 'size' - filter results based on those elements that have the specified W,H (in pixels)
% 'class' - filter results based on those elements that contain the substring (or java class) PropValue
% Note1: filtering is case insensitive and relies on regexp, so you can pass wildcards etc.
% Note2: '-class' is an undocumented findobj PropName, but only works on Matlab (not java) classes
% 'property' - filter results based on those elements that posses the specified property string
% 'depth' - filter results based on specified depth. 0=top-level, Inf=all levels (default=Inf)
% 'flat' - same as specifying: 'depth',0
% 'not' - negates the following filter: 'not','class','c' returns all elements EXCEPT those with class 'c'
% 'persist' - persist figure components information, allowing much faster results for subsequent invocations
% 'print' - display all java elements in a hierarchical list, indented appropriately
% Note1: optional PropValue of element index or handle to java container
% Note2: normally this option would be placed last, after all filtering is complete. Placing this
% option before some filters enables debug print-outs of interim filtering results.
% Note3: only the first of the returned java elements is listed
% Note4: output is to the Matlab command window - can't easily be captured into a string variable
% 'list' - same as 'print'
%
% Output parameters:
% handles - list of handles to java elements
% levels - list of corresponding hierarchy level of the java elements (top=0)
% parentIdx - list of indexes into handles of the parent container of the corresponding java element
%
% Examples:
% handles = findjobj; % get list of all java elements in current figure (inc. menus, toolbars etc.)
% findjobj('print'); % list all java elements in current figure
% findjobj('print',6); % list all java elements in current figure, contained within its 6th element
% handles = findjobj(hButton); % hButton is a matlab button
% handles = findjobj(gcf,'position',getpixelposition(hButton,1)); % same as above
% handles = findjobj(hButton,'persist'); % same as above, persist info for future reuse
% handles = findjobj('class','pushbutton'); % get all pushbuttons in current figure
% handles = findjobj('class','pushbutton','position',123,456); % get all pushbuttons at the specified position
% handles = findjobj(gcf,'class','pushbutton','size',23,15); % get all pushbuttons with the specified size
% handles = findjobj('-property','Text','not','class','button'); % get all non-button elements with 'text' property
%
% Sample usage:
% hButton = uicontrol('string','click me');
% jButton = findjobj(hButton,'class','pushbutton'); % or: jButton = findjobj(hButton,'not','class','panel');
% jButton.setFlyOverAppearance(1);
% jButton.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.HAND_CURSOR));
% set(jButton,'FocusGainedCallback',@myMatlabFunction); % some 30 callback points available...
% jButton.get; % list all changeable properties...
%
% hEditbox = uicontrol('style',edit');
% jEditbox = findjobj(hEditbox);
% jEditbox.setCaretColor(java.awt.Color.red);
% jEditbox.KeyTypedCallback = @myCallbackFunc; % many more callbacks where this came from...
% jEdit.requestFocus;
%
% Known issues/limitations:
% - Cannot currently process multiple container objects - just one at a time
% - Class filtering is a bit slow when the figure is laden with many UI components
% - Passing a simple container object is currently filtered by its position+size: should find a better way to do this
% - In the 'print'/'list' option, only the first of the returned java elements is listed, and the list is unfiltered
% - 'print'/list' sends output to the Matlab command window - can't easily be captured into a string variable
%
% Warning:
% This code heavily relies on undocumented and unsupported Matlab functionality. It works on Matlab 7+, but
% use at your own risk!
%
% Bugs and suggestions:
% Please send to Yair Altman (altmany at gmail dot com)
%
% See also:
% java, handle, findobj, findall
% License to use and modify this code is granted freely to all interested, as long as the original author is
% referenced and attributed as such. The original author maintains the right to be solely associated with this work.
% Programmed and Copyright by Yair M. Altman: altmany(at)gmail.com
% $Revision: 1.1 $ $Date: 2007/03/16 15:52:13 $
% Ensure Java AWT is enabled
error(javachk('awt'));
persistent pContainer pHandles pLevels pParentIdx pClasses pPositions
% Initialize
handles = handle([]);
levels = [];
parentIdx = [];
classes = {};
positions = [];
% Default container is the current figure's root panel
if nargin
if isempty(container) % empty container - bail out
return;
elseif ischar(container) % container skipped - this is part of the args list...
varargin = {container, varargin{:}};
container = getRootPanel(gcf);
elseif ishghandle(container) % && ~isa(container,'java.awt.Container')
container = container(1); % another current limitation...
if ~isa(handle(container), 'figure')
% See limitations section above: should find a better way to directly refer to the element's java container
pos = round(getpixelposition(container,1));
varargin = {'position',pos(1:2), 'size',pos(3:4), 'not','class','java.awt.Panel', varargin{:}};
end
container = getRootPanel(ancestor(container,'figure'));
end
else
container = getRootPanel(gcf);
end
% Check persistency
if isequal(pContainer,container)
% persistency requested and the same container is reused, so reuse the hierarchy information
[handles,levels,parentIdx,classes,positions] = deal(pHandles, pLevels, pParentIdx, pClasses, pPositions);
else
% Traverse the container hierarchy and extract the elements within
[handles,levels,parentIdx,classes,positions] = traverseContainer(container,0,1,handles,levels,parentIdx,classes,positions);
%handles = cellfun(@(h)handle(h,'callbackproperties'),handles,'uniformoutput',false);
%classes = cellfun(@char,classes,'uniformoutput',false);
end
% Process persistency check
if any(~cellfun('isempty',regexpi(varargin(cellfun(@ischar,varargin)),'^-?persist')))
[pContainer, pHandles, pLevels, pParentIdx, pClasses, pPositions] = deal(container,handles,levels,parentIdx,classes,positions);
end
% Process optional args
% Note: positions is NOT returned since it's based on java coord system (origin = top-left): will confuse Matlab users
[handles,levels,parentIdx,classes,positions] = processArgs(varargin,handles,levels,parentIdx,classes,positions,container); %#ok
%% get Java reference to top-level (root) panel
function jRootPane = getRootPanel(hFig)
jFrame = get(hFig,'JavaFrame');
jFigPanel = get(jFrame,'FigurePanelContainer');
try
jRootPane = jFigPanel.getComponent(0).getRootPane;
catch
% Never mind - FigurePanelContainer is good enough in 99% of cases... (menu/tool bars won't be accessible, though)
jRootPane = jFigPanel;
end
%% traverseContainer - traverse the container hierarchy and extract the elements within
function [handles,levels,parentIdx,classes,positions] = traverseContainer(container,level,parent,handles,levels,parentIdx,classes,positions)
% Record the data for this node
handles(end+1) = handle(container,'callbackproperties');
levels(end+1) = level;
parentIdx(end+1) = parent;
classes{end+1} = container.getClass;
positions(end+1,:) = [container.getX, container.getY];
if level>0
positions(end,:) = positions(end,:) + positions(parent,:);
if level>1 && isa(container,'com.mathworks.hg.peer.FigureComponentContainer') && ...
strcmp(container.getName,'fComponentContainer') % there are 2 FigureComponentContainers - only process one...
% restart coordinate system, to exclude menu & toolbar areas
positions(end,:) = positions(end,:) - [container.getRootPane.getX, container.getRootPane.getY];
end
end
parentId = length(parentIdx);
% Now recursively process all this node's children (if any)
%if isa(container,'java.awt.Container')
try % try-catch is faster than checking isa(container,'java.awt.Container')...
for child = 1 : container.getComponentCount
[handles,levels,parentIdx,classes,positions] = traverseContainer(container.getComponent(child-1),level+1,parentId,handles,levels,parentIdx,classes,positions);
end
catch
% do nothing - probably not a container
return; % debuggable point
end
%% Process optional args
function [handles,levels,parentIdx,classes,positions] = processArgs(varargin,handles,levels,parentIdx,classes,positions,container)
% Initialize
invertFlag = false;
% Loop over all optional args
while ~isempty(varargin) && ~isempty(handles)
% Process the arg (and all its params)
foundIdx = 1 : length(handles);
if iscell(varargin{1}), varargin{1} = varargin{1}{1}; end
switch lower(varargin{1})
case {'not','-not'}
invertFlag = true;
case {'position','-position'}
[varargin,foundIdx] = processPositionArgs(varargin,handles,positions,container);
if invertFlag, foundIdx = ~foundIdx; invertFlag = false; end
case {'size','-size'}
[varargin,foundIdx] = processSizeArgs(varargin,handles);
if invertFlag, foundIdx = ~foundIdx; invertFlag = false; end
case {'class','-class'}
[varargin,foundIdx] = processClassArgs(varargin,classes);
if invertFlag, foundIdx = ~foundIdx; invertFlag = false; end
case {'property','-property'}
[varargin,foundIdx] = processPropertyArgs(varargin,handles);
if invertFlag, foundIdx = ~foundIdx; invertFlag = false; end
case {'depth','-depth'}
[varargin,foundIdx] = processDepthArgs(varargin,levels);
if invertFlag, foundIdx = ~foundIdx; invertFlag = false; end
case {'flat','-flat'}
varargin = {'depth',0, varargin{min(2:end):end}};
[varargin,foundIdx] = processDepthArgs(varargin,levels);
if invertFlag, foundIdx = ~foundIdx; invertFlag = false; end
case {'print','-print','list','-list'}
varargin = processPrintArgs(varargin,handles);
case {'persist','-persist'}
% ignore - already handled in main fauntion above
otherwise
error('YMA:findjobj:IllegalOption',['Option ' varargin{1} ' is not a valid option. Type ''help ' mfilename ''' for the full options list.']);
end
% Filter the results
foundIdx = find(foundIdx);
handles = handles(foundIdx);
levels = levels(foundIdx);
parentIdx = parentIdx(foundIdx);
classes = classes(foundIdx);
positions = positions(foundIdx,:);
% Remove this arg and proceed to the next one
varargin(1) = [];
end
%% Process 'print' option
function varargin = processPrintArgs(varargin,handles)
if length(varargin)<2 || ischar(varargin{2})
% No second arg given, so use the first available element
container = handles(1);
else
% Get the element to print from the specified second arg
if isnumeric(varargin{2}) && (varargin{2} == fix(varargin{2})) % isinteger doesn't work on doubles...
if (varargin{2} > 0) && (varargin{2} <= length(handles))
container = handles(varargin{2});
elseif varargin{2} > 0
error('YMA:findjobj:IllegalPrintFilter','Print filter index %g > number of available elements (%d)',varargin{2},length(handles));
else
error('YMA:findjobj:IllegalPrintFilter','Print filter must be a java handle or positive numeric index into handles');
end
elseif ismethod(varargin{2},'list')
container = varargin{2};
else
error('YMA:findjobj:IllegalPrintFilter','Print filter must be a java handle or numeric index into handles');
end
varargin(2) = [];
end
container.list; % can't be captured by Matlab...
%% Process 'position' option
function [varargin,foundIdx] = processPositionArgs(varargin,handles,positions,container)
if length(varargin)>1
positionFilter = varargin{2};
if ismethod(positionFilter,'getLocation')
% java object passed - get its position
if ismethod(positionFilter,'getLocation')
positionFilter = positionFilter.getLocation;
else
error('YMA:findjobj:IllegalPositionFilter','Position filter must be a java UI component, or X,Y pair');
end
elseif ~isscalar(positionFilter)
% position vector passed
if (length(positionFilter)>=2) && isnumeric(positionFilter)
% Remember that java coordinates start at top-left corner, Matlab coords start at bottom left...
positionFilter = java.awt.Point(positionFilter(1), container.getHeight - positionFilter(2));
% Check for full Matlab position vector (x,y,w,h)
if (length(positionFilter)==4)
varargin{end+1} = 'size';
varargin{end+1} = positionFilter(3:4);
end
else
error('YMA:findjobj:IllegalPositionFilter','Position filter must be a java UI component, or X,Y pair');
end
elseif length(varargin)>2
% x,y passed as separate arg values
if isnumeric(positionFilter) && isnumeric(varargin{3})
% Remember that java coordinates start at top-left corner, Matlab coords start at bottom left...
positionFilter = java.awt.Point(positionFilter, container.getSize.getHeight - varargin{3});
varargin(3) = [];
else
error('YMA:findjobj:IllegalPositionFilter','Position filter must be a java UI component, or X,Y pair');
end
else
error('YMA:findjobj:IllegalPositionFilter','Position filter must be a java UI component, or X,Y pair');
end
%foundIdx = ~arrayfun(@(b)(invoke(b,'contains',positionFilter))); % ARGH! - disallowed by Matlab!
foundIdx = zeros(1,length(handles));
for componentIdx = 1 : length(handles)
%foundIdx(componentIdx) = handles(componentIdx).getBounds.contains(positionFilter);
%foundIdx(componentIdx) = handles(componentIdx).getLocationOnScreen.distanceSq(positionFilter) < 50; % fails for invisible components...
p = java.awt.Point(positions(componentIdx,1), positions(componentIdx,2) + handles(componentIdx).getHeight);
foundIdx(componentIdx) = p.distanceSq(positionFilter) < 50; % i.e., no farther than 7 pixels away (prevents rounding errors)
end
varargin(2) = [];
end
%% Process 'size' option
function [varargin,foundIdx] = processSizeArgs(varargin,handles)
if length(varargin)>1
sizeFilter = lower(varargin{2});
if ismethod(sizeFilter,'getSize')
% java object passed - get its size
if ismethod(sizeFilter,'getSize')
sizeFilter = sizeFilter.getSize;
else
error('YMA:findjobj:IllegalSizeFilter','Size filter must be a java UI component, or W,H pair');
end
elseif ~isscalar(sizeFilter)
% size vector passed
if (length(sizeFilter)>=2) && isnumeric(sizeFilter)
sizeFilter = java.awt.Dimension(sizeFilter(1),sizeFilter(2));
else
error('YMA:findjobj:IllegalSizeFilter','Size filter must be a java UI component, or W,H pair');
end
elseif length(varargin)>2
% w,h passed as separate arg values
if isnumeric(sizeFilter) && isnumeric(varargin{3})
sizeFilter = java.awt.Dimension(sizeFilter,varargin{3});
varargin(3) = [];
else
error('YMA:findjobj:IllegalSizeFilter','Size filter must be a java UI component, or W,H pair');
end
else
error('YMA:findjobj:IllegalSizeFilter','Size filter must be a java UI component, or W,H pair');
end
%foundIdx = ~arrayfun(@(b)(invoke(b,'contains',sizeFilter))); % ARGH! - disallowed by Matlab!
foundIdx = zeros(1,length(handles));
for componentIdx = 1 : length(handles)
foundIdx(componentIdx) = handles(componentIdx).getBounds.getSize.equals(sizeFilter);
end
varargin(2) = [];
end
%% Process 'class' option
function [varargin,foundIdx] = processClassArgs(varargin,classes)
if length(varargin)>1
classFilter = lower(varargin{2});
if ismethod(classFilter,'getClass')
classFilter = char(classFilter.getClass);
elseif ~ischar(classFilter)
error('YMA:findjobj:IllegalClassFilter','Class filter must be a java object, class or string');
end
classesStr = cellfun(@char,classes,'uniformoutput',false);
foundIdx = ~cellfun('isempty',regexpi(lower(classesStr),lower(classFilter)));
varargin(2) = [];
end
%% Process 'property' option
function [varargin,foundIdx] = processPropertyArgs(varargin,handles)
if length(varargin)>1
property = lower(varargin{2});
if ~ischar(property)
error('YMA:findjobj:IllegalPropertyFilter','Property filter must be a string (case insensitive name of property)');
end
%foundIdx = arrayfun(@(h)isprop(h,property),handles,'uniformoutput',false); % ARGH! - disallowed by Matlab!
foundIdx = zeros(1,length(handles));
for componentIdx = 1 : length(handles)
foundIdx(componentIdx) = isprop(handles(componentIdx),property);
end
varargin(2) = [];
end
%% Process 'depth' option
function [varargin,foundIdx] = processDepthArgs(varargin,levels)
if length(varargin)>1
level = varargin{2};
if ~isnumeric(level)
error('YMA:findjobj:IllegalDepthFilter','Depth filter must be a number (=maximal element depth)');
end
foundIdx = (levels <= level);
varargin(2) = [];
end
<APPLICROOT>\Melissa2006
27-Oct-2007 09:51:52
30736 bytes
test - hulpfunctie voor jacontrol testroutines
<TOOLBOX>\jacontrol\@jacontrol
13-Mar-2008 19:10:42
4325 bytes
text - overloaded function for text store stack for use with guibrowser
<TOOLBOX>\debug
10-Jan-2007 14:37:34
274 bytes
CALL
[hwin,cp] = ticp(hwin)
[hwin,cp,props] = ticp(hwin)
[hwin,cp] = ticp
[hwin,cp,props] = ticp
INPUT
hwin: window handle
OUTPUT
hwin : window handle, defaults to gcf
cp : new pointer
props : other suspended properties
+----WindowButtonMotionFcn
IMPORTANT NOTE
The behavior of this function depends on the number of output
arguments: when nargout>2 also the WindowButtonMotionFcn will be
suspended
EXAMPLE (simple)
ticp;
<various actions>
tocp;
EXAMPLE (thorough)
[hwin,cp]=ticp;
try
<various actions>
tocp(hwin,cp);
catch
tocp(hwin,cp);
rethrow(lasterror);
end
See also
ticpeval
<TOOLBOX>
20-Feb-2008 10:19:06
1245 bytes
callback that changes pointer while executing
CALL
The function is designed to be used as apart of a HG callback. See
example.
INPUT
obj,event: arg1 and arg2 to be passed to function fp
fp: function handle or function name
varargin: arg3, arg4, etc. To be passes to fp
OUTPUT
none
EXAMPLE 1
OLD CODE:
set(h,'callb',{@myfunc,arg1,arg2}
NEW CODE:
set(h,'callb',{@ticpeval,@myfunc,arg1,arg2}
EXAMPLE 2
OLD CODE:
ticp
result=funcname(input)
tocp
NEW CODE:
result=ticpexec(@funcname,input1,input2)
See also
ticp,tocp, ticpexec
<TOOLBOX>
20-Feb-2008 22:59:34
926 bytes
tijd2zomertijd - converteer tijdmatrix naar matrix die rekening houdt met
zomertijd
CALL:
[t, zomertijd] = tijd2zomertijd(t)
INPUT:
t: matrix met datenum tijdaanduiding
als t=='compute': display een string die naar deze functie
gekopieerd kan worden. Dit is nodig indien zomertijd conventies
veranderen.
OUTPUT:
t: matrix met datenum tijdaanduiding, rkenening houdende met zomertijd.
zomertijd: matrix met afmetingen van t zomertijd(i,j)=1 als t(i,j) valt in zomertijd periode
OUTPUT NAAR SCHERM:
door t=='compute' als argument mee te geven
kan een uitvoer string op het scherm geplot worden die weer in programma
gekopieerd kan worden (eventueel na aanpassing)
APPROACH:
Voor elk element van de matrix t:
Bepaal het jaar van de laatste start van de zomertijd.
Bepaal wanneer de zomertijd in dat jaar afloopt.
Vergelijk dit met het huidige element van t.
Indien zomertijd van toepassing, tel dan 1 uur bij element op.
Opmerking 1: de matrix 'Tbl' bevat voor elk jaar het begin en einde
van de zomertijd IN STANDAARD TIJDEENHEID (dus zonder correctie
voor zomertijd)
Opmerking 2: Deze code is niet gevectoriseerd. Een versnelling
kan desgewenst bewerkstelligd worden door optimalisatie van de code.
Voor de huidige toepassing is dit echter niet interessant.
<APPLICROOT>\melissa2006\GETIJBEHEER
13-Feb-2007 14:10:52
5279 bytes
time2hours - converteer tijdstring naar uren CALL: hours = time2hours(time) INPUT: time: <string> tijd met format: 'HH:mm' OUTPUT: hours: <double> tijd in uren APPROACH: de tijd in de vorm 'HH:mm' wordt omgezet in uren en uurdelen, b.v. '20:45' -> 20.75 '2:15' -> 2.25
<APPLICROOT>\Melissa2006
02-Jan-2007 19:12:02
433 bytes
toStr - convert object to string representation
CALL:
value = toStr(value)
INPUT
value: any matlab variable
OUTPUT
string: <string>
corresponding string repersentation
<TOOLBOX>
16-Aug-2008 15:23:51
2147 bytes
toString - convert java object, cellstring or char array to string
CALL:
S = toString(S)
INPUT:
S: <cell string>
<char array>
<java object>
OUTPUT:
S: <string>
See also: xml, xml/xpath, xml/subsasgn
<TOOLBOX>\xml_toolbox\@xml\private
08-Jun-2006 08:44:10
653 bytes
CALL
tocp
tocp(hwin)
tocp(hwin,cp)
tocp(hwin,cp,props)
INPUT
hwin: window handle
cp: new pointer
EXAMPLE
[hwin,cp]=ticp;
<various actions>
tocp(hwin,cp);
OR
ticp;
<various actions>
tocp;
<TOOLBOX>
20-Feb-2008 10:17:13
536 bytes
transact_gui - display transactions in GUI
CALL:
transact_gui(data,event,fp_getdata,C)
INPUT:
data: if nargin==1: this is the databse
fp_getdata: function pointer to function that returns database structure.
This can be a 3 line function like:
function db=getdata
global MAINWIN %handle of application's main window
db=get(MAINWIN,'userdata')
C: structure with GUI constants (colors, fontsize, etc.). If not specified, default settings are used.
OUTPUT:
Updated comments
This function offers the option of modifying the comments fields of any transaction.
The function mbdstore(db) is used to register these changes.
See mbdundoobj.m : storehandle and storefield should be set when mbdundoobj is called to make this work
Example
MAINWIN=create_fig(...)
data=struct(....)
db=mbdundoobj(data,'storehandle',MAINWIN,'storefield','userdata')
ASCII or HTML report
EXAMPLE
%install:
transact_gui([],[],@fp_getdata,C)
%update from database:
%====================================
%update transaction log
if ~isempty(findobj('tag','win_trnsct'))
transact_gui(db);
end
%====================================
See also: logbookentry
<TOOLBOX>
16-Aug-2008 19:05:55
17007 bytes
transact_update - display transactions in GUI
SUMMARY
This function checks if the logbook GUI is posted. If it is, it will
update this GUI. transact_update is typically called from
displayfunctions in various applications. The objective is to update
the logbook GUI is you leave this open for a longer time. If the
logbook screen is modal, you may avoid calling this function, because
the database cannot be modified as long as the logbook is posted.
CALL:
transact_update(data,ind)
INPUT:
data: database
ind: subsref structure or string with value 'aal' or 'item'
in case ind='all': all field will be updated
in case ind='item': only the transaction list will be updated
OUTPUT:
geen directe uitvoer
EXAMPLE
transact_update(udnew,'all');
<TOOLBOX>
16-Aug-2008 12:31:12
7091 bytes
truecolor - Maak een Matlab truecolor map uit een lineaire
color map.
CALL:
cdata = truecolor(x,map)
INPUT:
x: lineaire color map (indices in colormap)
map: colormap waar x naar verwijst
OUTPUT:
cdata: truecolor 3 dim array voor gebruik als cdata property van button.
APPROACH:
x is een vector van indices in map.
Maak een array bestaande uit color vectoren uit map.
Gebruik RESHAPE om dit array om te vormen tot een 3
dimensioneel array.
NOTE:
uint8 is much more compact than double.
Inefficient code:
cdata=truecolor(x,map)
Efficient code:
cdata=truecolor(x,uint8(255*map))
<TOOLBOX>
09-Jan-2007 15:55:50
955 bytes
uicontrol - overloaded function for uicontrol store stack information
with uicontrol object
CALL:
h = uicontrol(varargin)
INPUT:
see uicontrol
OUTPUT:
see uicontrol
APPROACH:
the application property 'stack' will be set
See also: debugmenu
<TOOLBOX>\debug
26-Mar-2008 13:39:26
3673 bytes
UIGETFOLDER Standard Windows browse for folder dialog box.
CALL
folder = uigetfolder(title, initial_path)
INPUT
title
title string (OPTIONAL)
initial_path
initial path (OPTIONAL, defaults to PWD)
OUTPUT
folder
selected folder (empty string if dialog cancelled)
EXAMPLE
folder = uigetfolder - default title and initial path
folder = uigetfolder('Select results folder') - default initial path
folder = uigetfolder([], 'C:\Program Files') - default title
See also: UIGETFILE, UIPUTFILE, UIGETDIR, SELECTDIR
NOTE:
uigetfolder has preceded uigetdir. After appropriate tsting calls to
uigetfolder should be replaced with calls to uigetdir
<TOOLBOX>
15-Aug-2008 13:39:04
1821 bytes
<TOOLBOX>
05-Nov-2001 11:31:50
7168 bytes
uimenu - overloaded function for uimenu store stack for use with
guibrowser
<TOOLBOX>\debug
09-Jul-2006 11:50:00
212 bytes
uipushtool - overloaded function for uipushtool store stack for use
with guibrowser
<TOOLBOX>\debug
09-Jul-2006 11:56:32
233 bytes
uitoggletool - overloaded function for uitoggletool store stack for use
with guibrowser
<TOOLBOX>\debug
09-Jul-2006 11:56:16
243 bytes
uitoolbar - overloaded function for uitoolbar store stack for use with
guibrowser
<TOOLBOX>\debug
09-Jul-2006 11:53:44
227 bytes
undo - undo modifications to undoredo object
CALL
obj=undo(obj,N)
INPUT
obj : undoredo object
N : number of undo steps (default: N=1)
OUTPUT
obj : updated undoredo object
See also: redo
<TOOLBOX>\matlabguru\@undoredo
15-Aug-2008 15:46:06
520 bytes
undobuttons - creeer standaard buttons voor schermen in Melissa
CALL:
undobuttons(Htool,present,SEPARATOR)
INPUT:
Htool: <handle> van de toolbar waarin de undobuttons moeten komen
present: <vector> van lengte 6 met vlaggen voor het wel/niet opnemen van
de volgende buttons:
- present(1): naar hoofdscherm
- present(2): naar databeheerscherm
- present(3): naar databeheerscherm
- present(4): naar getijbeheerscherm
- present(5): undo
- present(6): undo lijst
- present(7): reset undo lijst
- present(8): redo
SEPARATOR: <string> start met een separator, mogelijke waarden
- 'on'
- 'off'
OUTPUT:
geen directe output, buttons worden aangemaakt in de toolbars
<APPLICROOT>\melissa2006\HULPFUNCTIES
09-Jan-2007 13:02:00
3397 bytes
undomenu - execute undo, redo of undo-menu
CALL
undomenu(obj,event,operation,fp_getdata,HWIN)
NOTE: this is not a method of undoredo function, but a generally
accesible function
INPUT
obj,event: standaard Matlab callback arguments
operation
operation==1 ==> undo
operation==2 ==> redo
operation==3 ==> multiple undo/redo
als operation==3 verschijnt popuplijst waarin
gebruiker keuze aangeeft
operation==4 ==> reset undo/redo history
fp_getdata: function pointer to user-specified function that returns database structure.
This can be a 3 line function like:
function ud=getdata
global MAINWIN %handle of application's main window
ud=get(MAINWIN,'userdata')
HWIN: input argument for fp_getdata (usually figure handle)
USER INPUT
selectie in undolist scherm
OUTPUT NAAR SCHERM
geen
APPROACH
operation==1 ==> undo
Dit gebeurt met object method UNDO
operation==2 ==> redo
Dit gebeurt met object method REDO
operation==3 ==> multiple undo/redo
Dit gebeurt met object methods UNDO en REDO
<TOOLBOX>\matlabguru
14-Aug-2008 14:31:30
2309 bytes
undoredo - constructor for undoredo object
CALL:
mbdundoobj(data,<property1>,<value1>,<property2>,<value2>,...)
INPUT
data: initial data content of undoredo object
PROPERTIES:(BY CATEGORY, ALL PROPERTIES ARE OPTIONAL)
Display properties
- displayfunction: function to call when content of undoredo object changes
Possible values : string with name of function or function-pointer
Default value : '' (no display function will becalled)
Remark : this function is called in the following way:
feval(signature,update,data,queued);
with:
update: function (string or pointer)
data : full data structure
queued: cell array containing information on modified fields
- signature: approximate time of object creation. Used as a reference
to the undoredo object (without requiring to pass on
the full object and its data). Signatureis passed on to
the objects displayfunction). Specify this property if
the content of the workspace is replaced, but no new
call is applied.
Autobackup properties
- backupfile: name of autobackup file (empty string: do not make backups)
Possible values : char str (Current path will be added to
filename)
Default value : '' (no automatic backups)
See also : ur_cleanupdisk
- timeoflastbackup: moment of last backup
Possible values : Matlab datenum
Default value : now()
- backupinterval: time between timed backups (1/1440= 1 minute)
Possible values : Any numeric value>0
Default value : 10/1440 (10 minutes between backups)
Undo/Redo properties
- mode: undo mode
Possible values : 'simple', 'memory', 'cached'
Simple: No undo. Use this option is no
undo is required.
memory: undo info stored in memory. Use
this option if no massive datasets are
needed
cached: undo info cached to disk if
needed. Use this option if
workspace contains many MB
Default value : 'memory'
Undo/Redo properties (continued)): Autocache properties
- cachefile: (applies only if mode=='cached')
Possible values : char str
Default value : 'urcache'
See also : ur_cleanupdisk
Remark : the name of the cache files will be derived from this parameter
- maxbytes : maximum number of bytes stored in memory before saving to disk
Possible values : integers>0
Default value : 64 Mb
Autostore properties
- storehandle: handle of GUI object with which undoredo object is saved
Possible values : a valid handle of a GUI object (for example a figure handle)
Default value : []
See also : mbdstore
- storefield: name of application data field to store undo redo object in
Possible values : char array
Default value : ''
See also : mbdstore
Remark : setting storefield=='userdata' causes undoredo data to be saved as:
set(storehandle,'userdata',obj)
setting storefield~='userdata' causes undoredo data to be saved as:
setappdata(storehandle,storefield,obj)
Other properties
- comitted: commited to disk. This value is set to 0 if contents of undoredo changes
Possible values : 0,1
Default value : 1
See also : iscommited, setcomitted
Remark : if this parameter equals zero, there may be unsaved data
OUTPUT
obj: undoredo object
obj.history: all data that is needed to perform
undo and redo actions on object
obj.data: data contentst of object
EXAMPLE
u=mbdundoobj(struct('field1',1','field2',2),...
'backupfile',C.autosave,...
'backupinterval',C.backupint',...
'displayfunction',@guishow,...
'storehandle',gcf,...
'storefield','undodata');
mbdstore(u); %store data
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 16:02:22
5437 bytes
THIS METHOD IS FOR INTERNAL USE IN UNDOREDO TOOLBOX
CALL
status=undostatus(obj)
INPUT
obj: undo structure
OUTPUT
status: structure with undo information
status.selected: currently selected item
status.list: char array with menu choices
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:25:27
1448 bytes
undovalue - evaluate value of undo object for specific transaction number
CALL
obj=mbdvalue(obj,targetstep)
INPUT
obj: undo object
obj.history.cur_transact: currently completed step
targetstep: number of modifications to include
OUTPUT
obj: undoredo object after applying required undo/redo operations
NOTE
undovalue and mbdvalue seem identical, mbdvalue needs to be removed
eventually
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:27:55
8890 bytes
unique - restrict the table to unique rows
CALL:
[B,I,J] = unique(obj,varargin)
INPUT:
obj: <table-object>
varargin: <string> (optional) with table columnnames
default: all fields
OUTPUT:
B: <table-object> with only the unique rows
if nargin > 1 restricted to the specified columns
I: <table-object> index such that B = obj(I);
J: <table-object> index such that obj = B(J);
See also: table, table/selectIndex, table/selectKey, unique
<TOOLBOX>\@table
17-Sep-2006 19:43:10
1340 bytes
updateCombinatie - werk het groep veld van de diablokken bij
CALL:
db = updateCombinatie(db)
INPUT:
db: <undoredo object> met de centrale Melissa database
OUTPUT:
db: <undoredo object> met de centrale Melissa database waarin het
combinatie veld van de diablokken is
geactualiseerd
See also: get_db_melissa, mel_cmb_load
<APPLICROOT>\melissa2006\HULPFUNCTIES
12-Dec-2006 07:15:10
1204 bytes
updateGroep - werk het groep veld van de diablokken bij
CALL:
db = updateGroep(db)
INPUT:
db: <undoredo object> met de centrale Melissa database
OUTPUT:
db: <undoredo object> met de centrale Melissa database waarin het groep
veld van de diablokken is geactualiseerd
See also: get_db_melissa, mel_vlg_load
<APPLICROOT>\melissa2006\HULPFUNCTIES
12-Dec-2006 03:23:12
779 bytes
ur_assign - equal to subsasgn
SUMMARY
Before undoredo class was defined, undo functionality was implemented
by the mbdundo function. The method ur_assign works on the objects
created in this way, and still may exist in some code.
NOTE
Any call to ur_assign should be replaced by equivalent call to subsasgn
CALL/INPUT/OUTPUT
see undoredo/subsasgn
<TOOLBOX>\matlabguru\@undoredo
17-Aug-2008 16:10:05
549 bytes
ur_cleanupdisk - delete all cache- and autosave files that belong to object
CALL
ur_cleanupdisk(obj)
INPUT
obj
undoredo object. Cache files and backup files will be deleted
OUTPUT
none
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:30:11
594 bytes
ur_deletecache - delete all cache files from disk
CALL
ur_deletecache(obj)
INPUT
obj: undoredo object. Cache files will be detected and deleted
OUTPUT
none
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:31:36
713 bytes
NOTE: this function will be phased out and will be replaced by evaldepend this function is intentionally left undocumented
<TOOLBOX>\matlabguru\@undoredo
09-Aug-2008 15:22:38
2253 bytes
lm_childframes - list the child-frames directly below a given frame CALL: h_frames = lm_childframes(hframe) INPUT: hframe: handle of the parent frame (scalar) OUTPUT: h_frames: list of handles of child frames
<TOOLBOX>\MBDresizedir
11-Aug-2008 22:44:06
806 bytes
ur_getopt - initialize GUI options by reading them from file
SUMMARY
User preferences are settings that apply to the appearance of a
specific figure. When a figure is closed and opened later on users
typically expect that the figure re-appears with identical settings.
To accomplish this, the user preferences should be saved when the figure
closes and loaded again when the figure is created. Saving the data can
best be doen in the figure's deletefunction. Loading the data typically
is done in a function that by convention has the name "initOpt" (but any
other name is allowed)
This function initializes the data structure that represents the user
preferences. This is done in 3 steps:
• create a structure that contains the factory defaults. This is to make
sure that no errors will occur if the figure is openened for the first
time;
• load the user preference s as saved when the figure was closed last
time (see function template "deletef"), and overwrite the factory
defaults with the values that are loaded from file. This is done by the
function "ur_getopt";
• set any values that are specific for the current session. For example,
you may store object handles in the user-preference structure.
CALL
opt=ur_getopt(defopt,OPTFILE,varname)
INPUT
defopt : default options (current function overwerites these)
OPTFILE: binary file in which options have been saved earlier
varname: variable name in which options are stored (defaults to "opt)
OUTPUT
opt: options structure in which data from defopt and OPTFILE are combined
SEE ALSO
ur_cleanupdisk
EXAMPLE
Specify this delete function:
function deletef(obj,event)
% <do standard delete function stuff>
OPTFILE='options.stt';
db_settings=getappdata(obj,'undodata'); %read undoredo object "settings"
opt=db_settings.data; %fill opt structure
save(OPTFILE,'opt');
ur_cleanupdisk(db_settings); %(optional if undoredo writes to disk)
Specify this initopt function:
function opt=initopt
OPTFILE='options.stt'; %define file name
defopt=struct('field1',100,'field2',200); %define default options
opt=ur_getopt(defopt,OPTFILE); %use saved options
opt.nondefaultfield=300; %define non default option
When GUI starts, set undoredo object with:
setappdata(gcf,'undodata',mbdundoobj(initopt))
<TOOLBOX>\matlabguru\undoredocopy
17-Aug-2008 18:04:49
3211 bytes
ur_load - load data from file for undoredo object
CALL
data=ur_load(obj,cache_nr,type)
INPUT
obj
undoredo object
cache_nr
number of cache file
type
type of cache file
OUTPUT
data
retrieved data
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:34:12
984 bytes
ur_save - save cache data data: use correct file- and variable name
CALL
ur_save(obj,cache_nr,type,data)
INPUT
obj:
undoredo object
cache_nr:
cache file number
type:
cache file type
data:
data that need saving
OTPUT
none
<TOOLBOX>\matlabguru\@undoredo\private
17-Aug-2008 17:36:16
1083 bytes
utilspath - return string containing path to utils directort
CALL
pth=utilspath
INPUT
none
OUTPUT
pth: string containing path to utils directort
See also: modelitpath
<TOOLBOX>
28-Jul-2008 22:03:24
372 bytes
validval - make sure uicontrol with style listbox has valid values for
attributes "val" and "ListboxTop"
CALL
vl=validval(hlist,center)
INPUT
hlist: handle van uicontrol object
center: center selected values (default: 0)
OUTPUT
attributes "val" and "ListboxTop" are modified if needed
<TOOLBOX>
15-Aug-2008 16:35:44
2493 bytes
varargin2struct - convert value-pair combinations to structure
CALL:
defaultOptions = varargin2struct(defaultOptions,ValidProps,...
PROPERTY1,VALUE1,PROPERTY2,VALUE2,...)
defaultOptions = varargin2struct(defaultOptions,ValidProps,...
PROPERTY1,VALUE1,OPTSTRUCT,...)
INPUT:
defaultOptions: Struct with default values
ValidProps: Allowable fields
PROPERTY,VALUE: Property-Value pairs
and/or
OPTSTRUCT: Option structure that stores property value pairs
+----PROPERTY1=VALUE1
+----PROPERTY2=VALUE2
OUTPUT:
Options: structure waarin alle velden zijn overschreven waarvoor
invoer beschikbaar is
EXAMPLE:
function do_some(varargin)
defaultOptions=struct('a',1,'b',2);
Options=varargin2struct(defaultOptions,fieldnames(defaultOptions),varargin{:});
See also: getproperty
<TOOLBOX>
26-Jun-2008 16:03:39
3971 bytes
varsize - compute the approximate size occupied by Matlab variable
CALL
sz=varsize(S)
INPUT
S: Matlab variable
OUTPUT
sz: size in number of bytes
<TOOLBOX>
15-Aug-2008 16:52:05
2034 bytes
<TOOLBOX>\matlabguru\@arglist
12-Jun-2007 14:14:10
28 bytes
view - convert the xml-object into a string CALL: view(obj) S=view(obj) INPUT: obj: <xml-object> OUTPUT: S: <string> with the xml-document EXAMPLE: %create an xml from a sourcefile obj = xml(fullfile(pwd,'examples','books.xml')) view(obj) See also: xml, xml/save, xml/inspect
<TOOLBOX>\xml_toolbox\@xml
08-Jul-2008 16:03:11
553 bytes
vulhiaat - vervang hiaten door V waarde
CALL:
vulhiaat(obj, event, sorttable)
INPUT:
obj: <handle> van de 'calling' uicontrol, (niet gebruikt)
event: <leeg> standaard argument van een callback (niet gebruikt)
sorttable: <jacontrol> (optioneel) lijst met geselecteerde reeksen
APPROACH:
Selecteer alle perioden waarvoor geldt:
- <als optie is all: code berekenen==1>
- W is Hiaat
- validatiestatus is 0
- V is niet hiaat
Doe voor deze periodes:
- Vervang W door V
- zet statusW op geextrapoleerd
- zet outlierstatus op OK
- zet validatiestatus op 1
Schrijf gegevens weg naar database onder vermelding van het aantal
mutaties.
<APPLICROOT>\melissa2006\FUNCTIES
16-Oct-2007 06:04:04
2216 bytes
width - get matrix width, shortcut for size(str,2)
CALL
w=width(str)
INPUT
str: matrix
OUTPUT
w: matrix width
SEE ALSO: size, length, height
<TOOLBOX>
16-Sep-2006 10:10:13
237 bytes
windowposV7 - position figure on desktop. This function supersedes
windowpos
CALL:
windowposV7(HWIN,NormPos,LMARGE)
INPUT:
HWIN: <handle> figure handle
NormPos <vector of double> required position in normalized coordinates
LMARGE <integer> required margin below (in pixels)
OUTPUT:
this function changes the "outerposition" property of HWIN
REMARK:
First install all menu's and toolbars, as these change the
figure's outerposition, then call this function
EXAMPLE:
figure
Htool = uitoolbar;
uimenu(HWIN,'label','file');
windowposV7(HWIN,[0 0 1 1],20);
See also: windowpos
<TOOLBOX>
11-Jan-2007 13:01:18
1440 bytes
writeasciimodel - schrijf de modellen in het werkgebied weg als
een .stf bestand
CALL:
writeasciimodel(filename,model)
INPUT:
filename: <string> de naam van het .stf bestand
net: <cell array> met modellen zie o.a. emptystruct('regressie')
OUTPUT:
geen directe uitvoer, de modellen zijn in een ascii-bestand
weggeschreven
See also: readasciimodel
<APPLICROOT>\melissa2006\MODELBEHEER
09-Oct-2007 15:06:48
2803 bytes
writedia - Write DIA structure to file.
CALL:
succes = writedia_R14(S, fname)
INPUT:
S:
Dia structure to save, fields:
Dia Structure, with fields:
+----IDT
| +----sFiltyp (char)
| +----sSyscod (char)
| +----lCredat (double)
| +----sCmtrgl (char)
+----blok
+----W3H (struct): see emptyW3H
+----MUX (struct): empty, see emptyMUX
+----TYP (struct): empty
+----RGH (struct): empty, see emptyRGH
+----RKS (struct): see emptyRKS
+----TPS (struct): empty, see emptyTPS
+----WRD (struct): see emptyWRD
fname:
String with the name of the file to create.
OUTPUT:
rc:
Integer returncode:
rc == 0 operation successful.
rc ~= 0 error, rc contains the DIM errorcode.
See also: readdia_R14
<TOOLBOX>\diaroutines
18-Aug-2008 12:10:00
3028 bytes
<TOOLBOX>\diaroutines
14-Aug-2008 10:06:34
98304 bytes
writestr - schrijf character array weg naar file
CALL
writestr(fname,str)
INPUT
fname : weg te schrijven file
str : weg te schrijven char array
OUTPUT
none
EXAMPLE
hwin=ticp
hwait=waitbar(0,'Generate report');
strs={};
for k=1:N
waitbar((k-.5)/N,hwait);
strs{end+1}=makeReportLine(k,....);
end
writestr(fname,strs(:)); <<<Note! vertical concatination is needed to
create multiline report
close(hwait);
tocp
SEE ALSO: readstr
<TOOLBOX>
20-Oct-2005 15:28:47
1351 bytes
xml - constructor for an xml-object
CALL:
obj = xml(FileName,isNameSpaceAware,isValidating)
INPUT:
FileName: <string> name of the sourcefile
<string> the xml string
<java-object> with a D(ocument) (O)bject (M)odel
<struct> a Matlab structure
isNameSpaceAware: <boolean> (optional) (default == 1) ignore namespaces
isValidating: <boolean> (optional) (default == 0) validate document
OUTPUT:
obj: <xml-object> with fields:
- DOM: <java object> the DOM object
- file: <string> the name of the xml source
- NS: <java object> a hashmap with namespace
definitions
N.B. obj is empty when an error occurred
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
inspect(obj)
%create an xml from a sourcefile
obj = xml(java.io.File(fullfile(pwd,'examples','books.xml')))
inspect(obj)
%create an xml from a Matlab structure
obj = xml(dir)
inspect(obj)
%create an xml directly from a string
str = '<book category="MATHS"><title lang="en">Nonlinear Programming</title><author>Dimitri P. Bertsekas</author></book>'
obj = xml(str)
inspect(obj)
%create an xml directly from an inputstream
obj = xml(java.io.FileInputStream((fullfile(pwd,'examples','books.xml'))))
inspect(obj)
%create an xml from a sourcefile and validate against a dtd (specified
%in the xml itself
obj = xml(fullfile(pwd,'examples','note_dtd.xml'),0,1)
%create an xml from a sourcefile and validate against a xsd (specified
%in the xml itself
obj = xml(fullfile(pwd,'examples','note_xsd.xml'),1,1)
See also: xml/view, xml/inspect
<TOOLBOX>\xml_toolbox\@xml
26-Jun-2008 11:03:01
7317 bytes
xml2struct - transform xml object to Matlab structure if contents of XML
permit this
CALL
s=xml2struct(obj)
INPUT
obj: XML object
OUTPUT
corresponding Matlab structure
NOTE
not all XML documents can be represented as a Matlab strucure if XML
contents do not fit the following error results:
"XML contents do not fit in Matlab structure"
<TOOLBOX>\xml_toolbox\@xml
17-Aug-2008 12:54:43
2139 bytes
xpath - carry out a set or get for an xml-object using xpath syntax
CALL:
S = xpath(obj,ind)
S = xpath(obj,ind,data)
INPUT:
obj: <xml-object>
ind: <struct array> with fields
- type: one of '.' or '()'
- subs: subscript values (field name or cell array
of index vectors)
<string> with an xpath expression
data: (optional) with the values to be put in the by ind defined
fields in the xml-object, allowed types:
- <struct> matlab structure
- <xml-object>
- <org.apache.xerces.dom.ElementImpl>
OUTPUT:
S: <cell array> in nargin == 2 (get is used)
<xml-object> if nargin == 3 (set is used)
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','books.xml'))
%select the book with title 'Harry Potter'
book = xpath(obj,'parent::/bookstore/book[title="Harry Potter"')
inspect(book{1})
See also: xml, xml/set, xml/get, xml/subsref, xml/subsasgn,
xml/private/buildXpath
<TOOLBOX>\xml_toolbox\@xml
26-Jun-2008 10:45:40
9923 bytes
xslt - transform the xml-object to html by using a stylesheet
CALL:
HTMLstring = xslt(obj,xsl,fileName)
INPUT:
obj: <xml-object>
xsl: <string> filename of the stylesheet
fileName: <string> (optional) the name of the file to which the HTML has
to be saved
OUTPUT:
HTMLstring: <string> to HTML transformed XML string
EXAMPLE:
%create an xml from a sourcefile
obj = xml(fullfile(pwd,'examples','cd_catalog.xml'))
HTMLstring = xslt(obj,fullfile(pwd,'examples','cd_catalog.xsl'))
%display in browser
web(['text://' HTMLstring]);
See also: xml, xml/save, web, xslt
<TOOLBOX>\xml_toolbox\@xml
13-Jun-2006 14:18:28
1705 bytes
zoomtool - install Modelit zoomtool
CALL
zoomtool
zoomtool(1)
zoomtool(1,option)
zoomtool(N,<property1>,<value1>,<property2>,<value2>,...)
zoomtool('set',hax,<property1>,<value1>,<property2>,<value2>)
INPUT
N: mode of operation
1 install zoom utility (default)
2 zoom in using rbbox
3 zoom back using history of zoom windows
3.1 Maximise X&Y
3.2 Maximise X
3.3 Maximise Y
4 clear zoom history
5 add current zoomwindow to menu
6 toggle sliders on/off
7 delete stored zoomwindows
8 temporaly disable zoom buttond
9 reinstall zoom buttond
10 zoom out (in this case axis&factor are supplied with arg2&arg3)
11 execute callback of memory menu(s) zoom to predefined values
arg2: contains [minx maxx miny maxy], use NaN if scaling is needed
12 execute callback of x slider
13 execute callback of y slider
14 set up X movie
16 force execution of synchronisation callback
17 pretend current view is result of zoom action (enables undo,
xsync, ysync, scale, move, etc)
option: structure of specific zoom settings
opt.axes : handle van zoom axes
opt.parent : uses 'axes' or 'window'(default: axes)
axes: install buttondown on axes
window: install windowbuttondown on figure
opt.xsync : handles of synchronized x-axes
opt.ysync : handles of synchronized y_axes
opt.patchsync : handle of patch object (usually in overview map)
opt.scale : string containing name of function to call after scaling coordinates
(will also be added to windowresize function)
WARNING: opt.scale installs a resize function on
top of current resize function. when axes is
deleted this resize function is not disabled
opt.move : string containing name of function to call after shifting coordinates
============
When ZOOMING on graph: first call opt.move, then call opt.scale
When RESIZE on window: only call opt.scale
When MOVE on grpah : only call opt.move
============
opt.shiftclick: function that is called after shift+click (windows)
example: opt.shiftclick='rbrect_init(1,0,''line'');'
opt.dblclick : function called when doubleclicked in axes
opt.leftclick : specify function (hint: to prevent zooming at left mouseclick specify ' ')
opt.xmovie : set to 'on' if Xmovie capability is needed (default: 'off')
opt.label : Label van hoofd menu (default: Zoom)
opt.visible : Label voor zoom 'on' or 'off'
opt.fa_zoom : if 1: keep fixed aspect ratio
opt.keypress : if 1: enable zooming by key press (this will
overwite keypress function for current window)
opt.wheel: if 0: disable mousewheel while zooming
if 1: enable mousewheel zooming (standard mode)
if <1: enable mousewheel zooming (slow)
if >1: enable mousewheel zooming (fast)
opt.xrange : zoom range (x-axis)
opt.yrange : zoom range (y-axis)
<TOOLBOX>
16-Aug-2008 13:58:40
50902 bytes