Source code documentation: MARIA
Manual pages overview and cross references
CmpRaaiLoc - bereken raai locatie m.b.v. W3H data
CALL:
raailocatie = CmpRaaiLoc(W3H)
INPUT:
W3H: <struct> met W3H blok
gebruikte velden:
sCrdtyp: Coordinaat type
lXcrdgs: X-coordinaat Globaal stelsel
lYcrdgs: Y-coordinaat Globaal stelsel
lRhoekg: Raaihoek in honderste graden vanaf het noorden
OUTPUT:
raailocatie: <vector of double> van de vorm:
[x-begin y-begin x-eind y-eind]
ApplicationRoot\ma
27-Sep-2005 12:22:24
981 bytes
ComposeDataheaderlist - stel een lijst met dataheaders samen die geschikt
is voor een java tabel
CALL:
Contents = ComposeDataheaderlist(datalist, fields)
INPUT:
datalist: <struct array> met dataheaders (zie b.v. readxyz)
fields: <cell array> met de namen van de op te nemen kolommen
OUTPUT:
reportstr: <char array> met de inhoud van de tabel
See also: emptyraai
ApplicationRoot\ma
02-Mar-2008 20:18:58
1912 bytes
ComposePuntlist - maak header en inhoud voor de lijst met raaipunten aan
CALL:
[reportstr,titlestr1,titlestr2] = ...
ComposePuntlist(C,xyloc,z,refz,status,HWIN)
INPUT:
opt: <ongebruikt>
C: <struct> met de morfologie constantes
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
z: <array of int32> met de raaidiepte
refz: <array of int32> met de referentiediepte (kan leeg zijn)
status: <array of uint8> met de status van elk raaipunt
HWIN: <handle> van huidige scherm
OUTPUT:
reportstr: <char array> met de inhoud van de tabel (uitgelijnd)
titlestr1: <char array> kop1 (uitgelijnd)
titlestr2: <char array> kop2 (uitgelijnd)
ApplicationRoot\ma
29-Feb-2008 14:26:34
4414 bytes
ComposeRaailist - stel een lijst met raaien samen die geschikt is voor
een java tabel
CALL:
Contents = ComposeRaailist(raailist, fields)
INPUT:
raaiarray: <struct array> met raaien
fields: <cell array> met de namen van de op te nemen kolommen
OUTPUT:
reportstr: <char array> met de inhoud van de tabel
See also: emptyraai
ApplicationRoot\ma
29-Feb-2008 16:29:52
6194 bytes
DTMpanel - maak het DTM scherm aan
CALL:
DTMpanel(obj, event, mode, varargin)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
mode: <string> mogelijke waarden:
'install' - installeer het paneel
'view' - teken het frame
varargin:
mode == 'install' -> zie define_panel(C,hframe,callbacks)
mode == 'view' -> view(udnew,opt,C,HWIN,WINDOW)
OUTPUT:
geen directe uitvoer, het DTMPanel is aangemaakt met de bijbehorende
uicontrols
ApplicationRoot\ma
14-Apr-2010 15:32:50
8543 bytes
ExportRaaien - exporteer raaien of grids uit werkgebied
CALL:
ExportRaaien(IDs,fname,ArrayName)
INPUT:
IDs: <array of double> IDs van de te exporteren raaien of grids
fname: <string> met de naam van het te creeeren bestand
ArrayName: <string> mogelijke waarden:
'raai'
'grid'
OUTPUT:
geen directe uitvoer, de grids of raaien zijn geexporteerd naar het
bestand met naam <fname>
ApplicationRoot\ma
14-Apr-2010 10:35:25
7710 bytes
ID2index - bepaal index van grid of raai met bekende ID(s)
CALL:
indx = ID2index(db,ID,fld)
INPUT:
db: <undoredo object> met de centrale maria database
ID: <array of double> met ID(s) van de grid(s)
fld: "raai" of "grid"
OUTPUT:
indx: <array of integer> met index(indices) van grid(s)
ApplicationRoot\ma
27-Jun-2008 16:18:19
679 bytes
IgnoreHiaat -
ApplicationRoot\ma
24-Jul-2007 11:20:38
1580 bytes
MetaInfoDlg - accepteer Meta Info of kies nieuwe headerfile INPUT: db: <struct> met de centrale database OUTPUT: db: <struct> met de centrale database met een aangepaste headerfile ok: <boolean> heeft de gebruiker gecanceled
ApplicationRoot\ma
18-Jul-2007 15:51:32
8594 bytes
Raai2OpenUitgang - creeer open uitgang data op basis van een enkele raai
CALL:
OpenUitgangData = Raai2OpenUitgang(raai)
INPUT:
raai: <struct> met een raai
OUTPUT:
OpenUitgangData: <matrix of double> met de data voor open uitgang file
kolom 1 -> x-coordinaat
kolom 2 -> diepte
kolom 3 -> verklaring herkomst
1 -> hoogte meting (*)
2 -> hoogtemeting overlappend met diep (**)
3 -> geinterpoleerde meetwaarde (*)
4 -> diepte meting overlappend met hoog (**)
5 -> dieptemeting (*)
(*) deze datapunten worden ook in de
gekoppelde raai opgeslagen
(**) deze datapunten worden niet in de
gekoppelde raai opgeslagen
SEE ALSO:
emptyraai
batchjob
selectandkoppel
ApplicationRoot\ma
17-Oct-2005 10:45:48
1836 bytes
RemoveRaaien - verwijder raaien of grids uit werkgebied
CALL:
db = RemoveRaaien(indx, arrayName, db, msg)
INPUT:
indx: <integer array> met index van de te verwijderen raaien
arrayName: <string> mogelijke waarden (optioneel):
'raai' --> verwijder raaien
'grid' --> verwijder grids
Defaultwaarde: "raai"
db: <undoredo object> (optioneel) de centrale database
Defaultwaarde: "get_db_maria" aanroepen
msg: <string> (optioneel) boodschap die opgenomen moet worden
in de Undo/Redo lijst
Defaultwaarde: "Verwijder 1 of ..."
OUTPUT:
db: <undoredo object> de geactualiseerde centrale database (raaien of
grids zijn verwijderd)
ApplicationRoot\ma
27-Jun-2008 16:00:30
3145 bytes
SorteerVoetmaat - sorteer de data op voetmaat (alleen RWSLOD, QINSY) CALL: [blok,WarnMsg] = SorteerVoetmaat(blok,RemoveEquals) INPUT: blok: <struct> met een raai RemoveEquals: <boolean> verwijderen van dubbele items OUTPUT: blok: <struct> met een raai WarnMsg: <string> met waarschuwing SEE ALSO: load_raai do_import_dia emptyraai
ApplicationRoot\ma
29-Jan-2010 14:12:33
2835 bytes
ApplicationRoot\ma
20-Mar-2009 11:43:11
669 bytes
aboutScreen - laat een scherm zien met versie informatie van Maria CALL: aboutScreen(obj, event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) OUTPUT: geen uitvoer See also: morfologie
ApplicationRoot\ma
19-Mar-2009 17:12:29
6638 bytes
activatemenus - activeer de menus na het inlezen van data CALL: activatemenus INPUT: geen invoer OUTPUT: geen directe uitvoer, de status van enkele menu's is gewijzigd APPROACH: haal de handles op van de menus aan de hand van hun tags De tag strings zijn beschreven in constantes.m Activeer de gevonden menu's
ApplicationRoot\ma
10-Mar-2005 20:10:04
802 bytes
addcontour - breid grid uit met contour
CALL:
grid = addcontour(grid,keepcontour,keephiaat)
INPUT:
grid: <struct> met een grid (zie ook emptygrid)
keepcontour: <boolean>
0 -> herbepaal contour
1 -> geen herbepaling contour
keephiaat: <boolean>
0 -> vul hiaten op
1 -> vul hiaten niet op
OUTPUT:
grid: <struct> met een grid dat uitgebreid is met een contour
ApplicationRoot\ma
27-Sep-2005 15:11:44
3247 bytes
appendhistory - neem meta data op in het herkomst veld van een grid
CALL:
griddata = appendhistory(gridstruct)
INPUT:
gridstruct: <struct> met een compleet grid, dus met meta data
OUTPUT:
griddata: <struct> met het grid structure gedeelte van gridstruct,
waarvan het veld herkomst is gevuld
ApplicationRoot\ma
03-Apr-2005 10:29:56
904 bytes
arcGisExportGui - installeer het scherm voor export grid in ArcGis
formaat plus definitie bijbehorende metadata
CALL:
cancel = arcGisExportGui(grid)
INPUT:
grid: <struct> met een grid
digisettings: <string> met digipolsettings
OUTPUT:
cancel: <boolean> heeft de gebruik op cancel gedrukt?
SEE ALSO:
emptygrid
ApplicationRoot\ma
21-Mar-2009 14:31:38
4925 bytes
arcinfoexport - exporteer raaien die binnen een bepaald gebied liggen
in arcinfo formaat
CALL:
succes = arcinfoexport(fname,raai,xrange,yrange)
INPUT:
fname: <string> met de naam van het weg te schrijven bestand
raai: <array of struct> met raaien die geexporteerd moeten worden
xrange: <double> van lengte 2 met het geselecteerde x-bereik in meters
yrange: <double> van lengte 2 met het geselecteerde y-bereik in meters
OUTPUT:
succes: <boolean> return code
1 -> wegschrijven succesvol voltooid
0 -> wegschrijven onderbroken
APPROACH:
De utility arcinfowrite wordt gebruikt om blokken met data weg te
schrijven, tussendoor wordt een progress indicator getoond
ApplicationRoot\ma
12-Jun-2007 23:59:20
2389 bytes
batchjob - Voer batchjob uit CALL: batchjob(obj, event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) OUTPUT: geen directe uitvoer, de batchjob wordt uitgevoerd APPROACH: alle settings zijn aanwezig in de database
ApplicationRoot\ma
19-Mar-2009 16:23:51
29224 bytes
bewerkraai - start het raaiinspectie scherm met een geselecteerde raai CALL: bewerkraai(obj,event,REPLACE) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) REPLACE: <boolean> vervang huidig raaiinspectie scherm OUTPUT: geen directe uitvoer, het raaiinspectie scherm wordt geactiveerd
ApplicationRoot\ma
01-May-2008 19:59:44
1097 bytes
changeraai - verwijder, selecteer of deselecteer gemarkeerde raaien/grids
CALL:
changeraai(obj,event,hlist,optie,fld)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
hlist: <handle> van de lijst met grids/raaien
optie: <string> met mogelijke waarden:
'select' -> Gemarkeerde raaien selecteren
'deselect' -> Gemarkeerde raaien deselecteren
'toggleselect' -> Gemarkeerde raai de- of selecteren
'select_invis' -> Niet getoonde raaien selecteren
'deselect_invis' -> Niet getoonde raaien deselecteren
'toggle' -> Toggle selectiestatus
'delete' -> Raaien uit werkgebied verwijderen
'export' -> Exporteer als ArcInfo + metadata
'adhoc' -> Gemarkeerde raaien ad-hoc aan
overzicht toevoegen
'metainfo' -> Metainfo overschrijven voor
gemarkeerde raaien
'exportxls' -> Gemarkeerde rijen exporteren naar
Excel bestand
'vergridden' -> Gemarkeerde raaien vergridden
fld: <string> (optioneel) met veld waarop actie uitgevoerde moet
worden mogelijk waarden:
- 'grid'
- 'raai' (default)
OUTPUT:
geen directe uitvoer,
APPROACH:
Wordt aangeroepen uit contextmenu van lijst of via een button
Conventie 1: de lijst "listobj" heeft als userdata de raai ID's
Conventie 2: de gemarkeerde items in lijst "listobj" dienen gewijzigd
te worden
ApplicationRoot\ma
30-Mar-2009 16:17:01
13502 bytes
constantes - definieer constantes voor de morfologie applicatie
CALL:
C = constantes(optie)
INPUT:
optie: <dummy> het definieren van tenminste 1 invoer argument heeft tot
gevolg dat een hulpscherm wordt gestart voor het
instellen van de opties
OUTPUT:
C: <struct> met een groot aantal velden, ieder veld bevat een
constante die in de morfologie 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
ApplicationRoot\ma
19-Mar-2009 16:44:38
29077 bytes
contourDlg - presenteer lijst met contouren en keis uit actie
INPUT
obj,event
hRaaiList: handle van lijst met raaien. leeg als functie als context
van contourlijst wordt aangeroepen. In dat laatste geval
worden alle raaien of grids geacht geselecteerd te zijn.
De contourlijst wordt in de huisige GUI dan disables
weergegeven.
hCntrList: handle van de lijst van contouren. Leeg als deze functie
als context van de raailijst wordt aangeroepen.
objName: "raai" of "grid"
ApplicationRoot\ma
26-Mar-2009 15:34:44
11961 bytes
contourgui - dialoog voor de automatische aanpak van contour lijnen
CALL
contourgui(hlist,ID)
INPUT
hlist: handle of list with grids
ID : ID of grid
OUTPUT
-
ApplicationRoot\ma
30-Jun-2008 10:24:16
9037 bytes
convZeekoe - CALL: convZeekoe(obj, event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) OUTPUT: geen uitvoer
ApplicationRoot\ma
15-Jul-2007 10:13:22
3071 bytes
conv_grid32 - grid convolutie, geoptimaliseerd voor geheugengebruik (zie
ook conv32)
CALL:
[z_interp,succes] = conv_grid32(z32,isdata,interp_index,shape)
INPUT:
z32: <matrix> datamatrix (any numeric datatype)
isdata: <matrix of uint8> die aangeeft of er data aanwezig is,
>0 -> data aanwezig
0 -> geen data aanwezig
interp_index: <array of integer> lineaire index met de interpoleren
punten
shape: <matrix of integer> 3x3 weight matrix voor interpolatie
OUTPUT:
z_interp: <int32> interpolated values corresponding to interp_index
succes: <boolean>
0 -> operatie NIET succesvol afgerond
1 -> operatie succesvol afgerond
APPROACH:
van de isdata matrix wordt alleen de afmeting en true/false gebruikt,
m.a.w. isdata == 1 is equivalent aan isdata == 4 voor deze specifieke
module
ApplicationRoot\ma
17-Oct-2005 16:06:08
5034 bytes
data2dbh - definieer afhankelijkheid raaibeheer scherm van data
CALL:
agtree = data2dbh
INPUT:
geen invoer
OUTPUT:
agtree: <struct> met de afhankelijkheden van het raaibeheer scherm van
de data in de centrale morfologie database
SEE ALSO:
load_raai - initialisatie GUI, afhandeling "data" commando's
settings2dbh - definieer afhankelijkheid raaibeheer scherm van settings
dbhview - update raaibeheer scherm
ApplicationRoot\ma
23-Mar-2009 18:02:35
1209 bytes
data2geo - definieer afhankelijkheid geografie scherm van data
CALL:
agtree = data2geo
INPUT:
geen invoer
OUTPUT:
agtree: <struct> met de afhankelijkheden van het geografie scherm van
de data in de centrale morfologie database
ApplicationRoot\ma
25-Mar-2009 10:30:16
1244 bytes
guistructure - definieer afhankelijkheid morfologie scherm van data
CALL:
agtree = data2morf
INPUT:
geen invoer
OUTPUT:
agtree: <struct> met de afhankelijkheden van het morfologie scherm van
de data in de centrale morfologie database
SEE ALSO:
MORFOLOGIE - initialisatie GUI, afhandeling "data" commando's
morfchangedata - koppeling guishow naar morfview
morfchangesettings - koppeling settings naar morfview
settings2morf - definieer afhankelijkheid morfologie scherm van
settings
morfview - update morfscherm
ApplicationRoot\ma
27-May-2008 16:11:14
4839 bytes
dataclean - smooth raaien CALL: [foutlier,lowlimit,uplimit,mu] = dataclean(x,z,status,gladheid,gewicht,maxfout) INPUT: x: <array of double> longitudinale positie z: <array of double> diepte (cm) status: <array of int8> met de raaistatus gladheid: <double> zie emptyraai gewicht: <double> zie emptyraai maxfout: <double> zie emptyraai OUTPUT: foutlier: <array of integer> met de indices van overschrijdende waarden lowlimit: <double> ondergrens (in cm) uplimit: <double> bovengrens (in cm) mu: <double> v_waarde (lowlimit+uplimit)/2 (in cm)
ApplicationRoot\ma
20-Feb-2008 10:32:53
1751 bytes
dbhgui - afhandeling 'GUI' commando's in het databeheer scherm
CALL:
dbhgui(optie)
INPUT:
optie: <string> mogelijke waarden:
- 'selectbutton'
- 'expkaart'
OUTPUT:
geen directe uitvoer, de settings database wordt aangepast
See also:
data2dbh - definieer afhankelijkheid raaibeheer scherm
van data
settings2dbh - definieer afhankelijkheid raaibeheer scherm
van settings
dbhview - update raaibeheer scherm
ApplicationRoot\ma
23-Mar-2009 18:02:35
1253 bytes
dbhview - update raaibeheer scherm
CALL:
dbhview(udnew, opt, upd, C, HWIN)
INPUT:
udnew: <struct> met de centrale databse
opt: <struct> met de gui settings
upd: <struct> met de te actualiseren scherm elementen
C: <struct> met de morfologie constantes
HWIN: <handle> van het databeheer scherm
OUTPUT:
geen directe uitvoer, het raaibeheer scherm wordt geactualiseerd
See also:
load_raai - initialisatie GUI, afhandeling "data" commando's
dbhgui - afhandeling 'GUI' commando's
data2dbh - definieer afhankelijkheid raaibeheer scherm
van data
settings2dbh - definieer afhankelijkheid raaibeheer scherm
van settings
ApplicationRoot\ma
24-Apr-2010 10:35:31
9416 bytes
Check if file exist locally, otherwise return file in root of application The function only effects filenames that are specified without a path name
ApplicationRoot\ma
19-Mar-2009 15:49:19
561 bytes
define_control - hulpfunctie voor de definitie van het controle frame in
raaiinspectie
CALL:
h_control = define_control(hparent,C)
INPUT:
hparent <handle> van het parent frame waarin het controle frame moet
komen te staan
C: <struct> met de morfologie constantes
OUTPUT:
h_control: <handle> van het aangemaakte frame
SEE ALSO:
raaiinspectie
ApplicationRoot\ma
15-Aug-2008 15:43:06
25839 bytes
define_passief - hulpfunctie voor de definitie van een scherm voor
selecties van passieve raaien in raaiinspectie
CALL:
define_passief(hparent,C)
INPUT:
hparent <handle> van het frame waaronder de gui moet komen te hangen
C: <struct> met de morfologie constantes
OUTPUT:
geen directe uitvoer
ApplicationRoot\ma
15-Aug-2007 13:44:14
9249 bytes
detect_smoothpoints - bepaal het aantal punten met de gradient groter dan
een van te voren op te geven drempelwaarde
CALL:
[f_edge,f_rest,f_repeat,threshold_edge,threshold_rest,...
threshold_combined,max_edge,max_rest,max_repeat] = ...
detect_smoothpoints2(opt,griddata,maxdxy,f_on_edge,f_repeat)
INPUT:
opt: <struct> met opties, met de volgende velden:
- smooth_rand: <boolean> met smoothing conditie voor de
rafelrand, mogelijke waarden:
0 rafelrand NIET smoothen
1 rafelrand WEL smoothen
- smooth_rand_grad: <double> smoothing parameter (rafelrand)
- smooth_rest: <boolean> met smoothing conditie voor de
punten die niet op de rafelrand
liggen, mogelijke waarden:
0 restpunten NIET smoothen
1 restpunten WEL smoothen
- smooth_rest_grad: <double> smoothing parameter (restpunten)
griddata: <struct> met grid data, met relevante velden:
- stapx -> stapgrootte van het grid
- alpha -> databeschikbaarheid
- xax -> x as
- yax -> y as
- z -> z data
maxdxy: maximum van x-component of gradient EN y-component of gradient
f_on_edge: <array of integer> met een lineaire index naar dx en dy met
de randcoordinaten te testen tegen:
opt.smooth_rand en opt.smooth_rand_grad
f_repeat: <array of integer> met een lineaire index naar dx en dy te
testen tegen:
opt.smooth_rand en opt.smooth_rand_grad
EN
opt.smooth_rest en opt.smooth_rest_grad
OUTPUT:
f_edge: <array of integer> met indices van rafelrandpunten met
een gradient groter dan
smooth_rand_grad als smooth_rand==1
f_rest: <array of integer> met indices van punten met een
gradient groter dan
smooth_rand_rest als smooth_rest==1
f_repeat: <array of integer> met indices van van punten die een
gradient hebben groter dan
smooth_rand_grad als smooth_rand==1
OF
smooth_rest_grad als smooth_rest==1
threshold_edge <double> drempelwaarde op de rafelrand
threshold_rest <double> drempelwaarde op punten buiten de rafelrand
threshold_combined <double> drempelwaarde op alle punten
max_edge <double> maximale gradient op de rafelrand
max_rest <double> maximale gradient op punten buiten de rafelrand
max_repeat <double> maximale gradient op alle punten
ApplicationRoot\ma
19-Oct-2005 14:56:24
6297 bytes
dgsview - actualiseer digipol scherm
CALL:
dgsview(udnew,setting,upd,C,HWIN)
INPUT:
udnew: <struct> met de centrale database
opt: <struct> met de gui settings
upd: <struct> met de te actualiseren scherm elementen
C: <struct> met de morfologie constantes
HWIN: <handle> van het digipol scherm
OUTPUT:
geen directe uitvoer, het digipol scherm wordt geactualiseerd
SEE ALSO:
dgsgui - afhandeling 'GUI' commando's
data2dgs - definieer afhankelijkheid digipol scherm van data
settings2dgs - definieer afhankelijkheid digipol scherm
van settings
ApplicationRoot\ma
23-Mar-2009 17:57:30
13416 bytes
digipol - start digipol interpolatie
CALL:
[ok,msg,outfiles]=digipol(arg1, arg2, arg3)
INPUT:
varargin: zie de Gebruikershandleiding Digipol, de MEX versie wordt op
identieke wijze aangeroepen als de command-line versie van
Digipol
OUTPUT:
ok: <boolean> returncode.
0 -> interpolatie succesvol afgerond
msg: <char array> runtime verslag: de lijst met gegenereerde
meldingen
outfiles: <char array> de lijst met aangemaakte uitvoerfiles
ApplicationRoot\ma
20-Mar-2009 15:51:38
3117 bytes
digistart - installeer het opstartscherm voor Digipol jobs CALL: digistart(obj, event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) OUTPUT: geen directe uitvoer, het digipol opstartscherm wordt aangemaakt See also: convhullcontour, raaihullgui, newjob_addjob
ApplicationRoot\ma
15-Jun-2010 15:24:52
66110 bytes
do_import_ascigrid - kopieer asciigrid naar wgb structure
CALL:
[db] = do_import_ascigrid(fname,G,db)
INPUT:
fname: <string> met de naam van het herkomst bestand
G: <struct> met griddata uit arcinfo grid
+----nrows (double)
+----ncols (double)
+----xllcorner (double)
+----yllcorner (double)
+----cellsize (double)
+----NODATA_value (double)
+----data (int16 array)
db: <struct> met de centrale database
OUTPUT:
db: <struct> met de geactualiseerde centrale database
SEE ALSO:
load_raai, digistart
ApplicationRoot\ma
14-Apr-2010 09:46:28
3222 bytes
do_import - voer de import actie uit
CALL:
[db,unknownlocs] = do_import_dia(C, fname, blok, unknownlocs,
ConvTable, db, isWadi)
INPUT:
C: <struct> morfologie constanten
fname: <Cell array> met bestandsnamen
blok: <struct array> met dia blokken
unknownlocs: <string array> nieuwe gevonden sLoccod waarden
ConvTable: <struct> met velden
- loctable: <struct> met locatieconversies
- W3Htable: <struct> met W3H velden
- sLoccodlist: <char array> met locatienamen
db: <struct> de centrale database
isWadi: <boolean> (optioneel)
1: import geschiedt vanuit wadi
0: (default) import rechtstreeks vanuit dia
OUTPUT:
db: <struct> bijgewerkte centrale database
unknownlocs: <string array> nieuwe gevonden sLoccod waarden
See also: load_raai, digistart, define_wadi
ApplicationRoot\ma
13-Apr-2010 19:13:58
13321 bytes
edit_dlg - Vraag of file geopend moet worden en open file
CALL
edit_dlg(fname,str)
INPUT
fname: te openen file
str: weer tegeven tekst bij vraag
OUTPUT
This file returns no output arguments
REVISIONS
2008 08 16: this file has been moved from MbdUtils to Ma directory
ApplicationRoot\ma
16-Aug-2008 14:17:54
522 bytes
emptyWadiStruct - maak een lege structuur aan t.b.v. de WADI interface
CALL:
S = emptyWadiStruct(type)
INPUT:
type: <string>
OUTPUT:
'Periode' -> S.Description = {{}}
S.code = {{}}
'Locatie' -> S.Description = {{}}
S.shape = {{}}
S.code = {{}}
'Grid' -> S.Description = ''
S.patchHandles = {{}}
S.shape = {{}}
S.code = {{}}
ApplicationRoot\ma
19-Oct-2005 15:23:06
1056 bytes
emptyaggregstatus - initialiseer structure aggregstatus in aparte functie zodat de volgorde van de velden
in alle functies identiek is
CALL:
aggregstatus = emptyaggregstatus
INPUT:
geen invoer
OUTPUT:
aggregstatus: <struct> geinitialiseerde structure met aggregatiestatus
SEE ALSO:
emptyraai, getaggregstatus
ApplicationRoot\ma
03-Apr-2005 11:07:16
559 bytes
emptygrid - maak een leeg grid aan
CALL:
grid = emptygrid
INPUT:
geen invoer
OUTPUT:
grid: <struct> met een 'leeg' grid.
grid.xmin = []
grid.ymin = []
grid.stapx = []
grid.stapy = []
grid.xax = []
grid.yax = []
grid.z = []
grid.status = []
grid.alpha = []
grid.xcntr = []
grid.ycntr = []
grid.xcntr_in = []
grid.ycntr_in = []
grid.zmin = Inf
grid.zmax = Inf
grid.herkomst = <struct>
herkomst.property = []
herkomst.index = []
Alle velden voor de structure zijn aanwezig en staan
in de goede volgorde door ze op deze wijze te
initialiseren kunnen structures in arrays opgeslagen
worden. Het overschrijven van de velden verandert de
volgorde namelijk niet meer.
APPROACH:
Deze functie komt in de plaats van een klassieke declaratie en maakt het
mogelijk om:
1. structures the rangschikken in een array
2. te testen op bepaalde veldwaardes, zonder een dergelijke test vooraf
te laden gaan door een test met 'isfield'
SEE ALSO:
emptyud
emptyu
emptyraai
ApplicationRoot\ma
14-Apr-2010 10:32:08
4549 bytes
emptyraai - maak een lege raai of grid structure aan
CALL:
reeks = emptyraai(raaiarray)
INPUT:
raaiarray: <array> (optioneel) met grids of raaien (wordt gebruikt
voor het bepalen van het reeksID)
OUTPUT:
reeks: <struct> met een lege raai of grid
APPROACH:
Deze functie wordt zowel voor het creeeren van grids als raaien gebruikt
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: emptygrid, emptyud, emptyu, emptyraai
ApplicationRoot\ma
27-May-2008 16:10:45
5833 bytes
emptysettings - default instellingen voor de morfologie gui
CALL:
settings = emptysettings
INPUT:
geen invoer
OUTPUT:
settings: <struct> met de dafault instellingen voor de morfologie gui
SEE ALSO:
emptyud
ApplicationRoot\ma
19-Mar-2009 16:54:11
2125 bytes
emptystruct - maak structures aan die al het goede formaat hebben zodat
vanaf de initialisatie met de () indexering kan worden
gewerkt.
CALL:
S = emptystruct(type)
INPUT:
type: <string> met het type te genereren structure, mogelijke waarden
'contour'
'digijob'
'herkomst'
'property'
OUTPUT:
S: <struct> met een lege structure van het type 'type'
EXAMPLE:
zonder initialisatie:
A = [];
A = structure
A(1) = structure
met initialisatie:
A = emptystruct
A(1) = [];
A(1) = structure
A(2) = structure
ApplicationRoot\ma
25-Mar-2009 14:07:06
2606 bytes
emptyu - initialiseer undoredo object voor de morfologie applicatie
CALL:
[db,filename] = emptyu(C,fname)
INPUT:
C: <struct> met constantes
fname: <string> naam van het te openen betstand
signature: <double> (optioneel) met signaturen van het undoredo object
OUTPUT:
db: <streuct> met een 'leeg' werkgebied. (undo object)
filename: <string> met de bestandsnaam van het werkgebied
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 veldwaarden, zonder een dergelijke test vooraf
te laden gaan door een test met 'isfield'
See also: emptygrid, emptyud, emptyraai, emptystruct
ApplicationRoot\ma
02-Aug-2010 18:16:08
11536 bytes
emptyud - maak een lege userdata structure aan
CALL:
grid = emptyud(stamp)
INPUT:
geen invoer
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 laden gaan door een test met 'isfield'
See also: emptygrid, emptyud, emptyu, emptyraai,load_data
ApplicationRoot\ma
25-Mar-2009 10:02:54
1855 bytes
This file has been generated automatically by function exetimestamp_create
ApplicationRoot\ma
02-Aug-2010 18:18:46
609 bytes
expandgrid - expandeer grid tot aparte grids CALL: [db,NEWGROUP] = expandgrid(db,gridindx,remove) INPUT: db: <struct> de centrale database gridindx: <integer> index van het te expanderen grid remove: <boolean> verwijder origineel grid OUTPUT: db: <struct> met de centrale database NEWGROUP: <boolean> database mutatie status
ApplicationRoot\ma
26-Jun-2007 20:39:32
4297 bytes
export_digi_in - exporteer data voor Digipol interpolatie
CALL:
succes = export_digi_in(fname,sCrdtyp,raai,xrange,yrange)
INPUT:
fname: <string> met naam van het weg te schrijven bestand
sCrdtyp: <string> met coordinaattype waarin coordinaten intern zijn
opgeslagen
raai: <struct> met een raai
xrange: <vector of double> lengte == 2 geselecteerde gebied (in meters)
xrange: <vector of double> lengte == 2 geselecteerde gebied (in meters)
OUTPUT:
succes: <boolean> met de return code
1 -> wegschrijven succesvol beeindigd
0 -> wegschrijven onderbroken
APPROACH:
- De utility arcinfowrite wordt gebruikt om blokken met data weg te
schrijven
- Tussendoor wordt een progress indicator getoond
ApplicationRoot\ma
30-Jul-2010 00:05:14
8647 bytes
exportlocaties - exporteer tabel met raailocaties voor gebruik in
locatool
CALL:
exportkaartbladen(obj, event)
INPUT:
obj: <handle> handle van de aanroepende uicontrol (niet gebruikt)
event: leeg, standaard argument van een callback (niet gebruikt)
OUTPUT:
geen directe uitvoer
ApplicationRoot\ma
20-Jul-2007 11:37:32
5551 bytes
exportlocaties - exporteer tabel met raailocaties voor gebruik in
locatool
CALL:
exportlocaties(IDs,fname)
INPUT:
IDs: <integer> met de ID's van de te exporteren raaien
fname: <string> met de bestandsnaam
OUTPUT:
geen directe uitvoer, gegevens worden weggeschreven naar bestand met
naam: 'fname'
ApplicationRoot\ma
12-Jul-2007 14:34:18
2492 bytes
fieldnameprint - verwijder niet-toegestane symbolen uit fieldname string CALL: str = fieldnameprint(str) INPUT: str: <string> OUTPUT: str: <string>
ApplicationRoot\ma
04-Apr-2005 10:13:36
312 bytes
findbuurraaien - bepaal de indices van de buurraaien
CALL:
[f_buurlinks,f_buurrechts,f_equal] = findbuurraaien(...
raaiarray,curindx,maxdistance,maxN,zoekhoek,overjaargrens,overtypegrens)
INPUT:
raaiarray: <struct array> met raaien
curindx: <integer> met de index van de huidige raai
maxdistance: <double> maximale zoek afstand
maxN: <integer> maximaal aantal te zoeken raaien
zoekhoek: <double> criterium voor raai paralelliteit (in radialen)
overjaargrens: <boolean> -> 1: zoek ook raaien van andere jaargangen
overtypegrens: <boolean> -> 1: zoek ook raaien van andere types (default 0)
OUTPUT:
f_buurlinks: <array of integer> met raai indices van buren links
f_buurrechts: <array of integer> met raai indices van buren rechts
f_equal: <array of integer> met indices van de raaien met gelijk
startpunt
APPROACH:
voor de bepaling van parallelle raaien gebruikt het algoritme de
parameters zoekhoek,overjaargrens
linker buur: alle raaien met een startpunt links van huidige startpunt
+
alle raaien met identiek startpunt, maar orientatie naar
links(tegen klok in)
rechter buur: alle raaien met een startpunt rechts van huidige startpunt
+
alle raaien met identiek startpunt, maar orientatie naar
rechts(met klok mee)
ApplicationRoot\ma
18-Oct-2005 06:33:30
6869 bytes
findkaartbladen - enumereer kaartbladen per type
CALL:
[W3Harray,N,Type] = findkaartbladen(raai,stratify)
INPUT:
raai: <struct array> met raaien
stratify: <> (optioneel)
1 -> stratificeer naar type
0 -> default
OUTPUT:
W3Harray: <struct array> met W3H codes voor kaartblad
N: <vector of integer> met het aantal datapunten per kaartblad
Type: <integer> type per kaart blad (indien stratify was 1),
mogelijke waarden:
1 -> niet geschematiseerde natte natte raai(DIEPTE)
sAnacod=F025 & sBewcod~=SCHEM_R1
2 -> gekoppelde raai(GEKOPPELD)
sAnacod=F147
3 -> droge raai(HOOGTE)
sAnacod=F110 / F003 / F022
4 -> geschematiseerde natte raai(JARKUS)
sAnacod=F025 & sBewcod=SCHEM_R1
See also: getraaitype
ApplicationRoot\ma
13-Apr-2010 19:07:13
3962 bytes
findraaien - zoek de raaien bij een locatie
CALL:
f = findraaien(sLoccod,raaiarray)
INPUT:
sLoccod: <string> met de op te zoeken locatie
raaiarray: <structarray> met raaien
OUTPUT:
f: <array of integer> met de indices van raaien in raaiarray die horen
bij de locatie sLoccod
ApplicationRoot\ma
26-Sep-2005 17:16:36
564 bytes
ApplicationRoot\ma
02-Sep-2004 13:21:20
278528 bytes
geografie - initialiseer het geografie scherm
CALL:
a = geografie(optie,udnew)
INPUT:
optie: <string> (optioneel) mogelijke waarden:
- 'refresh'
- 'exportlayout'
- 'resetlayout'
- 'defaultlayout'
- 'importlayout'
- 'closereq'
- 'opmaakinstellen'
- 'installatie' (default)
udnew: <struct> waarschijnlijk overbodig
OUTPUT:
a: <double> dummy variabele
ApplicationRoot\ma
24-Apr-2010 10:39:56
76239 bytes
geogui - afhandeling 'GUI' commando's in het geografie scherm
CALL:
geogui
INPUT:
geen invoer
OUTPUT:
geen directe uitvoer, de settings database wordt aangepast
SEE ALSO:
geochangesettings - koppeling dbhgui naar dbhview
data2geo - definieer afhankelijkheid geografie scherm
van data
settings2geo - definieer afhankelijkheid geografie scherm
van settings
ApplicationRoot\ma
23-Mar-2009 17:57:29
3526 bytes
geoview - visualisatie functie van het geografie scherm
CALL:
geoview(udnew, opt, upd, C, HWIN)
INPUT:
udnew: <struct> met de centrale database
opt_S: <struct> met de gui settings
upd: <struct> met de te actualiseren scherm elementen
C: <struct> met de morfologie constantes
HWIN: <handle> van het geografie scherm
OUTPUT:
geen directe uitvoer, het geografie scherm wordt geactualiseerd
See also:
geochangedata - koppeling guishow naar dbhview
geochangesettings - koppeling dbhgui naar dbhview
geogui - afhandeling 'GUI' commando's in het
geografie scherm
data2geo - definieer afhankelijkheid geografie scherm
van data
settings2geo - definieer afhankelijkheid geografie scherm
van settings
ApplicationRoot\ma
25-Mar-2009 18:40:20
47365 bytes
getMinimumW3H - lees de minimale MetaInfo uit een headerfile INPUT db: <struct> met de centrale database OUTPUT: W3H: <struct> met een W3H blok met metainfo RKS: <struct> reeks blok met metainfo See also: readstruct
ApplicationRoot\ma
20-Mar-2009 15:51:40
2443 bytes
get_C - haal de constantes voor de Maria applicatie op CALL: C = get_C INPUT: geen invoer OUTPUT: C: <struct> zie constantes APPROACH: haal de constantes via de globale variabelen van de Maria applicatie op, de applicatie moet wel opgestart zijn See also: get_db_maria, constantes, morfologie
ApplicationRoot\ma
25-Mar-2009 16:26:34
433 bytes
get_db_maria - haal de constantes en de centrale database voor de Maria
applicatie op
CALL:
[db,C] = get_db_maria
INPUT:
geen invoer
OUTPUT:
db: <struct> zie emptyu
C: <struct> zie constantes
HWIN: <handle> van het maria hoofdscherm
APPROACH:
haal de constantes en centrale database via de globale variabelen van de
Maria applicatie op, de applicatie moet wel opgestart zijn
See also: get_c, constantes, morfologie, emptyu, emptyud
ApplicationRoot\ma
03-Mar-2007 15:54:38
694 bytes
get_db_swan_smooth - haal database van het swan_smooth scherm op CALL: [db, HWIN] = get_db_swan_smooth INPUT: geen invoer OUTPUT: db: <undoredo object> zie swan_smooth/initopt HWIN: <handle> van het swan_smooth scherm See also: get_opt_maria, get_db_maria
ApplicationRoot\ma
24-Jul-2007 09:57:28
405 bytes
get_opt_contourgui - haal de settings database voor de contourgui op CALL: [opt, HWIN] = get_opt_contourgui INPUT: geen invoer OUTPUT: opt: <struct> zie contourgui/initopt HWIN: <handle> van de contourgui
ApplicationRoot\ma
14-Aug-2007 14:40:30
347 bytes
get_opt_databeheer - haal de constantes en de centrale settings database
voor het databeheer scherm op
CALL:
[opt, C, HWIN] = get_opt_databeheer
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie morfologie/initopt
C: <struct> zie constantes
HWIN: <handle> van het databeheer scherm
APPROACH:
haal de constantes en centrale settings database via de globale
variabelen van de Maria applicatie op, de applicatie moet wel opgestart
zijn
See also: get_c, constantes, morfologie, get_opt_maria, get_db_maria
ApplicationRoot\ma
03-Mar-2007 18:41:26
774 bytes
get_opt_digi - haal de constantes en de centrale settings database
voor het digival scherm op
CALL:
[opt, C, HWIN] = get_opt_digi
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie morfologie/initopt
C: <struct> zie constantes
HWIN: <handle> van het digival scherm
APPROACH:
haal de constantes en centrale settings database van het digival scherm
op, de applicatie moet wel opgestart zijn
See also: get_c, constantes, digistart, get_opt_maria
ApplicationRoot\ma
04-Mar-2007 10:46:00
693 bytes
get_opt_geodata - haal de constantes en de centrale settings database
voor het geodata scherm op
CALL:
[opt, C, HWIN] = get_opt_geodata
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie morfologie/initopt
C: <struct> zie constantes
HWIN: <handle> van het geodata scherm
APPROACH:
haal de constantes en centrale settings database van het geodata scherm
op, de applicatie moet wel opgestart zijn
See also: get_c, constantes, get_opt_maria
ApplicationRoot\ma
04-Mar-2007 13:23:24
689 bytes
get_opt_geografie - haal de constantes en de centrale settings database
voor het geografie scherm op
CALL:
[opt, C, HWIN] = get_opt_geografie
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie morfologie/initopt
C: <struct> zie constantes
HWIN: <handle> van het geografie scherm
APPROACH:
haal de constantes en centrale settings database via de globale
variabelen van de Maria applicatie op, de applicatie moet wel opgestart
zijn
See also: get_c, constantes, morfologie, get_opt_maria, get_db_maria
ApplicationRoot\ma
03-Mar-2007 18:42:14
761 bytes
get_opt_gridanalyse - haal de constantes en de centrale settings database
voor het databeheer scherm op
CALL:
[opt, C, HWIN] = get_opt_gridanalyse
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie gridanalysewindow/initopt
C: <struct> zie constantes
HWIN: <handle> van het gridanalyse scherm
See also: get_c, constantes, morfologie, get_opt_maria, get_db_maria
ApplicationRoot\ma
25-Mar-2009 18:44:04
612 bytes
get_opt_maria - haal de constantes en de centrale settings database voor
de Maria applicatie op
CALL:
[opt, C] = get_opt_maria
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie morfologie/initopt
C: <struct> zie constantes
APPROACH:
haal de constantes en centrale settings database via de globale
variabelen van de Maria applicatie op, de applicatie moet wel opgestart
zijn
See also: get_c, constantes, morfologie, emptyu, emptyud
ApplicationRoot\ma
02-Mar-2007 00:15:36
680 bytes
get_opt_raaiinspectie - haal de constantes en de centrale settings
database voor het raaiinspectie scherm op
CALL:
[opt, C, HWIN] = get_opt_raaiinspectie
INPUT:
geen invoer
OUTPUT:
opt: <struct> zie morfologie/initopt
C: <struct> zie constantes
HWIN: <handle> van het geografie scherm
APPROACH:
haal de constantes en centrale settings database via de globale
variabelen van de Maria applicatie op, de applicatie moet wel opgestart
zijn
See also: get_c, constantes, morfologie, get_opt_maria, get_db_maria
ApplicationRoot\ma
10-Jul-2007 11:00:40
780 bytes
get_targetgrid - maak een lege grid structure aan CALL: targetgrid = get_targetgrid(stapgrootte,xmin,xmax,ymin,ymax) INPUT: stapgrootte: <double> met de maaswijdte van het aan te maken grid xmin: <double> met x-coordinaat van de linkeronderhoek xmax: <double> met x-coordinaat van de rechterbovenhoek ymin: <double> met y-coordinaat van de linkeronderhoek ymax: <double> met y-coordinaat van de rechterbovenhoek OUTPUT: targetgrid: <struct> met een leeg grid (zie emptygrid)
ApplicationRoot\ma
19-Jul-2007 21:34:08
1782 bytes
getaggregstatus - haal overzicht van aggregatiestatus op
CALL:
aggregstatus = getaggregstatus(status)
INPUT:
status: <vector of uint8> met geaggregeerde status bits
OUTPUT:
aggregstatus: <struct> geinitialiseerde structure met aggregatiestatus
met velden:
- numhiaat
- numoutlier
- numanders
- numvalide
- numtotal
SEE ALSO:
setaggregstatus
ApplicationRoot\ma
28-Sep-2005 10:56:26
2021 bytes
getdefaultKaartblad - Fixed Format ASCII file met Kaartbladen CALL: getdefaultKaartblad(fname) INPUT: fname: <string> (optioneel) met bestandsnaam OUTPUT: gegevens worden opgeslagen in bestand: Kaartbladen.w3h
ApplicationRoot\ma
19-Mar-2009 16:03:32
3925 bytes
getdefaultW3H - importeer TAB separated ASCII file met W3H data CALL: getdefaultW3H(fname) INPUT: fname: <string> (optioneel) met bestandsnaam OUTPUT: gegevens worden opgeslagen in bestand: W3Hvelden.w3h
ApplicationRoot\ma
19-Mar-2009 16:02:35
7330 bytes
getfiletype - bepaal aanvullende gegevens voor een bestand
CALL:
file = getfiletype(file, filetypes)
INPUT:
file: <struct> met bestandsgegevens
types: <integer> de te accepteren types zie filetypes
filetypes: <struct array> with fields
- label
- filter
- image
OUTPUT:
file: <struct> met file informatie aangevuld met
filetype
image
name
APPROACH:
Overload this function for specific application requirements
filetypes is normally specified in the application constants
See also: mdltfilebrowser
ApplicationRoot\ma
03-Sep-2008 15:34:24
3363 bytes
getlocalxyz - haal de x, y en z coordinaten van een raai op CALL: [x,y,z] = getlocalxyz(raai) INPUT: raai: <struct> met een raai OUTPUT: x: <vector of double> met de x coordinaten y: <vector of double> met de y coordinaten z: <vector of double> met de z coordinaten SEE ALSO: globaal2lokaal
ApplicationRoot\ma
27-Sep-2005 09:50:20
681 bytes
getloctable - Haal locatie conversie tabel van de schijf
CALL:
loctable = getloctable(fname)
INPUT:
fname: <string> (optioneel) met de bestandsaam van de conversietabel
default warde == loctable.mat
OUTPUT:
loctable: <struct array> met velden
- oldloc
- newloc
ApplicationRoot\ma
19-Mar-2009 16:36:45
663 bytes
Return system parameter
ApplicationRoot\ma
13-Apr-2010 14:46:03
935 bytes
getwgbname - haal de naam van het huidige werkgebied van de Morfologie
applicatie op
CALL:
filename = getwgbname
INPUT:
geen invoer
OUTPUT:
filename: <string> naam van het huidige werkgebied
SEE ALSO:
setwgbname
ApplicationRoot\ma
10-Mar-2005 13:16:34
379 bytes
globaal2lokaal - bereken coordinaten in lokaal stelsel
CALL:
xyloc = globaal2lokaal(xyglobaal,raailocatie)
INPUT:
xyglobaal: <matrix of int32> globale x-y coordinaten in milimeter
breedte: 2, range [-2147 2147]
raailocatie: <vector of double) met de locatie van de raai
raailocatie(1) -> x coordinaat nulpunt
raailocatie(2) -> y coordinaat nulpunt
raailocatie(3) -> x coordinaat eindpunt
raailocatie(4) -> y coordinaat eindpunt
OUTPUT:
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
SEE ALSO:
lokaal2globaal
ApplicationRoot\ma
27-Sep-2005 09:38:08
1727 bytes
googlemaps -
CALL:
googlemaps(obj,event,h_axis)
INPUT:
obj: <handle> van het aanroepende uicontrol
event: <leeg> standaard matlab callback argument
h_axis: <handle> (optioneel) van assenstelsel
default: gca
OUTPUT:
geen directe uitvoer
See also:
ApplicationRoot\ma
19-Oct-2006 19:31:34
1696 bytes
return XY coordinates of grid points
INPUT
grid: content of db.grid(N).grid (for specific N)
+----xax(nX)
+----yax(nY)
+----z(nY,nX)
OUTPUT
X(ny,nX): X-coordinates corresponding to grid.z;
Y(ny,nX): Y-coordinates corresponding to grid.z;
See also:
grid2rd
ApplicationRoot\ma
23-Mar-2008 16:00:17
518 bytes
grid_ascii - schrijf een grid weg in ASCII formaat
CALL:
fname = grid_ascii(grid,fname)
INPUT:
grid: <struct> met een grid
fname: <string> met de naam van het bestand waarnaar het grid moet
worden weggeschreven
OUTPUT:
fname: <string> met de naam van het bestand waarnaar het grid is
weggeschreven
ApplicationRoot\ma
23-Jul-2007 08:24:00
3557 bytes
gridanalyseview -
ApplicationRoot\ma
02-Apr-2009 16:13:44
7910 bytes
experiment_window - edit and view an experiment CALL: gridanalysewindow(obj, event) INPUT: obj: handle of invoking uicontrol, standard matlab callback argument event: empty, standard matlab callback argument sorttable: jacontrol, used to determine selected grids OUTPUT: no output, window for grid analysis is opened
ApplicationRoot\ma
20-Apr-2009 11:34:34
18500 bytes
gridbewerkgui - creeer de gui voor het uitvoeren van bewerkingen op twee
grids
CALL:
gridbewerkgui(hgridlist,ID)
INPUT:
hgridlist: <handle> van lijst met grids
ID: <integer> ID van het te bewerken grid
OUTPUT:
geen directe uitvoer, de grafische interface wordt aangemaakt
See also: ID2index
ApplicationRoot\ma
27-Jun-2008 16:16:14
14316 bytes
imagevalue - display grid waarde CALL: zvalue = imagevalue(obj,event) INPUT: obj: <handle> van grid event: <double> standaard argument voor een callback OUTPUT: zvalue: waarde van het punt waar geklikt is
ApplicationRoot\ma
12-Jul-2007 14:33:16
2391 bytes
indxs_older - beperk lijst met raaien tot oudere raaien dan de huidige
raai
CALL:
f = indxs_older(raai,raaiarray)
INPUT:
raai: <struct> met huidige raai
raaiarray: <array of struct> met de raai lijst
OUTPUT:
f: <integer> met de indices van de raaien die ouder zijn dan
'raai'
ApplicationRoot\ma
26-Sep-2005 19:30:46
685 bytes
indxsthisyear - bepaal indices die slaan op dit jaar
CALL:
f = indxsthisyear(raai,raaiarray,overjaargrens)
INPUT:
raai: <struct> huidige raai (zie emptyraai)
raaiarray: <struct array> met alle raaien
overjaargrens: <boolean> mogelijke waarden:
1 --> niet selecteren op jaargrens
0 --> wel selecteren op jaargrens
OUTPUT:
f: <double array> met indices in de raaiarray die
betrekking hebben op het jaar van de raai
ApplicationRoot\ma
02-Apr-2005 09:59:06
865 bytes
interp_z - interpoleer de z-waarde en pas de status aan
CALL:
interp_z(HMAINWIN,db,curindx,f,val)
INPUT:
HMAINWIN: <handle> van hoofdscherm
db: <struct> met de centrale database
curindx: <integer) index van current raai
f: <vector of integer> indices van aan te passen z waardes
val: <vector of double> in te vullen waarden
OUTPUT:
geen directe uitvoer, de in te vullen waarden zijn gevuld en de status
van het grid is aangepast
ApplicationRoot\ma
10-Jul-2007 10:43:26
1729 bytes
israai - bepaal of een dia blok grid- of raaidata bevat
CALL:
rc = israai(blok)
INPUT:
blok: <struct> met een dia blok
OUTPUT:
rc: <boolean> met mogelijke waarden:
1 ==> blok bevat raai
0 ==> blok bevat grid
ApplicationRoot\ma
01-Apr-2005 18:13:38
623 bytes
jaarcontrole - activeer de jaarcontrole
CALL:
jaarcontrole(dbdata,opt)
INPUT:
dbdata: <struct> met de centrale database, met relevant veld:
- raai: <struct array> met raaien
opt: <struct> met velden:
- f_raai: <index> van geselecteerde raaien
- RAAI: <struct>
- col1: gesorteerde indices
- col2: linkerbuur
- col3: rechtererbuur
OUTPUT:
geen directe uitvoer, het jaarcontrole scherm wordt opgestart
ApplicationRoot\ma
02-Mar-2008 19:55:26
8422 bytes
jaarcontroleShow - visualisatie van de jaarcontrole gui
CALL:
jaarcontroleShow(raaiIDs,Status,sLoccodsSelect,years,M)
INPUT:
raaiIDs: <integer> met raai ID dat correspondeert met de
gebruikte index
Status: <integer> met raaistatus
sLoccodsSelect: <char array> met locatie codes
years: <vector> met jaar aanduiding
M: <index> naar vector raaiIDs, of NaN indien voor
locatie/jaargang geen reeks aanwezig is.
hoogte = size(sLoccodsSelect,1)
breedte = length(years)
OUTPUT:
geen directe uitvoer
ApplicationRoot\ma
20-Mar-2008 13:17:50
26605 bytes
jaarcontrolegui - de grafische interface voor de jaarcontrole
CALL:
jaarcontrolegui(obj, event, fp_toggleselect)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument
fp_toggleselect: <function pointer> naar functie voor creeren van
contour
OUTPUT:
geen directe uitvoer
See also: getcontour, patchcombine_new
ApplicationRoot\ma
20-Apr-2009 11:34:34
22019 bytes
klikongrid - visualisatie callback van patch waarmee grid is getekend
CALL:
klikongrid(obj,event,hlist,thisID,mode)
INPUT:
obj: <handle> standaard argument van matlab callback
event: <empty> standaard argument van matlab callback
hlist: <handle> van grid lijst in hoofdscherm.
Mag ook leeg zijn, dan wordt hij bepaald
thisID: <integer> ID van het te visualiseren grid
mode: <string> (optioneel) met mogelijke waarden
- 'select'
- 'toggle'
- '', de mode wordt automatisch bepaald aan de hand
van de selectiontype
OUTPUT:
geen directe uitvoer,
APPROACH:
wijzig value instelling van grid en roep daarna callback van lijst aan
hierdoor worden details gevisualiseerd
See also:
buttondown van patch
SWAN functies die grids selecteren
ApplicationRoot\ma
02-May-2007 22:47:58
2059 bytes
kustvaktool - toon de locatie afhankelijke W3H gegevens
CALL:
kustvaktool(optie)
INPUT:
optie: <string> (optioneel) met mogelijke waarden
'install' --> installeer het inspectiescherm (default)
'import' --> importeer een ASCII file met
locatiecodes
OUTPUT
geen directe uitvoer
ApplicationRoot\ma
19-Mar-2009 16:23:56
4368 bytes
update database by excluding grid cells listed in EXCLUDE. recompute
redundant fields
This function was implented to effectuate confining grids using a contour
INPUT
db: Maria database,before update
gridIndx: index of current grid
EXCLUDE: vector of logicals
Note at least 1 element is true, at least 1 element is false
OUTPUT
db: Maria database, after update
doremove: if true ignore db output and modify db outside this
function.
ApplicationRoot\ma
03-Jul-2008 11:58:49
3481 bytes
listcompare - vergelijk locaties met een referentieset uit een bestand
CALL:
[rc,selindx] = listcompare(sLoccods,context)
INPUT:
sLoccods: <array of string> lijst met de locatie codes
context <integer> mogelijke waarden:
1: aangeroepen uit file overzicht
2: aangeroepen uit werkgebied overzicht
OUTPUT:
rc: <boolean>
0 ==> vergelijking niet uitgevoerd
(bijvoorbeeld door cancel van de gebruiker)
1 ==> vergelijking uitgevoerd
selindx: <array of int> indices van de te markeren locaties
ApplicationRoot\ma
15-Aug-2008 13:13:05
5579 bytes
load_data - callback van menu 'laad werkgebied', user interface voor het
laden van een eerder bewaard werkgebied
CALL:
dummy = load_data(fname)
INPUT:
fname: <string> met de naam van het te laden bestand
OUTPUT:
geen uitvoer, de centrale database is gevuld met een werkgebied
APPROACH:
- Kijk of oude data bewaard moeten blijven (morf_check_exit)
- Haal de naam van de invoerfile op (getfile)
- Schakel interactie uit (mbd_suspend)
- Laad data
- Schakel interactie in (mbd_restore)
- Verwijder introtext (digivalwinresize)
- Schakel menu's in die van data afhangen (activatemenus)
- Schakel de save menus uit (de volgende aanroep van morf_check_exit activeert ze weer
- Pas de naam van het window aan
- Update scherm (update)
ApplicationRoot\ma
25-Jul-2007 09:24:24
2085 bytes
load_raai - installeer het databeheer scherm
CALL:
rc = load_raai(obj, event)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
OUTPUT:
rc: <boolean> return code (standaard op 0)
See also:
dbhgui - afhandeling 'GUI' commando's
data2dbh - definieer afhankelijkheid raaibeheer scherm van
data
settings2dbh - definieer afhankelijkheid raaibeheer scherm van
settings
dbhview - update raaibeheer scherm
ApplicationRoot\ma
24-Apr-2010 10:36:07
97276 bytes
locatool - gui voor het bewerken van de locatie conversie tabel CALL: locatool(udnew) INPUT: udnew: <struct> met de centrale database OUTPUT: geen directe uitvoer, de gui wordt aangemaakt
ApplicationRoot\ma
19-Mar-2009 16:34:10
17946 bytes
xyglobaal - bereken raaicoordinaten in globaal stelsel
CALL:
xyglobaal = lokaal2globaal(xyloc,raailocatie)
INPUT:
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2
raailocatie: <vector of double) met de locatie van de raai
raailocatie(1) -> x coordinaat nulpunt
raailocatie(2) -> y coordinaat nulpunt
raailocatie(3) -> x coordinaat eindpunt
raailocatie(4) -> y coordinaat eindpunt
OUTPUT:
xyglobaal: <matrix of int32> globale x-y coordinaten in milimeter
breedte: 2
SEE ALSO:
globaal2lokaal
ApplicationRoot\ma
27-Sep-2005 08:25:24
2010 bytes
lookuplocs - controleer of locatie gevonden wordt in lijst met JARKUS
raaien, zo niet zet dan de locatie naam om met default
conversie regels.
CALL:
[newloc,unknownlocs] = lookuplocs(oldloc,unknownlocs,loctable,sLoccodlist)
INPUT:
oldloc: <string> met locatienaam
unknownlocs: <char array> lijst met locaties waarvoor gegevens zijn
aangemaakt
loctable: <struct array> met velden
- oldloc
- newloc
zie ook "getloctable"
sLoccodlist: <char array> met locatiecodes
OUTPUT:
newloc: <string> met nieuwe (verzonnen) locatienaam
unknownlocs: <char array> lijst met locaties waarvoor gegevens zijn
aangemaakt
ApplicationRoot\ma
18-Jun-2008 18:39:43
2008 bytes
lr_setheader - callback van knop "kies headerfile" CALL: lr_setheader(obj, event, field, ext) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument field: <string> met bestandsnaam ext: <string> met extensie van het bestand OUTPUT: geen directe uitvoer, de database wordt aangepast
ApplicationRoot\ma
05-Mar-2007 08:59:28
1000 bytes
markeerraai - algemene functie om raaien in het Morfologie hoofdscherm
te markeren en te visualisren
INPUT:
MarkIndx: <vector of integer> gemarkeerde raaien (indices)
MarkIDs: <vector of integer> gemarkeerde raaien (ID's)
mode: <string> mogelijke waarden:
'markeer' - overule huidige selectie
'toggle' - toggle selected
OUTPUT:
geen directe uitvoer, het hoofdscherm is geupdate
ApplicationRoot\ma
30-Jun-2008 12:25:37
1433 bytes
mbd_defaulttextprop - definieer default eigenschappen van text objecten
CALL:
textopt = mbd_defaulttextprop
INPUT:
geen invoer
OUTPUT:
textopt: <struct array> met velden
- label
- name
- opt
- type
- default
ApplicationRoot\ma
27-Sep-2005 12:51:56
3062 bytes
mdlt_edit - definieer de callback van de frame opmaak instellingen van
het geografiescherm
CALL:
mdlt_edit(hframe,ind)
INPUT:
hframe: <handle>
ind: <struct array> met plaats waar de opmaak instellingen voor elk
frame in het geografiescherm opgeslagen staan.
OUTPUT:
geen directe uitvoer, de callback voor elke frame is gedefinieerd
ApplicationRoot\ma
17-Jul-2007 12:16:54
3093 bytes
metatool - Toon de locatie afhankelijke W3H gegevens of de kaartbladen
CALL:
metatool(obj,event,mode)
INPUT:
obj: <handle> standaard matlab callback argument
event: <handle> standaard matlab callback argument (niet gebruikt)
mode: <string> met mogelijke waarden voor te definieren interface:
'locatie'
'kaartblad'
OUTPUT:
geen uitvoer, de gui voor het inspecteren van kaartbladen of voor het
inspecteren van locatie afhankelijke metagegevens wordt opgestart
ApplicationRoot\ma
19-Mar-2009 16:40:04
4739 bytes
morf_check_exit - Check of alle data bewaard zijn
CALL:
status = morf_check_exit
INPUT:
geen invoer
OUTPUT:
status <double> met mogelijke waarden:
0 --> er waren geen onbewaarde data
1 --> er waren onbewaarde data, deze zijn bewaard
2 --> er waren onbewaarde data, deze zijn niet bewaard
-1 --> er waren onbewaarde data, de gebruiker heeft
CANCEL ingedrukt
ApplicationRoot\ma
03-Mar-2007 14:42:02
1108 bytes
morfchangedata - Visualisatie van ALLE data in de morfologie applicatie
CALL:
guishow(signature, db, ind)
INPUT:
signature: <double> signature van de database
db: <undoredo object> met centrale database
ind: <cell array> met velden:
'type'
'subs'
OUTPUT:
geen directe uitvoer, alle objecten die gerelateerd zijn aan data in het
werkgebied worden geactualiseerd.
See also: morfologie, morfchangesettings, emptyu, morfview
ApplicationRoot\ma
25-Mar-2009 20:10:24
3283 bytes
morfchangedata - Visualisatie van ALLE settings in de morfologie
applicatie
CALL:
guishow(signature, opt, ind)
INPUT:
signature: <double> signature van de settings database
opt: <undoredo object> met centrale settings database
ind: <cell array> met velden:
'type'
'subs'
OUTPUT:
geen directe uitvoer, alle objecten die gerelateerd zijn aan settings in
het werkgebied worden geactualiseerd.
See also: morfologie, morfchangedata, morfview
ApplicationRoot\ma
26-Mar-2009 10:43:20
2605 bytes
morfhelp - callback van de context sensitive help in de morfologie
applicatie
CALL:
morfhelp(tag)
INPUT:
tag: <string> met de tag van het geselecteerde object in de
morfologie applicatie
OUTPUT:
geen directe uitvoer, een scherm met help informatie van het
geselecteerde object in de morfologie applicatie
wordt getoond
ApplicationRoot\ma
22-Sep-2005 13:22:24
14130 bytes
morfologie - installeer de Morfologie GUI (het hoofdscherm)
CALL:
a = morfologie(dummy)
INPUT:
dummy: (optioneel) als aangeroepen met argument (bijvoorbeeld uit NwWgb)
dan geen exe status tonen
OUTPUT:
a: dummy parameter
See also:
load_raai - databeheer
geografie - geografie scherm
digistart - installeer digipol scherm
morfchangedata - koppeling guishow naar morfview
morfchangesettings - koppeling settings naar morfview
data2morf - definieer afhankelijkheid morfologie scherm van
data
settings2morf - definieer afhankelijkheid morfologie scherm
van settings
morfview - update morfscherm
define_raai - creeer raai panel
ApplicationRoot\ma
31-Mar-2010 18:41:22
51428 bytes
morfview - update morfologie scherm
CALL:
morfview(udnew,opt,upd,C,HWIN)
INPUT:
udnew: <struct> met de centrale database
opt: <struct> met de gui settings
upd: <struct> met de te actualiseren scherm elementen
C: <struct> met de morfologie constantes
HWIN: <handle> van het hoofdscherm
OUTPUT:
geen directe uitvoer, het morfologie scherm wordt geactualiseerd
See also:
morfologie - initialisatie GUI, afhandeling "data" commando's
morfchangedata - koppeling guishow naar morfview
morfchangesettings - koppeling settings naar morfview
data2morf - definieer afhankelijkheid morfologie scherm
van data
settings2morf - definieer afhankelijkheid morfologie scherm
van settings
morfview - update morfscherm
ApplicationRoot\ma
10-Mar-2008 11:17:04
13019 bytes
nextlistID - bepaal het volgende/vorige ID in de zichtbare lijst met
raaien
CALL:
ID = nextlistID(ID,HMAINWIN,opt)
INPUT:
ID: 1 of meer IDs
HMAINWIN: handle van het main window
opt: string met mogelijke waarden:
- 'next' selecteer volgende ID in raailijst
- 'prev' selecteer vorige ID in raailijst
preferredID: (optioneel) gewenste volgende of vorige ID, als deze
zichtbaar in de lijst voorkomt dan wordt deze geselecteerd
zo niet dan wordt de normale selectie procedure uitgevoerd
OUTPUT:
ID: <integer> van het ID van het vorige/volgende item in de
raailijst, ID == [] als geen vorig of volgend item
voorkomt in de raailijst
See also: raaiinspectie.m
ApplicationRoot\ma
31-Oct-2007 16:33:00
2717 bytes
nonfatal - schrijf WarnMsg weg in het logboek in de categorie
"Non-Fatal Foutmelding" of in een andere categorie
CALL:
db = nonfatal(WarnMsg,db,category)
INPUT:
WarnMsg: <string> met de warning
db: <struct> met de centrale database
category: <string> (optioneel) default: 'Non-Fatal Foutmelding'
OUTPUT:
db: <struct> de centrale (geactualiseerde) database
ApplicationRoot\ma
27-Jun-2008 15:56:05
684 bytes
opmaakgui - breid het opmaakprofiel menu in het geografiescherm uit met
een item waarmee de huidige instellingen van het
geografiescherm terurgeroepen kunnen worden.
CALL:
HWIN = opmaakgui(optie,curopt)
INPUT:
optie: <char> met de volgende mogelijke waarden
'exit' -> interne aanroep
'installatie' -> installeer de gui
'verwijder' -> interne aanroep
'omlaag' -> interne aanroep
'omhoog' -> interne aanroep
'editstr' -> interne aanroep
'toevoegen' -> interne aanroep
'cancel' -> interne aanroep
'ok' -> interne aanroep
curopt: <struct> met de geografie settings
OUTPUT:
HWIN: <handle> van de opmaakgui
See also: geografie
ApplicationRoot\ma
24-Apr-2010 10:45:04
9136 bytes
plot_rikz_logo - genereer het RIKZ logo CALL: cdata = plot_rikz_logo INPUT: geen invoer (het bestand rikzlogo.dat wordt geladen) OUTPUT: cdata: <uint8 array> met cdata van het RIKZ logo
ApplicationRoot\ma
19-Mar-2009 17:48:39
1115 bytes
proxyGui - installeer het scherm voor de specificatie van de proxy server ZIE presetValues voor voorkeuze instellingen
ApplicationRoot\ma
15-Aug-2007 13:50:37
14836 bytes
raaiContextMenu - define context menu for raailijst
INPUT
C: structure with constants
hList: handle of object to which context menu is attached
figtype: hoofdscherm OR raaibeheer
fpstruct: structure with function pointers that are defined locally in calling function
OUTPUT
hcontext: handle of context menu
ApplicationRoot\ma
30-Mar-2009 16:15:37
7915 bytes
raaichangedata - koppeling raaigui naar raaiview
CALL:
morfchangedata(udnew,ind,C,HMAINWIN)
INPUT:
udnew: <struct> met de centrale databse
ind: <substruct> met het gewijzigde component
<string> met waarde 'all' als alle componenten
geactualiseerd moeten worden
C: <struct> met de morfologie constantes
HRAAIWIN: <handle> van het databeheer scherm
OUTPUT:
geen directe uitvoer, het raaiinspectiescherm wordt geactualiseerd
SEE ALSO:
raaiinspectie - initialisatie GUI, afhandeling "data" commando's
raaigui - afhandeling 'GUI' commando's
raaichangesettings - koppeling raaigui naar raaiview
data2raai1 - definieer afhankelijkheid raaischerm van data
(huidige raai)
data2raai2 - definieer afhankelijkheid raaischerm van data
(algemeen)
settings2raai - definieer afhankelijkheid raaischerm van settings
raaiview - actualiseer raaischerm
ApplicationRoot\ma
27-Oct-2005 12:48:16
11643 bytes
raaichangesettings - koppeling raaigui naar raaiview
CALL:
raaichangesettings(optcontainer,ind)
INPUT:
optcontainer: <struct> met de settings van de MORFOLOGIE applicatie
ind: <substruct> met het gewijzigde component
<string> met waarde 'all' als alle componenten
geactualiseerd moeten worden
OUTPUT:
geen directe uitvoer, het raaibeheer scherm wordt geactualiseerd
SEE ALSO:
raaigui - afhandeling 'GUI' commando's
raaiinspectie - initialisatie GUI, afhandeling "data" commando's
raaichangedata - koppeling raaigui naar raaiview
data2raai1 - definieer afhankelijkheid raaischerm van data
(huidige raai)
data2raai2 - definieer afhankelijkheid raaischerm van data
(algemeen)
settings2raai - definieer afhankelijkheid raaischerm van settings
raaiview - update raaischerm
ApplicationRoot\ma
24-Jul-2007 09:25:00
1425 bytes
raaien2grid - vergrid raaien
CALL:
grid = raaien2grid(raaien,ID)
INPUT:
raaien(N): <array of struct> met te vergridden raaien
ID : <integer> ID van nieuw te maken grid
OUTPUT:
grid : <struct> met een nieuw grid. Fits is db.grid array (see code
example below)
EXAMPLE
code example:
ID = 1 + max(cat(1,db.grid.ID,db.raai.ID));
grid = raaien2grid(db.raai(indx),ID);
if ~isempty(grid)
N = length(db.grid);
db.grid(N+1) = grid;
end
See also
changeraai
ApplicationRoot\ma
23-Mar-2008 15:14:24
11486 bytes
raaihullgui - maak een gui aan voor het creeeren van contouren op basis
van raaien
CALL:
raaihullgui(obj,event,fp_toggleselect)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
fp_toggleselect: <function handle> naar functie die aangeroepen moet
worden nadat het contour is gecreeerd
OUTPUT:
geen directe uitvoer,
See also:
getcontour - start berekening
patchcombine_new - combineer twee contouren
ApplicationRoot\ma
20-Apr-2009 11:35:01
30948 bytes
raaiinspectie - gui voor de inspectie van raaien
CALL:
a = raaiinspectie(optie,udnew,ind)
INPUT:
optie: <string> met de uit te voeren actie, mogelijke waarden:
- 'contourselect'
- 'alfanumedit'
- 'alfanumeditcancel'
- 'koppelen'
- 'movehairline'
- 'sethiaat'
- 'setdelete'
- 'usereferentie'
- 'goedkeuren'
- 'switchalfanum'
- 'selected'
- 'exit'
- 'togglelegenda'
- 'drawnow'
- 'begrenzing'
- 'verwijderoutlier'
- 'referentieraai'
- 'installatie'
- 'dealwithedit'
- 'nextraai'
- 'schematiseren'
- 'previousraai'
- 'selectjarkus'
- 'selectraai'
- 'selectbasis'
- 'thisraai'
- 'uitdunnen'
- 'updatefromdb'
udnew: <struct> (optioneel) met userdata in het geval optie=='update'
ind: als optie == updatfromdb <substruct> met te wijzigen component
<string> 'all' als alle componenten geactualiseerd moeten
worden
als optie = installatie <boolean> vervang huidige raaiinspectie
OUTPUT:
a: a == 0, standaard uitvoer
APPROACH:
bij elk raaiinspectie scherm worden een userdata structure opgeslagen
userdata.ID: interne raai ID
ApplicationRoot\ma
15-Aug-2008 15:54:51
56963 bytes
raailistfields - bepaal de weer te geven velden in de raailijst CALL: fields = raailistfields(C,show) INPUT: C: <struct> met de morfologie constantes show: <struct> met weer te geven velden OUTPUT: fields: <cell array> met weer te geven velden
ApplicationRoot\ma
08-Jan-2006 20:50:30
676 bytes
raaiview - actualiseer raaiinspectie scherm
CALL:
raaiview(udnew,opt,upd,C,HWIN)
INPUT:
udnew: <struct> met de centrale databse
opt: <struct> met de gui settings
upd: <struct> met de te actualiseren scherm elementen
C: <struct> met de morfologie constantes
HWIN: <handle> van het raaiinspectie scherm
OUTPUT:
geen directe uitvoer, het raaiinspectiescherm wordt geactualiseerd
See also:
load_raai - initialisatie GUI, afhandeling "data" commando's
raaichangedata - koppeling guishow naar raaiview
raaichangesettings - koppeling raaigui naar raaiview
data2raai1 - definieer afhankelijkheid raaischerm van data
(huidige raai)
data2raai2 - definieer afhankelijkheid raaischerm van data
(algemeen)
settings2raai - definieer afhankelijkheid raaischerm van settings
ApplicationRoot\ma
28-Jun-2008 14:29:56
31254 bytes
read_rgfgrid - lees een rgfgrid databestand in
CALL:
[X,Y] = read_rgfgrid(rgfgrid_name,{leftmargin})
INPUT:
rgfgrid_name: <string> met de naam van het rgfgrid bestand
leftmargin: <integer> (optioneel), aantal posities die overgeslagen
moeten worden vanaf de
linkerkantlijn, nodig om het
'ETA = ??' gedeelte over te slaan
(default == 12)
OUTPUT:
X: <double> x-coordinaten van het grid
Y: <double> y-coordinaten van het grid
EXAMPLE:
structuur van het bestand is van de vorm:
* rgfgrid Version 2.8 file created at NOW1970/01/01 01:00:20
NumCols NumRows 0
0 0 0
ETA= 1 X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_NumCols
:
ETA= NumRows X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_NumCols
ETA= 1 X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_NumCols
:
ETA= NumRows X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_NumCols
SEE ALSO:
write_rgfgrid
ApplicationRoot\ma
24-Jul-2007 22:34:50
4574 bytes
removeadhoc - verwijder adhoc ID CALL: removeadhoc(curID,adhocID) INPUT: curID: <integer> met ID huidige raai adhocID: <integer> met te verwijder adhoc ID OUTPUT: geen directe uitvoer, de database is geactualiseerd
ApplicationRoot\ma
05-Mar-2007 10:42:08
667 bytes
retreive_gridattribs - actualiseer de inputcontrol velden dx,dy end
edgecoord
APPROACH:
elke keer dat een nieuw grid is geselecteerd wordt deze functie
aangeroepen (als MODE == 1 (smoothing))
ApplicationRoot\ma
24-Jul-2007 10:05:44
1283 bytes
sLoccod2W3H - haal de bij een locatie horende W3H data op
CALL:
W3H = sLoccod2W3H(sLoccod,W3Htable,sLoccodlist)
INPUT:
sLoccod: <string> met een locatiecode
W3Htable: <struct array> met velden:
- sLoccod
- sLocoms
- lMetrng
- lRhoekg
- sLocsrt
- sCrdtyp
- lXcrdgs
- lYcrdgs
- sGbdcod
sLoccodlist: <char array> met locatiecodes
OUTPUT:
W3H: <struct> met de bij een locatie horende W3H data
ApplicationRoot\ma
28-Sep-2005 14:33:26
1178 bytes
save_data - callback van menu en toolbar icon 'bewaar werkgebied',
user interface voor het bewaren van een werkgebied
CALL:
saved = save_data(fname)
INPUT:
fname: <string> (optioneel) met de naam van het te bewaren bestand
(nargin==0) --> vraag gebruiker om bestandsnaam
lege string --> gebruik default naam
OUTPUT:
saved: <boolean> mogelijke waarden:
1 --> daadwerkelijk gesaved
0 --> als cancel ingedrukt
APPROACH:
- Haal constantes en userdata op
- Bepaal de filenaam van de te bewaren data
- Schakel GUI tijdelijk uit (mbd_suspend)
- Bewaar data
- Activeer GUI (mbd_restore)
- Deactiveer save buttons
Deze worden bij de eerste wijziging weer door morf_check_exit geactiveerd
ApplicationRoot\ma
25-Jul-2007 09:11:24
2266 bytes
selectandsort - selecteer raaien aan de hand van de instellingen in het
morfologie- of raaibeheerscherm
CALL:
selected = selectandsort(C, raaiarray, MODE)
INPUT:
C: <struct> met de morfologie constantes
raaiarray: <struct array> met raai info
MODE: <integer> mogelijke waarden:
1 -> gebruik instellingen uit morfologiescherm
2 -> gebruik instellingen uit raaibeheer scherm
OUTPUT:
selected: <array of boolean> true --> raai zichtbaar in lijst
See also: jacontrol
ApplicationRoot\ma
04-Jul-2007 07:24:36
1580 bytes
selectraairange - selecteer meerdere periodes
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:
raaiinspectie
ApplicationRoot\ma
05-Mar-2007 10:43:16
5252 bytes
set_herkomst - houd de herkomst van de gridcellen bij
CALL:
grid = set_herkomst(grid,f,mode,mutatie)
INPUT:
grid: <struct> met het te wijzigen grid, relevante velden:
herkomst.property: <struct array> met grid properties
herkomst.index: <uint8 array> met verwijzingen naar
herkomst.property
0 voor de cellen die
geen data bevatten
f: <array of integer> met indices van de te wijzigen elementen in
het grid. BELANGRIJK: f moet verwijzen naar
het ingevoerde grid
mode: <integer> manier van wijzigen mogelijk waarden
1 --> zie mutatie mode == 1
2 --> zie mutatie mode == 2
mutatie:
mode==1: <struct> die aan het array properties moet worden
toegevoegd (ID is een verplicht veld van
deze structure).
mode==2: <struct> met een compleet grid. Het veld
mutatiegrid.property bevat de
herkomstgegevens die moeten worden
overgeplant naar het nieuwe grid.
OUTPUT:
grid: <struct> met het aangepaste grid (zie invoer)
EXAMPLE:
grid = set_herkomst(grid,f_nonzero,2,grid_to_copy_from)
SEE ALSO:
addcontour
swan_combine
ApplicationRoot\ma
14-Oct-2005 12:53:24
3552 bytes
setcolormap - zet de colormap voor een geselecteerde as
CALL:
setcolormap(opt,hax)
INPUT:
opt: <struct> met relevante velden:
- type
- mapfun
- range
hax: <handle> van de axis
OUTPUT:
geen directe uitvoer, de colormap voor de geselecteerde as is gezet
SEE ALSO:
showcolormap
ApplicationRoot\ma
27-Sep-2005 18:05:42
754 bytes
sethairline - positioneer de hairline en de cursor in de lijst
CALL:
sethairline(obj,event,C,HWIN)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
C: <struct> met de morfologie constantes
HWIN: <handle> van het scherm waarin de objecten worden bijgewerkt
OUTPUT:
geen directe uitvoer, hairline en cursor zijn gepositioneerd
ApplicationRoot\ma
05-Jul-2007 11:45:32
1651 bytes
setnoref - rekenmodule voor het verwijderen van de referentieraai
CALL:
dbdata = setnoref(dbdata,baseind)
INPUT:
dbdata: <struct> undoredo stucture met relevante velden:
dbdata.data: data in structure
baseind: <substruct> index naar huidige raai
OUTPUT:
dbdata: <struct> geactualiseerde undoredo stucture
ApplicationRoot\ma
23-Jul-2007 23:04:00
1413 bytes
setreference - bereken referentie bij raailocatie
CALL:
dbdata = setreference(dbdata,baseind,raai,foutlier,mu,NEWGROUP)
INPUT:
dbdata: <struct> met de centrale database
baseind: <substruct> index naar de huidige raai
raai: <struct> met de huidige raai
foutlier: <array of integer> met de indices van de outliers
(voor berekening nieuwe outlier status)
mu: <double> referentie waarde
NEWGROUP: <boolean> database mutatie status
OUTPUT:
dbdata: <struct> met de geactualiseerde centrale database
ApplicationRoot\ma
27-Jun-2007 16:53:04
2112 bytes
setrefhist - werk de raaireferenties bij
CALL:
[ud,foutlier] = setrefhist(ud,curindx,ID,xyloc,NEWGROUP)
INPUT:
ud: <struct> met de centrale database
curindx: <integer> met de index van de huidige raai
ID: <integer> met het ID van de referentieraai
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
NEWGROUP: <boolean> database mutatie status
OUTPUT:
ud: <struct> met de geactualiseerde centrale database
ApplicationRoot\ma
20-Feb-2008 10:32:57
3012 bytes
settings2geo - definieer afhankelijkheid geografie scherm van settings
CALL:
agtree = settings2geo
INPUT:
geen invoer
OUTPUT:
agtree: <struct> met de afhankelijkheden van het geografie scherm van
de data in de centrale morfologie database
ApplicationRoot\ma
25-Mar-2009 09:58:18
5203 bytes
settings2morf - definieer afhankelijkheid morfologie scherm van settings
CALL:
agtree = settings2morf(C)
INPUT:
C: <struct> met de morfologie constantes
OUTPUT:
agtree: <struct> met de afhankelijkheden van het morfologie scherm van
de data in de centrale morfologie database
See also:
morfologie - initialisatie GUI, afhandeling "data" commando's
morfchangedata - koppeling guishow naar morfview
morfchangesettings - koppeling settings naar morfview
data2morf - definieer afhankelijkheid morfologie scherm van
de data
morfview - update morfologiescherm
ApplicationRoot\ma
06-Mar-2007 19:49:24
1458 bytes
settings2raai - definieer afhankelijkheid raaischerm van settings
CALL:
agtree = settings2raai(C)
INPUT:
C: <struct> met de morfologie constantes
OUTPUT:
agtree: <struct> met de afhankelijkheden van het raaischerm van de data
in de centrale morfologie database
SEE ALSO:
load_raai - initialisatie GUI, afhandeling "data" commando's
raaichangedata - koppeling guishow naar raaiview
raaichangesettings - koppeling settings naar raaiview
data2raai1 - definieer afhankelijkheid raaischerm van data
(huidige raai)
data2raai2 - definieer afhankelijkheid raaischerm van data
(algemeen)
raaiview - update raaischerm
ApplicationRoot\ma
31-Oct-2007 17:21:26
3017 bytes
getwgbname - verander de naam van het huidige werkgebied van de
Morfologie applicatie
CALL:
setwgbname(filename,extra)
INPUT:
filename: <string> naam van het huidige werkgebied
extra: <string> (optioneel), wordt achter de filename gezet
OUTPUT:
geen uitvoer, de naam van het werkgebied is aangepast
SEE ALSO:
getwgbname
ApplicationRoot\ma
10-Mar-2005 13:20:06
598 bytes
showgeotop - haal topografie data op en plot deze
CALL:
showgeotop(obj,event,hax,FROMGEOVIEW,guiopt)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
hax: <handle> van de zoom assen
FROMGEOVIEW: <boolean> als 1 dan is de functie aangeroepen vanuit
geoview en guiopt is dan meegegeven
guiopt: <struct> met de settings data
OUTPUT:
geen directe uitvoer, de topografie data is geplot
ApplicationRoot\ma
02-Aug-2007 11:02:22
1486 bytes
showgridpatch - Plot grid patches en grid status
CALL:
showgridpatch(MODE,C,grid,hax,Zlevel)
INPUT:
MODE: <integer> met de aanroepende functie, mogelijke waarden:
1: morfview (plot patches en status van de
geselecteerde grids)
buttondownfunctie van patch: select/deselect grid
2: geoview (plot de patches)
buttondownfunctie van patch: set label
3: geoview (plot de gridstatus symbolen,
geen patches)
C: <struct> met de morfologie constantes
grid: <struct array> met grids
Zlevel: <double> te gebruiken z-waarde
hlist: <handle> van de gridlijst
hax: <handle> van de plotassen
SEE ALSO:
morfview (Mode==1)
geoview (Mode==2)
ApplicationRoot\ma
26-Jun-2007 08:54:00
5108 bytes
smooth_ignore - bepaal indices van de voor smoothing te negeren punten op
basis van bodemhoogte en contouren
INPUT:
z: <matrix of int32> met de z waarden van een grid
xax: <array of integer> met de x-as
yax: <array of integer> met de y-as
drempelH: <double> drempelwaarde voor hoogte
cntr: <struct array> met contour data uit werkgebied, velden:
- linedata
- name
- ID
f_selected: <array of integer> met lineaire index in griddata.z van
kandidaat punten die gesmoothed moeten
worden
mode: <string> moeten de punten binnen of buiten de contouren
gesmoothed worden, mogelijke waarden:
- 'binnen'
- 'buiten'
OUTPUT:
f_filtered: <array of integer> met lineaire index in griddata.z van
punten die WEL gesmoothed moeten worden
f_ignore: <array of integer> met lineaire index in griddata.z van
punten die NIET gesmoothed moeten worden
APPROACH:
deze functie is onafhankelijk van de Maria datastructuur
zie smooth_ignore_Maria voor de versie die de Maria datastructuur
See also: smooth_ignore_Maria
ApplicationRoot\ma
17-Jun-2007 17:57:20
2891 bytes
smooth_ignore_Maria - wrapper rondom smooth_ignore. Vertaalt Maria
specifieke datastructuur in algemene datastructuur
CALL:
[f_filtered,f_ignore] = smooth_ignore_Maria(opt,griddata,f_selected)
INPUT:
opt: <struct> met opties, met relevante velden:
- exclude_hoogte -> <boolean> filter op hoogte
- exclude_contour: -> <boolean> filter op contour
griddata: <struct> met een grid, relevante velden:
xax -> x as
yax -> y as
z -> z data
f_selected: <array of integer> met lineaire index in griddata.z van
kandidaat punten die gesmoothed moeten
worden
OUTPUT:
f_filtered: <array of integer> met lineaire index in griddata.z van
punten die WEL gesmoothed moeten worden
f_ignore: <array of integer> met lineaire index in griddata.z van
punten die NIET gesmoothed moeten worden
SEE ALSO:
smooth_ignore
ApplicationRoot\ma
17-Jun-2007 17:37:34
1739 bytes
smoothview - visualisatie functie voor swan_smooth CALL: smoothview(udnew,opt,upd,HWIN) INPUT: udnew: Maria data structuur opt: SWAN smooth datastructuur upd: structure met te updaten items HWIN: handle van SWAN figure
ApplicationRoot\ma
20-Feb-2008 10:32:39
8605 bytes
sortRaaien - Sorteer raaien in volgorde van ligging lang kustlijn
CALL:
RAAI_sorted = sortRaaien(f_raai,raaiarray,maxafstand,maxhoek)
INPUT:
f_raai: <indices> van de te sorteren raaien
raaiarray: <array of struct> met corresponderende raaigegevens.
maxafstand: <double> max afstand voor zoeken
maxhoek: <double> max hoek voor zoeken
OUTPUT:
RAAI_sorted: <array of struct> met gesorteerde raaien.
SEE ALSO
jaarcontrolegui
raaihullgui
ApplicationRoot\ma
08-Jan-2006 20:53:50
3936 bytes
INPUT
obj,event:
not used
sorttable:
handle van jacontrol met grid lijst
NOTE:
Definitions of "kaartbladen" are read from file 'Kaartbladen.w3h'
W3H[]
+----sLoccod (char array)
+----sLocoms (char array)
+----lMetrng (double)
+----lRhoekg (double)
+----sLocsrt (char)
+----sCrdtyp (char array)
+----lXcrdgs (double)
+----lYcrdgs (double)
+----sGbdcod (char array)
OUTPUT
changes are saved in workspace
See also: changeraai
ApplicationRoot\ma
15-Apr-2010 09:26:10
6470 bytes
swan_ascii - exporteer het SWAN grid in ASCII formaat
CALL:
swan_ascii(obj, event, output)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
output: <string> type gegegevens dat wordt geexporteerd
XYZ: Exporteer de X en Y coordinaten en de Z waarden van
het SWAN grid
XY: Exporteer de X en Y coordinaten van het SWAN grid
Z: Exporteer de Z waarden van het SWAN grid
binair: Exporteer het SWAN grid in binair formaat
met extensie .swn
XYZpaar: Exporteer het SWAN grid in (X,Y,Z) triples
OUTPUT:
geen directe uitvoer, er wordt een bestand weggeschreven met een door de
gebruiker opgegeven naam
ApplicationRoot\ma
23-Jul-2007 08:25:08
6915 bytes
swan_combine - voeg 2 of meer grids samen of vergelijke geselecteerde
grids met het SWAN grid, of interpoleer geslecteerde grids
CALL:
swan_combine(obj, event, MODE, hgridlist)
INPUT:
obj: <handle> van de aanroepende uicontrol
event: <double> standaard argument voor een callback (niet gebruikt)
MODE: <double> (optioneel) mogelijke waarden:
- 0 -> GUI voor interpoleren van grids (default)
- 1 -> GUI voor combineren van grids
- 2 -> GUI voor vergelijken grids met SWAN grid
hgridlist: <handle> (optioneel) handle van de lijst met grids
OUTPUT:
geen directe uitvoer, de betreffende GUI wordt geactiveerd
ApplicationRoot\ma
20-Mar-2008 13:19:22
26575 bytes
swan_extrap - bul SWAN grid incrementeel CALL: swan_extrap(obj, event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) OUTPUT: geen directe uitvoer, de database is geupdate met een gevuld SWAN Grid See also: morfologie
ApplicationRoot\ma
20-Feb-2008 10:34:12
3056 bytes
swan_grid - gui voor het instellen van een SWAN grid CALL: swan_grid(obj, event) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) OUTPUT: geen directe uitvoer
ApplicationRoot\ma
15-Aug-2008 15:54:52
26725 bytes
swan_smooth - GUI voor de selectie van 1 grid en het uitvoeren van een
actie daarop,
CALL:
swan_smooth(obj, event, MODE, hgridlist)
INPUT:
obj: <handle> standaard matlab callback argument
event <leeg> standaard matlab callback argument (niet gebruikt)
MODE: <integer> type bewerking, mogelijke waarden:
1 -> smooth grid
2 -> Expandeer samengesteld grid
3 -> Detecteer en vul hiaten
hgridlist: <handle> (optioneel) van de gridlijst waaruit functie is
aangeroepen
OUTPUT:
geen directe uitvoer, geselecteerd grid is gesmoothed, geexpandeerd of
de hiaten zijn opgevuld
See also: dealwith
ApplicationRoot\ma
29-Feb-2008 14:21:14
32912 bytes
swan_split - splits SWAN grid in delen (GUI gedeelte) CALL: opt = swan_split(obj, event) INPUT: obj: <handle> van de aanroepende uicontrol (niet gebruikt) event: leeg, standaard argument van een callback (niet gebruikt) OUTPUT: geen uitvoer, opgedeelde SWAN grid is weggeschreven
ApplicationRoot\ma
18-Jul-2007 12:42:10
13094 bytes
testFilter -
ApplicationRoot\ma
10-Nov-2008 12:21:48
2496 bytes
toggle_shw_opt - hulpfunctie voor raaiinspectie, define_control en
define_passief, toggles fld
CALL:
toggle_shw_opt(obj, event, fld)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument
fld: <string> te togglen veld
OUTPUT:
geen directe uitvoer, het betreffend veld is getoggled in de settings
ApplicationRoot\ma
05-Mar-2007 08:21:22
613 bytes
uitdunnen - rekenmodule voor het verwijderen van outliers zonder
interactie met de gebruiker
CALL:
[db,xyloc] = uitdunnen(db,baseind,xyloc)
INPUT:
db: <struct> met de centrale database
baseind: <substruct> met index naar huidige raai
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (afgerond op cm)
OUTPUT:
db: <struct> met de centrale database
ApplicationRoot\ma
04-Jul-2007 11:07:44
2088 bytes
undobuttons - creeer standaard buttons voor schermen in morfologie
applicatie
CALL:
undobuttons(C,present)
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 raaibeheer
- present(3): naar geografie
- present(4): naar digipol
- present(5): button start raaiinspectie
- present(6): reset redo/undo history
OUTPUT:
geen directe output, buttons worden aangemaakt in de toolbars,
wordt gebruikt in o.a. hoofdscherm, raaibeheer, geografiescherm en
het Digipol scherm.
ApplicationRoot\ma
01-May-2008 20:07:51
3767 bytes
update_dist - update weergave van de meetlat CALL: update_dist(obj,event,HWIN) INPUT: obj: <handle> standaard matlab callback argument event: <leeg> standaard matlab callback argument (niet gebruikt) HWIN: <handle> van het huidige scherm waarin de meetlat zich bevindt OUTPUT: geen directe uitvoer, de meetlat is geactualiseerd SEE ALSO: zoomtool geoview
ApplicationRoot\ma
27-Sep-2005 16:07:16
2326 bytes
vergrid - aggregeer een verzameling datapunten naar een opgegeven grid
CALL:
[grid_out,succes] = vergrid(xy,z,stapgrootte,datatype)
INPUT:
xy: : tabel N x 2 met coordinaten van datapunten int 32, in mm
z: : bijbehorende z waarden
stapgrootte: <double> stapgrootte van het grid in meter
datatype: <integer> uit te voeren bewerking, mogelijke waarden
1 -> Gemiddelde diepte (aangeboden data middelen)
2 -> Maximum diepte (aangeboden data maximeren)
3 -> Minimum diepte (aangeboden data minimeren)
4 -> Steekproef diepte (per cel 1 datapunt uit
aangeboden data gebruiken)
5 -> Vroegste datum (aangeboden data minimeren)
6 -> Laatste datum (aangeboden data maximeren)
7 -> Steekproef datum (per cel 1 datapunt uit
aangeboden data gebruiken)
8 -> Aantal waarnemingen (aangeboden tellen)
NMAX:
Maximaal toegestaan aantal gridcellen. Gebruik inf indien niet
gespecificeerd
OUTPUT:
grid_out: <struct> met een grid met de volgende velden
- xgrid: begrenzingen van het grid in de x richting.
De lengte is gelijk aan het
aantal gridcellen +1;
- ygrid: begrenzingen van het grid in de y richting.
De lengte is gelijk aan het
aantal gridcellen +1;
- N: aantal datapunten
- Z: z-waardes
succes: <boolean>
1 -> actie correct afgerond
0 -> actie door gebruiker afgebroken
See also: vergrid.m, Get2Dindex.m, dprintf.m, Get1DIndex.m
APPROACH:
- Converteer stapgrootte van m naar cm
- Initialiseer een leeg grid als uitvoer, Als de gebruiker de
berekening onderbreekt wordt dit lege grid uitgevoerd
(emptyadhocgrid).
- Bepaal het grid zodanig dat er tenminste 1 cel is en dat alle
datapunten binnen een cel vallen
- Toon tijdens de betrekening een progress indicator.
Die bij benadering de voortgang weergeeft.
- begin een try - catch blok. Indien de gebruiker ctrl-C indrukt,
wordt de berekening op een nette manier onderbroken.
- Bepaal de minimum en maximum waardes van de datapunten
De minimale x en y waarden vormen het hoekpunt van het grid
- Bepaal de grenzen van het grid. Zorg dat er tenminste 1 cel is en
dat alle dat binnen een cel vallen
- Maak lege matrices aan. Hiermee wordt het geheugen geclaimd.
Tevens worden alle waarden op NaN geinitialiseerd.
- Bepaal voor elk datapunt de bijbehorende lineaire matrix cel index.
Dit gebeurt met behulp van de functie Get2DIndex
- Sorteer de datapunten, op basis van de lineaire gridcel index
- Deel de datapunten in in groepen die bij dezelfde cel horen
- Bepaal de gevraagde uitdrukkingen voor alle groepen:
- bepaal het begin van de groep ==> grp_begin
- bepaal het einde van de groep ==> grp_end
- bepaal de elementen van de groep ==> zvector
zvector is de verzameling datapunten voor de cel met index LinIndx.
- De berekening is nu voltooid. Overschrijf de dummy uitvoer variabele
met de berekende waarde
ApplicationRoot\ma
03-Sep-2008 14:21:50
17169 bytes
wadireset - verwijder alle opgehaalde locaties en tijdstippen
callback van de knop "reset"
Wordt ook aangeroepen als URL wijzigt
INPUT
obj,event: Matlab standaard callback argumenten
db_settings: Database indien opgegeven: niet opnieuw ophalen
OUTPUT
de databse wordt mbdstore opgeslagen en mbdflush wordt uitgevoerd
ApplicationRoot\ma
12-Jul-2005 22:38:38
856 bytes
write_rgfgrid - maak een rgfgrid databestand
de structuur van het databestand ziet er als volgt uit:
* rgfgrid Version 2.8 file created at NOW1970/01/01 01:00:20
MaxX MaxY 0
0 0 0
ETA= 1 X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_MaxX
:
ETA= MaxY X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_MaxX
ETA= 1 X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_MaxX
:
ETA= MaxY X_1 X_2 X_3 X_4 X_5
X_6 X_7 X_8 X_9 X_10
: : : : :
... ... ... ... X_MaxX
CALL:
write_rgfgrid(rgfgrid_name,X,Y)
INPUT:
rgfgrid_name: <string> naam van het rgfgrid databestand
X: <matrix> x coordinaten van het grid
Y: <matrix> y coordinaten van het grid
SEE ALSO: read_rgfgrid
ApplicationRoot\ma
27-Jun-2007 11:18:02
4652 bytes
xy2grid - maak een grid aan en vul het met z-waarden
CALL:
grid = xy2grid(limits,linindex,z,status)
INPUT:
limits: <struct> met de begrenzingen van het grid
(afgeleid uit de grid coordinaten) met velden:
- xll
- stapx
- N
- yll
- stapy
- M
linindex: <vector of integer> met lineaire index in grid
z: <vector of int32> met diepte in cm behorende bij linindex
status: <vector of uint8> met de geaggregeerde status behorende bij
linindex
OUTPUT:
grid: <struct> met een grid
SEE ALSO:
load_raai
do_import_dia
getbinstatus
ApplicationRoot\ma
28-Sep-2005 14:58:02
3202 bytes
converteer xy coordinates zoals opgeslagen in Maria naar RD coordinaten
INPUT
xy(P,2): uint32. eenheid: mm
OUTPUT
xyrd(P,2): double. eenheid: m
See also:
grid2rd
ApplicationRoot\ma
22-Mar-2008 09:14:32
256 bytes
buildAgtree - bouw de agtree voor de geodatabase interface CALL: agtree = buildAgtree INPUT: geen invoer OUTPUT: geen uitvoer, de geodatabase constantes worden geactualiseerd See also:
ApplicationRoot\ma\Geodata
04-Mar-2007 13:13:48
14252 bytes
buildDefopt - stel de default settings in voor de geodatabase interface CALL: defopt = buildDefopt INPUT: D: <struct> met de constantes voor de geodatabase interface OUTPUT: defopt: <struct> waarin de update elementen gespecificeerd zijn SEE ALSO: ur_getopt
ApplicationRoot\ma\Geodata
08-Jan-2006 18:47:30
22831 bytes
buildSettings - maak de settings database voor de geodataapplicatie aan CALL: opt = buildSettings(opt,docStruct) INPUT: opt: <struct> matlab structure representatie van een xml bestand docStruct: <struct> met de settings database OUTPUT: opt: <struct> matlab structure geupdate xml
ApplicationRoot\ma\Geodata
07-Jan-2008 12:00:32
41170 bytes
define_geodata - installeer de geodatabase interface
CALL:
define_geodata(grid,fname,digisettings)
INPUT:
grid: <struct> met een grid uit Maria, zie ook: emptygrid
fname: <string> (optioneel) van het weg te schrijven bestand,
default == 'metadata'
digisettings: <string> met de gebruikt digipol settings, alleen
beschikbaar bij rechtstreekse import vanuit
digipol
OUTPUT:
geen directe uitvoer, de metadata kan gesaved worden als een XML bestand
dat geimporteerd kan worden in arcGis
See also: geodataview
ApplicationRoot\ma\Geodata
22-Mar-2009 15:53:45
108374 bytes
expandAll - klap een boom volledig in of uit
CALL:
expandAll(jac,expand)
INPUT:
jac: <jacontrol object> van het type JTree
expand: <boolean>
1: klap volledige boom uit
0: klap volledige boom in
OUTPUT:
geen directe uitvoer, de boom is volledig in- of uitgeklapt
ApplicationRoot\ma\Geodata
07-Jun-2005 07:17:08
2018 bytes
geodataconstants - definieer een aantal constantes die specifiek zijn voor
het geodata scherm
CALL:
D = geodataconstants
INPUT:
geen input
OUTPUT:
D: <struct> met de constantes die specifiek zijn voor het
geodata scherm
ApplicationRoot\ma\Geodata
26-Feb-2008 22:52:18
28124 bytes
geodataview - actualiseer de geodata schermelementen
INPUT:
udnew: <struct> met dedatabase
opt: <struct> met de GUI settings
upd: <struct> met de te updaten scherm elementen
C: <struct> met de morfologie constantes
HWIN: <handle> van het geodatabase scherm
OUTPUT:
geen directe uitvoer, alle schermelementen van de geodata applicatie
zijn aangepast
ApplicationRoot\ma\Geodata
21-Mar-2009 18:34:07
42938 bytes
getAllNodes - haal alle knopen uit een boom op CALL: array = getAllNodes(tree) INPUT: tree: <jacontrol object> van het type JTree OUTPUT: array: <java array> met de treepaths naar alle knopen
ApplicationRoot\ma\Geodata
07-Jun-2005 07:53:32
1301 bytes
listaction - de callback van de navigatiebuttons
CALL:
listaction(obj,event,varargin)
INPUT:
obj: <handle> standaard matlab callback argument
event: <leeg> standaard matlab callback argument (niet gebruikt)
varargin: <cell array> met twee elementen
- action: <string> met mogelijke waarden
- add
- delete
- previous
- next
- index: <string> met mogelijke waarden
- Documentatie
- Bewerkingen
- Object
- Attribuut
- Organisatie
- Persoon
OUTPUT:
geen directe uitvoer, de centrale database van de CEN Editor wordt
aangepast
ApplicationRoot\ma\Geodata
04-Jul-2007 12:22:34
10420 bytes
struct2treestruct - converteer een structure naar een boomstructuur
CALL:
S = struct2treestruct(structure)
INPUT:
structure: <struct> een willekeurige 'structure'
OUTPUT:
tree: <vector> met de boomstructuur, element i bevat de index
van knoop i's ouder, nul is de 'root' knooop
labels: <cell string> namen van de knopen
ApplicationRoot\ma\Geodata
20-Jun-2007 15:34:52
2605 bytes
treepath2index - converteer een java treepath object naar een index
CALL:
index = treepath2index(treepath)
INPUT:
tree: <javaobject> javax.swing.tree
treepath: <javaobject> javax.swing.tree.TreePath
OUTPUT:
index: <array of int> met een alternatieve representatie van het
treepath object met de index van het element
in de boom op elk niveau (de rootnode is
hierin niet opgenomen)
ApplicationRoot\ma\Geodata
19-May-2005 17:57:36
865 bytes
gettree - haal de boomstructuur van een 'structure' op
CALL:
[tree,labels] = gettree(structure)
INPUT:
tree: <array of int> met de boomstructuur, element i bevat de
index van knoop i's ouder, nul is de
'root' knoop
labels: <cellstring> namen van de knopen
OUTPUT:
S: <struct> een treestructure met velden
- tree <array of int>
- labels <cellstring>
ApplicationRoot\ma\Geodata
20-May-2005 12:59:12
686 bytes
updataxmlstruct - zet de settings in de xml matlab structure CALL: xmlstruct = updataxmlstruct(xmlstruct,db) INPUT: xmlstruct: <struct> matlab structure representatie van een xml bestand db: <struct> met de settings database OUTPUT: xmlstruct: <struct> matlab structure geupdate xml
ApplicationRoot\ma\Geodata
09-Sep-2005 17:09:44
25252 bytes
ur_getframechildren - haal de frames op die direct onder het opgegeven
frame hangen
CALL:
h_frames = ur_getframechildren(hframe)
INPUT:
hframe: <handle> van het parent frame
OUTPUT:
h_frames <handle> van de children frames van hframe
ApplicationRoot\ma\Geodata
19-May-2005 12:21:52
868 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
ModelitUtilRoot
22-Feb-2008 20:04:54
2577 bytes
LocatePointer - position the mousepointer over the object with handle obj
SUMMARY
This utility will move the pointer (window cursor) over a handle
graphic object, like a button
INPUT
obj: object handle (scalar)
OUTPUT
no direct output, the mousepointer is place over the specified object
ModelitUtilRoot
15-Aug-2008 15:17:34
684 bytes
arrangemenus - arrange sequence of uimenu objects
CALL
arrangemenus(hwin,first,last)
INPUT
hwin : window(s) to deal with
first : menu's to start with (in order of appearnce)
last : menus to end with (in order of appearnce)
OUTPUT
This function returns no output arguments
EXAMPLE
arrangemenus(gcf,'file',strvcat('zoom','help'))
ModelitUtilRoot
17-Jun-2010 00:32:06
2752 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
ModelitUtilRoot
15-Aug-2008 18:35:14
1569 bytes
assert - check condition. If false call error(msg)
CALL
assertm(condition)
assertm(condition,msg)
INPUT
condition:
boolean
msg:
error message that will be displayed if condition==false
OUTPUT
This function returns no output arguments
EXAMPLE
assertm(exist(fname,'file'),'input file does not exist')
NOTE
assertm.m replaces assert.m because 2008a contains a duplicate
function assert
ModelitUtilRoot
06-May-2009 13:49:55
704 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 the application data label has been set.
Toggle sequence for these items: NORMAL-EMPHASIS-NORMAL
application data "legtext": this functions searches for line or patch
objects for which tjhe application data label has been set
Toggle sequence for these items: NORMAL-EMPHASIS-OFF-NORMAL
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
ModelitUtilRoot
13-Oct-2009 19:34:00
24304 bytes
bdpatch - callback for interactive patch labels
CALL
bdpatch(obj,event,varargin)
INPUT
h_patch: patch consisting of N faces
event: not used
callback: function pointer to callback that will be invoked
data: struct or cell array with exactly N elements
or char array with exactly N rows
or numeric array with exactly N rows or elements
SEE ALSO
patchvalue
EXAMPLE
h_patch=patch(X,Y,Z,'facec','r','buttond',{@bdpatch,@disp,num2str(ZZ(:))});
ModelitUtilRoot
15-Aug-2008 16:54:21
2540 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
ModelitUtilRoot
29-Jan-2008 20:05:48
542 bytes
cell2str - converteer cell array naar een string
CALL:
S = cell2str(C, sep)
INPUT:
C: <cell array> (NxM) met getallen en strings
sep: <single character> optional. separator for columns. For example use
";" to produce output that can be pasted as a table in Word.
OUTPUT:
S: <string> (NxP) string representatie van cell array. The matrix
contains M columns separated by a space (or specified
separator)
See also: cell2mat, cell2struct
ModelitUtilRoot
17-Mar-2008 09:13:14
2123 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');
ModelitUtilRoot
16-Aug-2008 12:03:48
599 bytes
chararray2char - convert char array to string
CALL:
str = chararray2char(str)
INPUT:
str: char array
linebreak: (optinal) string with linebreak character
default: char(10)
OUTPUT:
str: string
ModelitUtilRoot
09-Oct-2009 11:56:28
451 bytes
code2str - translate numeric codes into strings, use last element of
stringto as default
CALL
str = code2str(codefrom,stringto,codes)
INPUT:
codefrom(N) : <vector of double> numeric codes
stringto(N,p): <char array> corresponding strings
codes(q): <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
NOTE:
code2cell is a faster and more general implementation
See also: code2cell, code2char
ModelitUtilRoot
16-Aug-2008 14:01:33
1068 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 with overrides
NOTE: "copyfrom" should support methods "fieldnames" and
"subsasgn". Therefore undoredo objects are allowed here.
copyto: <struct> structure with overridable data
OUTPUT:
copyto: <struct> adapted structure
ModelitUtilRoot
17-Apr-2010 13:51:56
6273 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
ModelitUtilRoot
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
ModelitUtilRoot
15-Aug-2008 18:50:04
398 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
ModelitUtilRoot
16-Aug-2008 11:35:49
18184 bytes
ModelitUtilRoot
22-Mar-2009 14:29:44
624 bytes
defaultpath - store or retrieve default path
NOTE: this module will become obsolete. It has been replaced by
defaultpathNew.
CALL
[NewPath,Pathlist]=defaultpath(NewPath,tag)
NOTE
"defaultpath" will become obsolete. Use defaultpathNew instead. Note
that defaultpathNew requires tag as first argument.
ModelitUtilRoot
21-Feb-2010 15:04:29
1043 bytes
defaultpathNew - store or retrieve default path
NOTE: this module replaces defaultpath
CALL
Retrieve path or history:
[NewPath]=defaultpathNew(tag)
[NewPath,Pathlist]=defaultpathNew(tag)
Set path and history:
defaultpathNew(tag,NewPath)
[NewPath]=defaultpathNew(tag,NewPath)
[NewPath,Pathlist]=defaultpathNew(tag,NewPath)
INPUT
tag: integer of char string identifier (deafults to 1).
NewPath: path history
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 =defaultPath
defaultPath (optioneel) default: pwd
OUTPUT
NewPath: preferred path (existence has been checked)
Pathlist:
history of last 25 selected paths (existence has been checked
NOTE
The path returned by defaultpath includes the filesep sign!!
See also:
mbdparse
www.modelit.nl/modelit/matlabnotes/mbdparse-dropdown.pdf
ModelitUtilRoot
02-Jun-2010 07:24:42
6076 bytes
displaylegend - auxiliary function for legedit
SUMMARY
this function plots the legend for the legedit legend structure
INPUT
hlegax : axes voor legenda
C : constantes
zrange : berekende range voor z
legenda : legenda. structure met legenda gegevens (zie LEGEDIT)
OUTPUT
colorcode: te gebruiken kleuren
col1: begin van ranges
col2,col3,col4: RGB kleuren
See also: legedit
ModelitUtilRoot
15-Aug-2008 18:22:41
3125 bytes
Read file that is stored with table2dlmfile to tablesructure
tested for char data only
CALL
S=dlmfile2table(fname,...
'format',<FORMATSTR>,...
'ignorelines',<#LINES>),...
'headerlines',<TRUE/FALSE>)
INPUT
fname
format : default='%s'. Th edefaults converst each column to
char-strings. If the columns are known beforehand, one
may specify one format-specifier per column, for example
"%s %d %f" will convert column 1 to char-string, column2
to int32 and column 3 to double.
Note one may use "table2num" to recognize and convert
numeric data.
delimiter : default=';'
ignorelines: default 0. Totally ignore these lines. This makes it
possible to store non-fixed format info in file.
headerlines: default TRUE
OUTPUT
S: tablestructure
See also: textscan, table2num
ModelitUtilRoot
02-Dec-2009 13:59:09
4413 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
ModelitUtilRoot
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
ModelitUtilRoot
16-Nov-2009 22:13:54
3719 bytes
drawcontour - teken een contour
CALL
cntr=drawcontour
INPUT
MAXN : maximum toegestaan aantal punten
OUTPUT
cntr: n x 2 matrix. Elke regel bevat een xy coordinaat
De laatste rij is identtiek aan de eerste
AANPAK
- Haal constantes en userdata op
- Bepaal huidige kleur van het window
- Stel nieuwe kleur voor het window in
TRY BLOK (ga door zolang geen Ctrl C of andere storing)
- Start een eeuwige loop
- Maak axes current
- Vraag de gebruiker om 1 punt in deze axes
- Check op ENTER:
sluit contour af
- Check welke muisknop gedrukt is:
- LINKER: ==> voeg punt toe
- RECHTER: ==> verwijder laatste punt
- ESC: ==> breek af (CANCEL)
- Check op ander toetsen:
Probeer de gebruiker te helpen met info in help scherm
- Herstel eerdere kleur van het window
CATCH BLOK
- Noodremprocedure:
- Stel uitvoer op []
- Verwijder contourlijn
- Herstel de kleur van het scherm
ModelitUtilRoot
15-Aug-2008 13:39:50
5148 bytes
dxfplot - plot topografie data voor current axes
INPUT
obj,event: unused standard input arguments of callback
hax: axes to plot in
topdata: structure with shape data
OUTPUT
This function returns no output arguments
EXAMPLE:
setappdata(HWIN,'topdata',topdata);
opt.move=showgeo; %showgeo is a user specified function that
%retrieves topdata and checks for
%visisbility of geo layer
zoomtool(1,opt);
See also: zoomtool
REMARK
this function works together with zoomtool.
only patches in view are plotted.
return
ModelitUtilRoot
15-Aug-2008 14:37:57
3487 bytes
dxfview - configureer achtergrond kaart(en)
SUMMARY
This function posts a GUI. The user may modify display options for
topographic data and save the result in a file. Th function works
together with a component that shows the data on a map.
CALL:
resultfile = dxfview(fname)
INPUT:
fname:
matfile that contains topographic data saved in parameter "topdata"
OUTPUT:
resultfile:
modified matfile that contains topographic data saved in
parameter "topdata"
ModelitUtilRoot
20-Mar-2009 15:56:58
45213 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
ModelitUtilRoot
16-Aug-2008 10:25:29
657 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
ModelitUtilRoot
26-Feb-2008 23:11:32
403 bytes
evalCallback - execute uicontrol callback from command line or function
INPUT
CallBack: one of the following:
- string to evaluate (obsolete)
- function pointer
- cell array, first element is function pointer
hObject: handle to pass on
event: appears to be unused
varargin: arguments to pass on to function
See also: evalany
ModelitUtilRoot
06-Apr-2009 17:28:53
2053 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
ModelitUtilRoot
15-Aug-2008 12:52:35
611 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
ModelitUtilRoot
21-Apr-2010 14:47:06
1811 bytes
findbatchobj - equivalent to findobj but also finds objects with
handlevis==off
CALL
h=findbatchobj(varargin)
INPUT
see findobj
OUTPUT
see findobj
ModelitUtilRoot
15-Aug-2008 12:54:30
443 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
ModelitUtilRoot
15-Aug-2008 21:40:07
2547 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); %retrieve h if uninitialized
NOTE:
[] is NOT a correct way to denote an unitialize handle
See also: gchbuf, gcjh
ModelitUtilRoot
20-Apr-2009 11:34:43
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
ModelitUtilRoot
29-Apr-2008 14:13:08
1068 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
ModelitUtilRoot
17-Apr-2009 10:29:38
916 bytes
getMatlabVersion - retrieve 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
7.9052 - R2009b
ModelitUtilRoot
12-Aug-2010 12:37:55
938 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'});
ModelitUtilRoot
20-Nov-2008 00:00:10
8638 bytes
getRoot - get root of current directory CALL: INPUT: no input required OUTPUT: root: string
ModelitUtilRoot
02-Jun-2010 15:30:32
209 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
ModelitUtilRoot
15-Aug-2008 21:31:12
2285 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)
ModelitUtilRoot
31-May-2010 14:02:20
9799 bytes
get_constants - get user configurable options and save them to file
CALL
C=get_constants(MODE,STTFILE,LANGUAGE)
INPUT
MODE: 1==> retrieve options
2==>start gui and retrieve/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)
ModelitUtilRoot
20-Apr-2009 11:34:44
14104 bytes
getcdata - retrieve cdata for Matlab buttons
CALL:
getcdata([],[],fname) - load image file
CDATA=getcdata(icon) - retrieve icon (maintain transparancy)
CDATA=getcdata(icon,BG) - retrieve icon (replace transparant cells by BG)
getcdata - Regenerate image file
getcdata([],[],fname,dirname) - Regenerate image file
INPUT:
icon: icon to retrieve
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')
ModelitUtilRoot
30-Apr-2009 11:02:42
10743 bytes
getcolorcode - retrieve conversion table for colors
SUMMARY
legedit is a utility that controls the legend. Its data are stored in
a fixed format. The current function takes these data en the current
zrange and creates a conversion table that wuill be used to assign
colors to objects in a graph.
CALL
[colorcode,newzrange,S]=getcolorcode(zrange,legendOpt)
INPUT
zrange : Range for z value. If range of legend is not fixed, this
will have an effect
legendOpt : Structure with legend options (see also LEGEDIT)
OUTPUT
colorcode: z-to-color transformation table (see also getcolordat)
col1: begin van ranges
col2: RGB channel 1
col3: RGB channel 2
col4: RGB channel 3
zrange: meaningful for "normal" legends
S: meaningful for "date" legends
See also: legedit, displaylegend, getcolordat
ModelitUtilRoot
20-Apr-2009 11:34:44
3476 bytes
prepare for image display using direct indexing
CALL
[M,colmap]=getcolordat(C,colorcode,Z,alpha,BACKGTYPE)
INPUT
Z: data
alpha: alpha==0 ==> display BACKGROUND color
alpha>0 ==> display data
colorcode: table
col 1: minimum value
col 2:4: rgb values
C: structure met WINCOLOR en FRAMECOLOR
BACKGTYPE: te gebruiken kleur voor doorzichtige items
(1==>WINCOLOR 2==>FRAMECOLOR)
OUTPUT
M: index in colormap
colmap: colormap
Convention:
rij 1: graphics achtergrond
rij 2: frame kleur achtergond
rij 3: zwart
rij 4: wit
rij 5:end: other color
ModelitUtilRoot
20-Apr-2009 11:34:45
2092 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 = fullfile(pname, fname);
See also: putfile
ModelitUtilRoot
15-Apr-2010 12:48:59
3485 bytes
getfiles - selecteer file met specifieke extensie
CALL:
[fname,pname] = getfiles(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
cell array van strings
(Als cancel ingedrukt ==> fname is leeg ({})
pname: <string> het bijbehorende pad INCLUSIEF filesep teken
(Als cancel ingedrukt ==> pname = 0)
APPROACH:
Blijf in oneindige loop todat gebruiker een geldige file selecteert
of de knop cancel indrukt. Een geldige file moet de extensie 'ext'
hebben.
See also: getfile, putfile
ModelitUtilRoot
15-Aug-2008 15:46:05
3010 bytes
getoptions - read an options file
CALL:
S = getoptions(fname,KEYwordlist,defaults,CaseSen)
INPUT:
fname : input file
KEYwordlist: possible fields of S
defaults : default options
CaseSen : Case Sensitivity (0/1)
OUTPUT:
S: structure with options
EXAMPLE:
-1-
Suppose the file 'optionfile' looks like:
Option1 99
%Comment line
Option2 stringvalue
Option3 123
Then the following commands:
keyw={'Option1','Option2'}
S=getoptions('optionfile',keyw)
Results in:
S.Option1=99
S.Option2='stringvalue'
(S.option3 does not exist because 'Option3' is not in keyword list)
-2- (typical use)
default=struct('option1',1,'option2',2,'option3',3,'option4',4);
S = getoptions(fname,fieldnames(default),default);
ModelitUtilRoot
16-Aug-2008 11:25:27
4370 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'
ModelitUtilRoot
22-Jun-2009 11:55:44
1849 bytes
getrange - CALL: S = getrange(vmin,vmax,N) INPUT: vmin: vmax: N: OUTPUT: S:
ModelitUtilRoot
22-Sep-2006 13:16:37
4073 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
ModelitUtilRoot
24-Jun-2010 16:28:15
2936 bytes
getyear - convert 2 digit year date to 4 digits
CALL
yr=getyear(yr,VERBOSE)
INPUT
yr : 2 digit year (4 digits are allowed)
VERBOSE: display warning when making interpretation
OUTPUT
yr: interpreted year
ModelitUtilRoot
11-Jun-2010 19:17:34
988 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
ModelitUtilRoot
13-Feb-2008 17:08:38
1008 bytes
height - get matrix height
CALL
w=height(str)
INPUT
str: matrix
OUTPUT
w: matrix height
SEE ALSO: size, length, width
ModelitUtilRoot
15-Aug-2008 14:47:56
220 bytes
htmlWindow - maak een scherm aan waarin html code weergegeven kan worden CALL: HWIN = htmlWindow(title, text) INPUT: title: string, titel van het scherm text: string, weer te geven text, eventueel in HTML OUTPUT: HWIN: handle
ModelitUtilRoot
10-Mar-2010 10:20:38
2616 bytes
ModelitUtilRoot
03-Dec-2002 21:20:24
20480 bytes
image2cdata - return cdata from png file and insert transpartant value
SUMMARY
Note on image files, microsoft paint and transparancy
Microsoft paint can save truecolor images and and N-color bitmaps (N=256
or 8). To make a bmp or png file that can be used with this utility save
in N-color mode.
CALL
cdata=image2cdata(imFile,backg)
INPUT
imFile:
name image file. This must be a file readable with imread
backg:
replace transparant values with this value
OUTPUT
cdata
truecolor matrix
ModelitUtilRoot
15-Aug-2008 17:51:38
1152 bytes
installjar - Create a classpath.txt file.
SUMMARY:
Modelit provides a number of functions 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.
These 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 moved 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)
ModelitUtilRoot
25-Aug-2009 14:01:52
6371 bytes
is_eq - verify if argument pairs are equal
CALL
equal=is_eq(arg1,arg2,arg3,arg4,...)
INPUT
arg1,arg2: first argument pair
arg3,arg4: second argument pair
...: etc
OUTPUT
equal: 1 if all argument pairs have corresponding size and are equal
NOTE
function is verbose if no output arguments are required
EXAMPLE (non verbose mode)
>> a=is_eq(1,0)
a =
0
EXAMPLE (verbose mode)
>> is_eq(1,0)
Arg 1,2: Not equal, Max Abs Diff = 1.000000
ModelitUtilRoot
02-Aug-2010 10:56:20
6084 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:
ismember (Matlab native)
is_in (deals with vectors)
is_in_id (return matched IDs instead of indices)
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)
ModelitUtilRoot
18-Jun-2009 12:32:31
5597 bytes
is_in_interval - similar to is in, but returns indices of interval
memberships rather than equalities
CALL
elm=is_in_interval(M,interval)
INPUT
M: matrix with data (may contain NaN values)
interval: interval definitions
interval(N,1): definition of lower of intervals (begin)
interval(N,2): definition of intervals (begin-end)
OUTPUT
elm: returns indices >1 for each element of g which corresponds to
interval in h
SEE ALSO
is_in (deals with vectors)
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)
ModelitUtilRoot
25-Dec-2008 16:10:34
1710 bytes
is_in_sort - accelerated verion of is in for sorted vectors
CALL
function elm=is_in_sort(g,h)
function elm=is_in_sort(g,h,SORTSTAT_g)
function elm=is_in_sort(g,h,SORTSTAT_g,SORTSTAT_h)
INPUT
g: vector with elements to be located (sorted)
h: vector in which elements are looked for (sorted)
SORTSTAT_g,SORTSTAT_h: true if g/h are sorted
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
SEE ALSO
is_in (deals with vectors)
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)
ModelitUtilRoot
22-Jul-2008 23:53:23
2255 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 table_ismember
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)
table_ismember (deals with table structure)
findstructure (find a structure in a structure array)
ModelitUtilRoot
19-Jun-2009 13:48:59
4991 bytes
islicense - check if license code is available in file
CALL
OK=islicense(fname,str,label)
INPUT
fname: name of license file
str: license code to look for
OUTPUT
OK: 1 if license found
0 if file does not exist or license does not appear in it
ModelitUtilRoot
16-Aug-2008 13:57:47
673 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
TABLE DEFINITION (added by ZIJPP 2001225)
A table structure is a structure that meets the following conventions.
- A table structure is a single structure with 0, 1 or more columns
- If a table contains more than 1 column, all columns must be equal height
- A column may be one ofd the following
- a numeric or char array, including:
- empty arrays ([0xW numeric or char])
- vectors of NILL elements ([Hx0 numeric or char])
- The preferred way to initialize an empty table structure is:
T=struct ==> T= 1x1 struct array with no fields
- By convention an empty scalar array or an empty struct array may be
used to initialize an empty table structure:
T=[] or T = struct([])
KNOWN ISSUES
tableselect removes fieldnames if all rows of a table are removed
EXAMPLE
if ~istable(S)
error('Assertion failed: variable is not a table structure');
end
ModelitUtilRoot
25-Dec-2009 16:39:03
2369 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
ModelitUtilRoot
20-Apr-2009 11:34:47
2271 bytes
legedit -
CALL:
opt = legedit('empty')
opt = legedit('empty',datatype)
opt = legedit('empty',datatype,legendtype)
opt = legedit('install',opt,SHOWCONTROLFRAME)
INPUT :
For call "legedit('empty',datatype,legendtype)"
optie: empty or install
datatype (default 1)
1 ==> scalaire legenda
2 ==> datum legenda
legendtype (default 1)
1 ==> continu
2 ==> geklassificeerd
INPUT
For call "opt=legedit('install',opt,SHOWCONTROLFRAME)"
opt: legend data (see OUTPUT spec)
SHOWCONTROLFRAME: show legend mode selection frame
OUTPUT
opt: een struct met default opties
+----date: domein van de legenda
| opt.date=1 ==> scalaire legenda
| opt.date=2 ==> datum legenda
+----type: type van de legenda
| opt.type=1; %continu
| opt.type=2; %geklassificeerd
+----mapfun : colormapfunctie, bijv ='jet'
+----N=64 : aantal te onderscheiden stappen
+----map : nog niet in gebruik
+----range : bereik van de legenda
| opt.range=1 ==> automatisch
| opt.range=2 ==> vast
+----min : indien bereik vast: minimum waarde
+----max : indien bereik vast: maximum waarde
See also: displaylegend, getcolorcode, getcolordat
ModelitUtilRoot
09-Apr-2009 17:50:31
29597 bytes
linedit - edit contour line
CALL:
cntr = linedit(optie,editaxes,cntr)
INPUT:
optie: <string>
install: start controureditor in draw mode
lineopt: start contoureditor in line modification mode
editaxes: <handle> van de axes waarin punten worden toegevoegd
cntr: <struct> met te wijzigen contour data (mag ook leeg zijn)
OUTPUT:
cntr: <struct> met gewijzigde contour data (is leeg bij CANCEL actie)
velden:
- xy: puntenverzameling
- name: naam
- lineopt: handle graphics opties
ModelitUtilRoot
08-May-2009 14:32:56
45258 bytes
linpropoptions - definieer default line properties (Dutch locale)
CALL
textopt=linpropoptions
INPUT
no input arguments used
OUTPUT
textopt: options for line editor. These options are used to
initialize workspace
textopt[](struct array)
+----label (char array) : label naar gebruiker
+----name (char array) : ui property name (Matlab)
+----opt (cell array) : keuze mogelijkheden
+----type (char array) : int, choice
+----default (char array): defaultwaarde
See also: linedit
ModelitUtilRoot
15-Aug-2008 14:44:13
2291 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)
ModelitUtilRoot
21-Nov-2005 12:00:15
3013 bytes
ModelitUtilRoot
17-Mar-2008 18:08:03
20480 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
ModelitUtilRoot
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);
ModelitUtilRoot
23-Jan-2006 01:28:46
5408 bytes
THIS FUNCTION IS NO LONGER IN USE (ZIJPP 08 2008)
ModelitUtilRoot
15-Aug-2008 15:46:06
3665 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,'');
ModelitUtilRoot
15-Aug-2008 14:48:17
7288 bytes
mbdlegend - (her)installeer legenda of voer
callback van legenda uit
CALL:
mbdlegend(h1,h2,optie)
INPUT
opt=h1
opt.LEGAXESTAG
opt.BUTTONTAG
opt.AXESTAGS
opt.FRAMETAG
Als functie zonder argumenten wordt aangeroepen, wordt
legend in standaard opmaak geplot.
OUTPUT
RESIZEDELAYED: resize is nog niet uitgevoerd maar wel nodig
APPROACH
ModelitUtilRoot
15-Aug-2008 16:40:22
6941 bytes
mbdoverbutton - return handle of button under cursor
CALL
h = mbdoverbutton(Type)
INPUT
Type: this argument is not used
OUTPUT
h: handle of button, empty if cursor is not over button
NOTE
This function will no longer be needed in the future
ModelitUtilRoot
15-Aug-2008 13:51:27
1143 bytes
mbdparse - parse user input
CALL
mbddisplay(h,val);
display argument "val" in object "h"
[val,ok]=mbdparse
[val,ok]=mbdparse(h)
retrieve 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
www.modelit.nl/modelit/matlabnotes/mbdparse-dropdown.pdf
ModelitUtilRoot
15-Apr-2010 12:44:06
30770 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
ModelitUtilRoot
03-Jul-2003 11:50:20
339 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
ModelitUtilRoot
03-Jul-2003 12:04:32
345 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
ModelitUtilRoot
16-Aug-2008 10:07:18
4580 bytes
msg_temp - display message that goes away after a few second INPUT/OUTPUT: see warndlg
ModelitUtilRoot
27-Nov-2008 10:16:22
1200 bytes
multipatch - create multiple patches fron NaN separated vectors
CALL
h=multipatch(x,y,z,varargin)
INPUT
x: vector with patch contour (x data)
y: vector with patch contour (y data)
z: vector with patch contour (z data)
OUTPUT
h: handles of patches that are created
NOTE
patches may be separated by a NaN in the x coordinate
ModelitUtilRoot
16-Sep-2004 12:44:25
933 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 can
not be used to change an existing waitbar figure.
OUTPUT:
HWIN: <handle> of the figure with the waitbar(s)
SHORT EXAMPLE: multiwaitbar('uniqueTag',10,'10%','name','example')
EXAMPLE:
hwait=multiwaitbar('loop1',0,'','name','Check');
for k=1:10
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
closewaitbar
ModelitUtilRoot
05-May-2010 14:58:35
12871 bytes
multiwaitbarc - plot conditional multiwaitbar
CALL
HWIN = multiwaitbar(PLOT,bartag,x,wbtext,varargin)
HWIN = multiwaitbar(PLOT,bartag,x,wbtext,'stopb','abort',varargin)
HWIN = multiwaitbar(PLOT,bartag,x,wbtext,'suspb','abort',varargin)
HWIN = multiwaitbar(PLOT,bartag,x)
HWIN = multiwaitbar(PLOT,bartag,-1)
INPUT:
PLOT:
<boolean> plot waitbar if 1
next arguments:
see multiwaitbar
OUTPUT:
HWIN: see multiwaitbar
NOTE:
for detailed description, see manual page of multiwaitbar
See also: multiwaitbar
ModelitUtilRoot
16-Aug-2008 11:18:26
765 bytes
ModelitUtilRoot
15-Dec-2006 09:28:13
20480 bytes
offon - replace 0 with 'off' and 1 with 'on'
CALL:
val = offon(val)
INPUT:
val: 0,1 or character string
OUTPUT:
val: string, possible values: 'off' or 'on'
ModelitUtilRoot
13-Apr-2009 12:04:26
362 bytes
organizeFocus - zet de focus volgorde van de objecten met handle
CALL:
organizeFocus(obj)
INPUT:
h: array of handles
OUTPUT:
no direct output, the nextfocusablecomponent for each jacontrol
object is set, the user can walk through the
components with tab and shift-tab.
ModelitUtilRoot
05-Feb-2008 14:09:34
929 bytes
paintswitch - make cdata of uicontrol consistent with value property
CALL
paintswitch(h)
INPUT
h: uicontrol handle
INDIRECT INPUT
get(h,'val'): current value associated with object
getappdata(h,'cdata'): cdata that will be used in image
OUTPUT
This function returns no output arguments
EXAMPLE
setappdata(h, 'cdata', button);
paintswitch(h);
ModelitUtilRoot
15-Aug-2008 18:14:57
28649 bytes
parseform - parse a formula
CALL
result=parseform(result,str,A,B,op)
INPUT
result : intermediate result
str : formula string which may contain references to A and B
A : value of object A
B : value of object B
op : operators containing:
op.add
op.minus
op.prod
op.divide
OUTPUT
result : final result
EXAMPLES
parseform([],'A+B-10',1,2,op)
parseform(1,'+B-10',1,2,op)
parseform([],'B-10',1,2,op)
parseform(2,'-10',1,2,op)
ModelitUtilRoot
23-Aug-2010 20:14:47
2946 bytes
patchcombine_new - voeg twee contouren damen
CALL
xy = patchcombine_new(xy1,xy2,h_gca)
INPUT:
xy1,xy2: anti-clockwise partly overlappnig contours
xy2 is convex. xy1 is not necessarily convex
h_gca: handle of axes to plot in (VERBOSE mode only)
OUTPUT:
xy: combined patch: contains all exterior points of xy1 and xy2
APPROACH:
This algorithm uses the following lemma to decide if an edge crosses
the internal region of xy2
Lemma:
if:
A is a convex 2d polygon and a,b are different points on the boundary
of this polygon, and c = (a+b)/2 (or any other strict convex
combination)
then:
c on boundary of A ==> all convex combinations of a en b are on the
boundary of A
ModelitUtilRoot
15-Aug-2008 17:33:30
10600 bytes
patchvalue - callback for interactive patch labels
CALL
patchvalue(obj,event,varargin)
INPUT
obj : object that is clicked on
event : not used
varargin: <attribute,value> pairs
Table of valid attributes
ATTRIBUTE DEFAULT ACCEPTED VALUES
zdata [] numeric, char or struct arrays The
size should correspond to xdata,
meaning that if xdata is MxN
zdata can either be MxN, 1xN or 1x1
(if numeric) or zdata can be NxP or 1xP (if
chararchter) or zdata can be
If zdata is a structure array, a parse
function must be specified
textoptions arial,bold valid text options
NOTE: These options will be passed on to text object
labeltag GRIDLABEL tag attached to labels
NOTE: this tag is needed to remove the
object (overides textoptions
property)
format %.0f format string for plotting numeric values
NOTE: this property is used when
datatype is double
datatype double date or double
NOTE: use this option to display date
labels
parsefunction [] any function pointer %function used to parse results
NOTE: use this option none of the above
works. The function will be called
with one argument (the selected
zvalue)
selectmode first first or all
NOTE: when this option is selected the
search for a valid patch will stop as
soon as one is found. This speeds up
the proces but may not be what you
want if patches overlap
labellocation center center or pointer
NOTE: by default labels are plotted in the
center of each patch. alternatively they may
be plotted at the point where the user
clicks
OUTPUT
This function returns no output arguments
EXAMPLE
h_patch=patch(X,Y,Z,'facec','r','buttond',@patchvalue);
setappdata(h_patch,'datatype','date'); (optional defaults to "double")
setappdata(h_patch,'zdata',sqrt(Z)); (optional defaults to zdata from patch)
h_patch=patch(X,Y,Z,'buttond',{@patchvalue,'%.0f','center','SWANLABEL'},'parent',h_kaart);
...
delete(findobj('tag','SWANLABEL'); %this removes the labels for this patch
while leaving other labels intact
ModelitUtilRoot
15-Aug-2008 16:53:44
8110 bytes
pathcomplete - extend filename with path
CALL
pnamefname=pathcomplete(CurrentPath,fname)
IMPUT
fname : filename (possibly includes path)
OUTPUT
CurrentPath
pnamefname
ModelitUtilRoot
28-Apr-2003 14:21:09
427 bytes
point2button - move cursor specific object
CALL
point2button(h)
INPUT
h=handle of object
OUTPUT
This function returns no output arguments
ModelitUtilRoot
15-Aug-2008 16:46:43
1038 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
ModelitUtilRoot
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]
ModelitUtilRoot
19-Oct-2009 23:42:00
8274 bytes
print2file - start GUI for exporting graph
CALL:
HWIN = print2file
HWIN = print2file(hfig)
HWIN = print2file(obj, event, hfig, varargin)
INPUT:
obj,event: standard Matlab callback arguments
hfig: handle of figure for which to create plot
varargin: property value pairs. Accepted property names:
PROPERTY {DEFAULT}
language {'dutch'} 'english';
constants {[]};
visible {true} false;
OUTPUT:
HWIN: handle of GUI figure
EXAMPLE:
uimenu(hFile,'label','Print figure','callback',@print2file);
See also: print2file_Execute
ModelitUtilRoot
10-Mar-2010 16:20:52
32709 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
ModelitUtilRoot
15-Aug-2008 11:19:04
1592 bytes
putfile - return file with specific extension from default directory
CALL
[fname,pname]=putfile(ext,showstr,BATCHMODE,fname,tag)
INPUT
ext : extension of file to be selected
(defaultwaarde: '.m')
showstr : Text above figure
(defaultwaarde: '')
BATCHMODE : if true: suppress any interaction
(defaults to 0)
fname : default filename
(defaults to *.ext)
tag : tag for category of file. See defaultpathNew. Can be
integer or string.
(defaults to 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 (1)
[fname,pname]=putfile('txt','Save ASCII file',0,'MyFile','AsciiDump');
if ~fname
return
end
fname=[pname fname];
..
See also: UIPUTFILE PUTFILE
ModelitUtilRoot
02-Jun-2010 15:38:26
3374 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)
ModelitUtilRoot
16-Mar-2010 13:55:00
3325 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
ModelitUtilRoot
27-Mar-2008 14:10:26
549 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
ModelitUtilRoot
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
ModelitUtilRoot
27-Feb-2009 12:42:13
2565 bytes
rectedit - callback for line object that allows interactive resizing of a
rectangle
SUMMARY
this function woorks together with zoomtool
CALL
rectedit(hline,event,varargin)
INPUT
hline
handle of calling line
event
this is an unsused input argument
'exitfunc',exitfunc
function that will be called when line is removed
'stepsize',stepsize
round of value
OUTPUT
This function returns no output arguments
EXAMPLE
h=line([x1 x1 x2 x2 x1],[y1 y2 y2 y1 y1],999999999*[1 1 1 1 1],...
'tag','intarea',...
'buttond',{@rectedit,'exitfunc',@register,'stepsize',setting.param.resolution},...
'color','b','linew',2,'parent',hkrt);
See also:
ModelitUtilRoot
15-Aug-2008 14:03:42
4763 bytes
resample - resample matrix
CALL
[M,W,P,Q]=resample(x1,y1,x2,y2,M1,W1,P1,P2)
INPUT
x1(n+1): x1 original x axis (x1(1:2) contains interval for column 1
of M1)
y1(m+1): y1 original yaxes (y1(1:2) contains interval for row 1 of M1)
x2(q+1): x axis of target matrix
y2(p+1): y axis of traget matrix
M1(m,n): matrix that contains data for resampling
W1(m,n): (logical): matrix that contains 1 for data and 0 for
missing data
P1(m,n): (optional) table of properties to be copied to output grid (for example
to store reference index to grid origin)
OUTPUT
M_redib_xy(p,q): resampled matrix
W_redib_xy(p,q) (logical): matrix that contains 1 for cells that are
defined and 0 for missing values
P(p,q): (optional) cell origin is identical to element of P1 that is at the hart of
the extrapolation (but rounded to nearest cell)
See also: is_in, row_is_in, vergrid
ModelitUtilRoot
16-Aug-2008 11:19:31
8737 bytes
resiz_diag - print handle graphics informatie voor huidig scherm CALL: resiz_diag(obj, event) INPUT: obj: <handle> van het aanroepende uicontrol event: <leeg> standaar matlab callback argument OUTPUT: geen uitvoer, informatie wordt op console weergegeven% See also: findobj, gcf, mbdresize
ModelitUtilRoot
05-Mar-2007 15:22:02
1651 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
ModelitUtilRoot
02-Nov-2004 18:57:33
1212 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
ModelitUtilRoot
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 occurrance 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
ModelitUtilRoot
18-Jun-2009 11:25:17
4852 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
ModelitUtilRoot
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
ModelitUtilRoot
21-Feb-2010 15:40:15
8315 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
ModelitUtilRoot
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
ModelitUtilRoot
16-Aug-2008 11:10:26
472 bytes
INPUT
h : handle van te bewerken object
href: handle van donor object voor kleur (default: gcf)
ZIE OOK
getuicpos
ModelitUtilRoot
28-Jun-2008 16:56:41
513 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
ModelitUtilRoot
17-Apr-2009 10:33:16
10715 bytes
shiftup(hfig) - move window with multiple of its size
SUMMARY
This function is typically used to place a second waibar directly
above the first one. Note that nowadays multiwaitbar is available for
displaying stacked waitbars.
CALL:
shiftup(hfig,direction)
INPUT:
hfig: figure handle
direction: [vertical,horizontal] movement
default: [1,0]
OUTPUT:
This function returns no output arguments
See also: multiwaitbar
ModelitUtilRoot
29-Sep-2009 17:38:02
772 bytes
showcolormap_direct - Plot colormap
CALL
showcolormap_direct(hax,range,cmap)
INPUT
hax: axes om in te plotten
range: bereik van colormap
cmap: te plotten colormap
OUTPUT
This function returns no output arguments
NOTES
- This function plots the colormap as collection of patches
- a similar function , showcolormap, derives range from objects in
axes
See also: showcolormap
ModelitUtilRoot
16-Aug-2008 10:22:14
1853 bytes
showcolortable - Toon colormap in axes
CALL:
showcolortable(opt,hax,hreferred)
INPUT:
opt: optie met alle colormap data ZIE OOK "legedit.m"
een struct met default opties
opt.date: domein van de legenda
opt.date=1 ==> scalaire legenda
opt.date=2 ==> datum legenda
opt.type: type van de legenda
opt.type=1; %continu
opt.type=2; %geklassificeerd
opt.mapfun : colormapfunctie, bijv ='jet'
opt.N=64 : aantal te onderscheiden stappen
opt.map : ?
opt.range : bereik van de legenda
opt.range=1 ==> automatisch
opt.range=2 ==> vast
opt.min : indien bereik vast: minimum waarde
opt.max : indien bereik vast: maximum waarde
hax: axes waarin colorbar wordt geplot
hreferred: axes waarvan clim property mag worden afgeleid
OUTPUT:
geen directe uitvoer,
APPROACH:
creer een imape met juist het goede aantal patches om colormap volledig
te visualiseren, let op! vorige colormap wordt overschreven
STAP 1: bepaal de range
STAP 2: bepaal de weer te geven waardes
ModelitUtilRoot
27-Sep-2005 17:49:44
3217 bytes
slashpad - complement path with filesep symbol
CALL
str=slashpad(str)
INPUT
str: filename
OUTPUT
setr: filename appended with file separator
ModelitUtilRoot
15-Aug-2008 13:03:27
357 bytes
speed - return colormap for speed plots
CALL
cmap=speed
cmap=speed(NUM)
INPUT
NUM: required height for the color map
OTPUT
cmap:
[NUM x 3] colormap
colormap for traffic applications
highspeed ==> green
midspeed ==> blue
lowspeed ==> red
ModelitUtilRoot
09-Apr-2009 22:34:52
1279 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
closewaitbar
ModelitUtilRoot
07-Oct-2008 09:55:05
920 bytes
convert string to fieldname that can be used in Matlab structure
ModelitUtilRoot
21-Feb-2006 13:10:21
554 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
ModelitUtilRoot
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
ModelitUtilRoot
20-Jan-2008 11:29:20
883 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));
ModelitUtilRoot
16-Aug-2008 13:52:44
1722 bytes
structcat - concatinate deep level structure fields
SUMMARY
Similar to Matlab CAT command, but works on structures with multiple
levels
CALL
result=structcat(DIM,S,FIELD1,FIELD2,..)
INPUT
DIM: direction for concatenation
S: structure array from wich to retreive data
FIELD1,FIELD2,..: path thta defines the data
OUTPUT
result: concatinated content of S.FIELD1.FIELD2
NOTE (1) (limitation)
structcat only works on structures
NOTE (2)
structcat(N,S,FIELD) is equivalent to cat(N,S.FIELD)
ModelitUtilRoot
15-Aug-2008 17:45:33
804 bytes
structref - shorthand way for creating substruct array for common cases
CALL
S=structref(flds)
INPUT
flds: cell array with fields
OUTPUT
S: substruct array
EXAMPLE
if nargin==0
S.a.b.c=1;
flds={'a','b','c'};
S=subsasgn(S,structref(flds),11);
disp(subsref(S,structref(flds)));
return
end
ModelitUtilRoot
16-Aug-2008 14:21:39
447 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
ModelitUtilRoot
25-Jul-2006 16:51:58
443 bytes
texslash - prepare non TeX string for TeX interpreter
SUMMARY
prepare non TeX string for TeX interpreter so that it will display
correctlty. This istypically done when file names that contain "\"
symbols are plotted using the Matlab text command.
texslash:
replace "\" with "\\" so that Tex will recognize it as "\"
replace "_" with "\_" so that Tex will recognize it as "_"
CALL
teXstr=texslash(str)
INPUT
str: input string that may or may not contain characters that TeX
considers to be special, but should be plotted in a normal
manner
OUTPUT
teXstr: adjusted string, that is plotted by TeX as "str"
ModelitUtilRoot
16-Aug-2008 11:23:54
1301 bytes
ticp -
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
ModelitUtilRoot
21-Oct-2009 06:54:10
1257 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
ModelitUtilRoot
02-Apr-2009 01:27:15
1173 bytes
callback that changes pointer while executing
CALL
The function is designed to be used in code. For use in callback see ticpevalkas apart of a HG callback. See
example.
INPUT
fp: function handle or function name
varargin: arg1, arg2, etc. To be passed to fp
OUTPUT
varargout: output of fp
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
ModelitUtilRoot
20-Feb-2008 23:11:57
960 bytes
toStr - convert object to string representation
CALL:
value = toStr(value)
INPUT
value: any matlab variable
OUTPUT
string: <string>
corresponding string repersentation
ModelitUtilRoot
16-Aug-2008 15:23:51
2147 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;
ModelitUtilRoot
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
ModelitUtilRoot
26-Jan-2010 17:49:54
17180 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');
ModelitUtilRoot
26-Jan-2010 17:27:28
7090 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))
ModelitUtilRoot
09-Jan-2007 15:55:50
955 bytes
solver for traveling salesman problem
CALL
p=tsp(D)
INPUT
D: distance matrix
OUTPUT
indx: index for optimal sort of datapoints
NOTE
the traveling salesman problem is NP hard.
for small problems a brute force method is used
for larger problems a randomized heuristic is used (derived from the Matlab TSP demo)
The file also contains a branch and boud code, but this one is not in
use. Allthough tests indicate it works.
ModelitUtilRoot
01-Oct-2004 15:38:30
4657 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
ModelitUtilRoot
20-Mar-2009 15:57:02
1855 bytes
ModelitUtilRoot
05-Nov-2001 11:31:50
7168 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
ModelitUtilRoot
28-Jul-2008 22:03:24
372 bytes
validFileName - Remove symbols from FNAME that might cause problems when saving a file
CALL
FNAME=validFileName(FNAME,validsymbol)
INPUT
FNAME: proposed filename
validsymbol: acceptable symbols (these may be application dependent)
if not specified: use set that is acceptable to DOS
OUTPUT
FNAME: filename with illegal symbols removed
BACKGROUND
Possible Namespaces
0: POSIX
This is the largest namespace. It is case sensitive and allows
all Unicode characters except for NULL (0) and Forward Slash '/'.
The maximum name length is 255 characters. N.B. There are some
characters, e.g. Colon ':', which are valid in NTFS, but Windows
will not allow you to use.
1: Win32
Win32 is a subset of the POSIX namespace and is case insensitive.
It uses all the Unicode characters, except: '"' '*' '/' ':' '<'
'>' '?' '\' '|' N.B. Names cannot end with Dot '.', or Space ' '.
==> EXCLUDE: '"*/:<>?\|'
2: DOS
DOS is a subset of the Win32 namespace, allowing only 8 bit upper
case characters, greater than Space ' ', and excluding: '"' '*'
'+' ',' '/' ':' ';' '<' '=' '>' '?' '\'. N.B. Names must match
the following pattern: 1 to 8 characters, then '.', then 1 to 3
characters.
3: Win32 & DOS
This namespace means that both the Win32 and the DOS filenames
are identical and hence have been saved in this single filename
record.
ModelitUtilRoot
15-Aug-2008 17:29:32
1882 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
ModelitUtilRoot
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
ModelitUtilRoot
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
ModelitUtilRoot
15-Aug-2008 16:52:05
2034 bytes
waitbarc - plot conditional waitbar
CALL
hwait=waitbarc(PLOT,val,hwait,varargin)
INPUT
PLOT : plot waitbar if 1
val : display value
hwait : handle
str : title
OUTPUT
hwait: handle
EXAMPLE
tic
hwait=[];
for k=1:L
hwait=waitbarc(toc>5,1/L,hwait,'loop')
< ... >
end
close(hwait);
SEE ALSO
shiftup
ModelitUtilRoot
15-Aug-2008 16:22:29
677 bytes
shortcut code for modal warning dialog
ModelitUtilRoot
27-Jun-2009 21:45:59
189 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
ModelitUtilRoot
16-Sep-2006 10:10:13
237 bytes
windowpostion - convert normalized window position to matlab window pixel coordinates
so that matlab window inclusive border fits area
NOTE: this function will become obsolete. Use windowposV7 instead.
CALL
inner_position=windowpixel(outer_position,menupresence)
INPUT
outer_position; required normalized position of window (with borders)
menupresence [menu toolbar]
menupresence(1):
1: if one or more drop down menus are present
0: otherwise
menupresence(2):
1: if toolbar is present
0: otherwise
OUTPUT
inner_position: Matlab window position vector borders excluded
(if 'menus' vector applies)
wind: structure met de volgende veldeN:
wind.BorderWidth,
wind.TitleHeight,
wind.MenuHeight,
wind.ToolbarHeight
FILES READ FROM
height of border, toolbar and menus are retrieved with GETPRF1
zie screensetting
NOTE
since Matlab V7 the behaviour of Matlab is slightly changed.
This behaviour is observed:
When a toolbar or menubar is added, the height of teh figure
increases. Matlab attempts to extend the figure at the top, but only
does so if there is room available at the desktop.
otherwise the figure will be expanded downwards.
SEE ALSO:
windowposV7
APPROACH
haal de structure 'wind' op met GETPRF1.
De structure 'wind' heeft de volgende velde:
wind.BorderWidth,
wind.TitleHeight,
wind.MenuHeight,
wind.ToolbarHeight
Bepaal inner_position uit outer_pixel_position met de volgende aanpassingen:
Ondergrens : ophogen met BorderWidth
Linkerpositie: ophogen met BorderWidth
Breedte : 2 maal BorderWidth eraf trekken
Hoogte : BorderWidth,TitleHeight,ToolbarHeight eraf trekken%
ModelitUtilRoot
15-Aug-2008 18:33:43
5367 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
ModelitUtilRoot
11-Jan-2007 13:01:18
1440 bytes
writeoptions - CALL: writeoptions(optionsfile,strct,cmnt) INPUT: optionsfile: strct: cmnt: OUTPUT: no output
ModelitUtilRoot
05-Dec-2006 01:57:26
908 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
ModelitUtilRoot
20-Oct-2005 15:28:47
1351 bytes
zeromat - create a matrix with zeros of specific types
CALL
v=zeromat(sz,type)
INPUT
sz : size of required matrix
type : char str with type
OUTPUT
v: initialized matrix
REMARK
v=zeromat([10000 10000],'int8') is equivalent to v=int8(zeros(10000,10000))
but much faster
REMARK2
v=repmat(int8(0),10000,10000) achieves the same
SEE ALSO
repmat
ModelitUtilRoot
15-Aug-2008 17:30:11
665 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 zoom to predefined values
Example: zoomtool(11,'axes',hax,'xlim',xlim,'ylim',ylim)
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)
18 return zoomhandle
19 change view so that specific hg object fit
20 center view on selected objects, do not resize
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)
ModelitUtilRoot
22-Apr-2010 10:11:46
52804 bytes
about - maak een about object aan waarin een applicatie beschreven kan
worden
CALL
obj = about(varargin)
INPUT:
varargin:
OUTPUT:
obj: <about-object>
ModelitUtilRoot\@about
17-Aug-2008 12:42:28
646 bytes
addItem - voeg een item toe aan het about-object CALL: obj = set(obj,property,value) INPUT: obj: <about-object> item: <(cell)string> met de nieuwe item(s) OUTPUT: obj: <about-object>
ModelitUtilRoot\@about
18-Aug-2005 09:12:32
441 bytes
display - de standaard display functie van matlab voor een about-object CALL: display(obj) INPUT: obj: <about-object> OUTPUT: geen directe uitvoer, informatie over het about-object wordt afgedrukt op de console
ModelitUtilRoot\@about
12-Sep-2005 10:03:36
583 bytes
get - get de waarde van een property uit het about-object
CALL:
obj = get(obj, property)
INPUT:
obj: <about-object>
property: <string> met het te zetten veld in het about-object
OUTPUT:
value: <string> met de waarde van het gespecificeerde veld
(property) in het about-object
ModelitUtilRoot\@about
16-Jul-2007 10:49:20
589 bytes
noItems - bepaal het totale aantal items in het about-object
CALL:
N = noItems(obj)
INPUT:
obj: <about-object>
OUTPUT:
N: <integer> met het totaal aantal items dat aanwezig is in het
Item veld van het about-object
ModelitUtilRoot\@about
18-Aug-2005 07:56:34
337 bytes
removeItem - voeg een item toe aan het about-object CALL: obj = removeItem(obj,index) INPUT: obj: <about-object> index: <vector of int> met de indices van de te verwijderen items OUTPUT: obj: <about-object>
ModelitUtilRoot\@about
18-Aug-2005 09:34:56
710 bytes
set - set een property in het about-object
CALL:
obj = set(obj,property,value)
INPUT:
obj: <about-object>
varargin: property-value paren:
property: <string> met het te zetten veld in het
about-object
value: <string> met de waarde voor het veld(property)
in het about-object
OUTPUT:
obj: <about-object>
ModelitUtilRoot\@about
10-Jan-2006 16:14:48
1353 bytes
view - de standaard display functie van matlab CALL: display(obj) INPUT: obj: <xml-object> OUTPUT: geen directe uitvoer, informatie over het xml-object wordt afgedrukt op de console
ModelitUtilRoot\@about
15-Sep-2005 12:22:16
1526 bytes
delaywindow -
CALL:
obj = delaywindow(varargin)
INPUT:
varargin: properties to be passed on to the "figure" command (has no
effect when figure already exists)
SPECIAL KEYWORDS:
- 'delay' seconds to popup
- 'text' textstring to show left of animated arrow
- 'title' figure name
OUTPUT:
active: <boolean>
EXAMPLE 1:
dw = delaywindow('text', 'Processing data', 'delay', 2, 'title', 'Waiting for Matlab');
start(dw);
for k=1:10,k
for r=1:10:100
if ~isactive(dw)
return
end
pause(0.05)
end
end
stop(dw);
EXAMPLE 2:
dw = delaywindow;
start(dw);
set(dw,'title','figurename');
set(dw,'text' ,'comment');
stop(dw)
ModelitUtilRoot\@delaywindow
22-Mar-2009 16:10:11
1765 bytes
get - get de waarde van een property uit het delaywindow-object
CALL:
obj = set(obj,property)
INPUT:
obj: <about-object>
property: <string> met het te zetten veld in het about-object
OUTPUT:
value: <string> met de waarde van het gespecificeerde veld
(property) in het delaywindow-object
ModelitUtilRoot\@delaywindow
16-Jul-2007 13:43:07
619 bytes
isactive - bepaal of het delaywindow is weggeklikt door de gebruiker
CALL:
obj = set(obj)
INPUT:
obj: <delaywindow-object>
OUTPUT:
b: <boolean> true, window is actief
false, window is weggeklikt door de gebruiker
See also: delaywindow
ModelitUtilRoot\@delaywindow
16-Jul-2007 13:43:07
347 bytes
set - zet properties van delaywindow object
CALL:
obj = set(obj, property, value)
INPUT:
obj: <about-object>
varargin: property-value paren:
property: <string> met het te zetten veld in het
about-object
value: <string> met de waarde voor het veld(property)
in het delaywindow-object
OUTPUT:
obj: <delaywindow-object>
APPROACH:
beschikbare velden: title, text en delay
See also: delaywindow
ModelitUtilRoot\@delaywindow
19-Jul-2007 22:36:22
1422 bytes
set - start delaywindow CALL: obj = set(obj) INPUT: obj: <delaywindow-object> OUTPUT: geen uitvoer, het delaywindow wordt geactiveerd na <delay> seconden See also: delaywindow
ModelitUtilRoot\@delaywindow
16-Jul-2007 13:43:08
257 bytes
set - stop delaywindow CALL: obj = set(obj) INPUT: obj: <delaywindow-object> OUTPUT: geen uitvoer, het delaywindow wordt gedeactiveerd See also: delaywindow
ModelitUtilRoot\@delaywindow
08-Jan-2008 18:49:26
286 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
ModelitUtilRoot\@filechooser
25-Feb-2010 08:50:44
9048 bytes
get_opt - returns the filechooser's undoredo object CALL: opt = get_opt(obj) INPUT: obj: <filechooser-object> OUTPUT: opt: <undoredo-object>
ModelitUtilRoot\@filechooser
18-Sep-2006 18:28:14
249 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
ModelitUtilRoot\@filechooser
12-Jun-2008 08:07:28
356 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
ModelitUtilRoot\@filechooser
26-Nov-2009 19:08:28
797 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
ModelitUtilRoot\@filechooser
02-Mar-2008 20:35:40
440 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
ModelitUtilRoot\@filechooser\private
02-Mar-2008 20:13:34
3358 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');
ModelitUtilRoot\@helpmenuobj
08-May-2007 11:43:01
522 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
ModelitUtilRoot\@helpmenuobj
13-Jul-2005 00:21:07
1174 bytes
addfile - add file to help form
CALL:
obj = addfile(obj,name,fname,varargin)
INPUT:
obj: object of type helpmenuobj
name: string with description of document; appears in menu
fname: string with url point to file
OUTPUT:
obj: object of type helpmenuobj
ModelitUtilRoot\@helpmenuobj
28-Oct-2009 17:52:36
548 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
ModelitUtilRoot\@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
ModelitUtilRoot\@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.
ModelitUtilRoot\@helpmenuobj
17-Aug-2008 12:50:24
407 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
ModelitUtilRoot\@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
ModelitUtilRoot\@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
ModelitUtilRoot\@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
ModelitUtilRoot\@helpmenuobj
08-Feb-2008 13:05:42
4924 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:
ModelitUtilRoot\@helpmenuobj
17-Dec-2009 07:46:02
9275 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
ModelitUtilRoot\@helpmenuobj
08-Feb-2007 15:35:52
1873 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
ModelitUtilRoot\@helpmenuobj
17-Aug-2008 12:47:41
359 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.
ModelitUtilRoot\@helpmenuobj\private
17-Aug-2008 12:53:20
459 bytes
WIJZ ZIJPP 20100415 This file was modified to obtain a more robust behaviour in compiled mode Preference files are now stored in local directory (pwd) File is identical to "addpref" but all calls to "prefutils" are replaced by calls to "prefutilsModelit"
ModelitUtilRoot\PublicFiles
15-Apr-2010 11:45:39
1535 bytes
WIJZ ZIJPP 20100415 This file was modified to obtain a more robust behaviour in compiled mode Preference files are now stored in local directory (pwd) File is identical to "getpref" but all calls to "prefutils" are replaced by calls to "prefutilsModelit"
ModelitUtilRoot\PublicFiles
15-Apr-2010 11:42:10
4014 bytes
WIJZ ZIJPP 20100415 This file was modified to obtain a more robust behaviour in compiled mode Preference files are now stored in local directory (pwd) File is identical to "ispref" but all calls to "prefutils" are replaced by calls to "prefutilsModelit"
ModelitUtilRoot\PublicFiles
15-Apr-2010 11:40:20
1614 bytes
Identical to prefultils but retrieve preference files from pwd location in compiled mode.
ModelitUtilRoot\PublicFiles
15-Apr-2010 12:48:24
3572 bytes
WIJZ ZIJPP 20100415 This file was modified to obtain a more robust behaviour in compiled mode Preference files are now stored in local directory (pwd) File is identical to "setpref" but all calls to "prefutils" are replaced by calls to "prefutilsModelit"
ModelitUtilRoot\PublicFiles
15-Apr-2010 12:18:15
2168 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 )
ModelitUtilRoot\RWSnat
16-Aug-2008 18:47:24
1734 bytes
GetIndex - Bepaal indices die bij x horen z.d.d. x0+(index-1)*stap < x < x0+index*stap
CALL
ind=Get1DIndex(x,x0,stap)
INPUT
x: lijst met waarden (evt int datatype)
x0: beginwaarde grid
stap: stapgroote grid
OUTPUT
ind: berekende indices
Let op! NaN waardes wordenop index==0 afgebeeld!!
VOORBEELD
Get1DIndex(1.0000,1,1)=1
Get1DIndex(1.9999,1,1)=1
Get1DIndex(2.0000,1,1)=2
AANPAK
- bepaal offset tov referentie en deel door stapgrootte
- converteer tijdelijk naar doubles
- voer de berekening in stappen van 500 000 uit om het claimen van teveel geheugen te vermijden
ModelitUtilRoot\RWSnat
15-Aug-2008 16:44:57
1449 bytes
Get2DIndex - Bepaal de lineaire indices die bij x,y paren horen
CALL
ind=Get2Dindex(xy,x0,xstap,y0,ystap,sz)
INPUT
xy: lijst met xy paren
x0: beginwaarde grid (x richting)
xstap: stapgroote grid (x richting)
y0: beginwaarde grid (y richting)
ystap: stapgroote grid (y richting)
sz: sz(1) aantal stappen in ygrid
sz(2) aantal stappen in xgrid
OUTPUT
ind: berekende indices
AANPAK
- Deze functie is alleen toepasbaar op grids met een vaste stapgrootte
- Bepaal de indices in de aparte dimensies (Get1DIndex)
- Bereken 2D index op basis van 1D indices (sub2ind)
- Voer de berekening in gedeeltes uit om het claimen van teveel geheugen te vermijden
SEE ALSO:
Get1DIndex GetGridIndex
ModelitUtilRoot\RWSnat
04-Feb-2004 14:35:43
3189 bytes
arcgridread - lees data in uit ARC grid formaat
CALL
arcgridread(fname)
INPUT
fname: naam van de invoer file
OUTPUT
S : structure met de volgende velden
xllcorner : Links Onder X coordinaat
yllcorner : Links Onder Y coordinaat
cellsize : gridstap
NODATA_value : In te vullen waarden bij hiaten
data : matrix met data punten (in INT32 formaat)
(mits succesvol, anders:)
S=0 ==> file 'fname' bestaat niet
S=-1 ==> file 'fname' heeft niet herkend formaat
AANPAK
Deze functie is geimplementeerd als mex file.
De file arcgridread_external.c bevat de corresponderende C-code
Gebruik:
mcc -x arcgridread arcgridread_external.c
om deze mex file te bouwen
De ASCIIGRID files bevatten een aantal kolommen en een aantal rijen
De waardes xllcorner, yllcorner, cellsize, ncols en nrows bepalen het xgrid en ygrid
Het Getal dat in het Ascii grid linksboven staat hoort bij de cel xgrid(1), ygrid(end)
LET OP!
Deze procedure leest alleen de ruwe data in. Vanwege de opslag conventie van Matlab arrays
was het handiger om de matrix in transpose vorm en 'op zijn kop' in te lezen.
De c-routine leest de matrix daarom in 'transpose' vorm in.
De matrix dient dus naderhand getransponeerd te worden.
Om te zorgen dat uiteindelijk de celwaarde (1,1) hoort bij xgrid(1), ygrid(1) moet de matrix ook
nog een keer 'op z'n kop' gezet worden.
Ook deze handeling blijft in het c programma achterwege en moet naderhand in Matlab uitgevoerd worden.
ModelitUtilRoot\RWSnat
31-Mar-2005 12:45:06
4043 bytes
ModelitUtilRoot\RWSnat
31-Mar-2005 12:06:48
20480 bytes
ModelitUtilRoot\RWSnat
29-Oct-2004 15:35:50
36864 bytes
findhull: find hull that encloses all x,y points
SUMMARY
this function is used to create stylistic plots of grids
CALL:
[xcntr,ycntr,xcntr_in,ycntr_in]=findhull_discrete(N,f_hiaat)
INPUT:
x: vector of x values
y: vector of y values
gridsize_x: round to nearest multiple (x-direction)
gridsize_y: round to nearest multiple (y-direction)
OUTPUT
xcntr,ycntr:
Outer contour. This encloses data points.
Multiple contours are returned seperated by NaN values.
xcntr_in,ycntr_in
Inner contour. Anything inside is excluded
Multiple contours are returned seperated by NaN values.
APPROACH:
De methode gaat als volgt:
Maak een grid met een vrij te kiezen stapgrootte (bij benadering de zoekstraal)
Bepaal op basis van de xy punten welke gridcellen gevuld zijn (deze cellen worden 1, rest 0)
Elke gridwaarde correspondeerd met de cel rechtsboven het punt
Het aantal x waarden is gelijk aan het aantal gridcellen
Het aantal y waarden is gelijk aan het aantal gridcellen
Zie voorbeeld
0000000
0011111
0011100
0011100
0011111
0000000
Breidt het grid uit tot een grid waarvan de cellen 1 zijn als een tenminste
het vierkant LB, RB,LO of RO gevuld is met 1 of meer datapunten.
Dit grid correpondeeert met de randpunten van de bovenstaande gridcellen.
Het aantal x waarden is gelijk aan het aantal gridcellen+1
Het aantal y waarden is gelijk aan het aantal gridcellen+1
Zie voorbeeld
00000000
00111111
00111111
00111100
00111111
00111111
00000000
Zoek een startpunt. Bijvoorbeeld: het meest linkse punt (bij meerdere
de bovenste). Probeer steeds het volgende:
kun je naar boven (^)?
ja: volgend punt gevonden
nee: kun je naar rechts (>)?
ja: volgend punt gevonden
nee: kun je naar onder (v)?
etc
etc
Ga door tot je op het zelfde punt terug bent. Sla steeds de lineaire index van het gevonden punt op.
Zie voorbeeld.
00000000
00>>>>>v
00^ v<<
00^ v00
00^ >>v
00^<<<<<
00000000
Eventueel na het vinden van 1 eiland cellen op nul zetten en volgende eiland vinden.
ModelitUtilRoot\RWSnat
16-Aug-2008 11:07:26
11784 bytes
lod_smooth - Smoothing with divided differences of order 2 and adaptive weights
CALL
z = lod_smooth(x, y, lambda, alpha,fdummy);
INPUT
x: positions of data points [m]
y: heights of data points [m]
lambda: smoothing parameter
alpha: smoothing parameter
fdummy: indices van niet mee te wegen datapunten
ModelitUtilRoot\RWSnat
15-Aug-2008 13:41:25
1926 bytes
mbd_changeframe - Visualisatie
aangeroepen DBOBJ object. Ook bij UNDO en REDO.
CALL:
mbd_changeframe(signature, udnew, ind)
INPUT:
gg : structure met als enige veld de structure "opt"
ind: een CELL array met
struct arrays met velden
'type'
'subs'
queued{k}(2).subs bevat naam van te updaten veld.
ModelitUtilRoot\RWSnat
19-Mar-2009 17:50:30
7384 bytes
mbd_frameedit - start frame editor GUI
SUMMARY
Algemene frame editor, voor willekeurige frames. Bij installatie
wordt een functiepointer meegegeven. Deze wordt later via feval
aangeroepen met als argument het "frame" . "frame" is een
datastructuur die alle editable eigenschappen van het frame en de
onderliggende objecten bevat.
Het frame zelf heeft een eigen undo datastructuur. In deze
datastructuur is naast de "frame" datastructuur ook een dastructuur
met settings opgenomen die het volgende toe te voegen of te wijzigen
element van toepassing kunnen worden verklaard.
Naast deze frame editor bestaat er een algemene functie
mbd_paintframe die na het opgeven van een framehandle en de "frame"
datastructuur het frame tekent.
Fasering bij het bouwen:
- eerst wordt de frame editor onafhankelijk gebouwd;
- vervolgens wordt de frame editor vanuit een applicatie aangeropen
- tenslotte moeten ook acties als aanklikken en slepen van objecten
ondersteund worden.
CALL
HWIN=mbd_frameedit(framedata)
INPUT
framedata: frame data
OUTPUT
HWIN: handle van GUI figure
ModelitUtilRoot\RWSnat
16-Aug-2008 15:31:23
28938 bytes
mbd_paintframe - paint objects vreated with frame editor
CALL
hframe,framedata,doresize
INPUT
hframe <handle>
handle of frame
framedata
frame properties
framedata
+----frame
+----appdata: application data voor dit frame
+----uicdata : handle graphics data voor dit frame
doresize <logical>
if true: call mbdresize afterwards
OUTPUT
h_text
handles of created objects
NOTE: This file has been moved from MBDresizedir (jun 2008, Zijpp)
ModelitUtilRoot\RWSnat
16-Aug-2008 15:45:27
3921 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
ModelitUtilRoot\RWSnat
13-Apr-2010 19:06:35
4842 bytes
rootpath - prepend exeroot for files that are specified without path in
disployed mode
CALL
fname=rootpath(fname)
INPUT
fname: file specified without a path
OUPUT
fname
If not deployed mode or fname was specified with path: input.fname
Otherwise: fname =fullfile(exeroot,input.fname)
ModelitUtilRoot\RWSnat
20-Apr-2009 11:34:58
995 bytes
ModelitUtilRoot\diaroutines
02-Sep-2004 14:38:36
20480 bytes
CALL
rc=checkRKS(RKS)
INPUT
RKS
structure with RKS data
OUTPUT
rc
0 : ok
-20001 : lBegdat not ok
-20002 : lEnddat not ok
-20003 : iBegtyd not ok
-20004 : iEndtyd not ok
-20005 : end before start
ModelitUtilRoot\diaroutines
02-Aug-2010 18:10:27
1736 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
ModelitUtilRoot\diaroutines
17-Aug-2008 14:59:28
2448 bytes
diafieldnames - This function specifies the fields in the Matlab
structure for all the 'regelidentificaties' in the Donar file.
CALL:
S = diafieldnames
INPUT:
No input required.
OUTPUT:
S:
Structure with fields:
+----W3H
| +----OGI (char array)
| +----BHI (char array)
| +----ANI (char array)
| +----BMI (char array)
| +----MUX (char array)
| +----WNS (char array)
| +----PAR (char array)
| +----EHD (char array)
| +----CPM (char array)
| +----HDH (char array)
| +----ORG (char array)
| +----SGK (char array)
| +----IVS (char array)
| +----BTX (char array)
| +----BTN (char array)
| +----LOC (char array)
| +----GBD (char array)
| +----GRD (char array)
| +----RAI (char array)
| +----ANA (char array)
| +----BEM (char array)
| +----BEW (char array)
+----RKS
+----TYD (char array)
+----PLT (char array)
+----SYS (char array)
+----VGS (char array)
+----STA (char array)
+----BGS (char array)
+----BLS (char array)
+----INV (char array)
+----VZM (char array)
+----SVZ (char array)
+----SSV (char array)
+----SSS (char array)
See also: readdia_R14
ModelitUtilRoot\diaroutines
17-Jun-2010 14:00:06
4030 bytes
emptyMUX - Make default MUX (Multiplex-administratie) block.
CALL:
MUX = emptyMUX
INPUT:
No input required.
OUTPUT:
MUX:
Structure with fields:
+----iKannum (double)
+----lWnsnum (double)
+----sParcod (char)
+----sParoms (char)
+----sStaind (char)
+----nCpmcod (double)
+----sCpmoms (char)
+----sDomein (char)
+----sEhdcod (char)
+----sOrgcod (char)
+----sOrgoms (char)
+----sHdhcod (char)
+----sHdhoms (char)
+----sSgkcod (char)
See also: emptyblok
ModelitUtilRoot\diaroutines
18-Aug-2008 13:21:00
894 bytes
emptyRGH - Make default MUX (Raaigeldigheid-administratie) block.
CALL:
RGH = emptyRGH(blok)
INPUT:
blok:
(Optional) structure with DIA block, if specified create RGH blok based
on known RGH blocks.
OUTPUT:
RGH:
Structure with fields:
+----lBegdat: begin datum
+----lEnddat: einddatum (0: oneindig)
+----Raaitype (sRaityp):
| H: hulpstrandhoofdraai
| S: strandhoofdraai
| N: normale raai
+----Raaiklasse (sRaikls):
| L: landelijke raai
| V: vaklodingsraai
| P: ?
See also: emptyblok
ModelitUtilRoot\diaroutines
18-Aug-2008 13:37:16
1703 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
ModelitUtilRoot\diaroutines
18-Aug-2008 12:42:04
3518 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)
+----sCasnum
+----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
ModelitUtilRoot\diaroutines
16-Oct-2008 13:01:24
4607 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
ModelitUtilRoot\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
ModelitUtilRoot\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
ModelitUtilRoot\diaroutines
18-Aug-2008 13:48:52
1551 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
ModelitUtilRoot\diaroutines
17-Aug-2008 14:51:44
1262 bytes
meta2str - Print BLOK header to string.
CALL:
str = meta2str(BLOK, Blokfields)
INPUT:
BLOK:
Donar data block structure.
Blokfields:
Structure with fields to be printed, see routine diafieldnames.
OUTPUT:
str:
String with block header with metainfo.
See also: diafieldnames
ModelitUtilRoot\diaroutines
19-Aug-2008 08:10:30
2397 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
ModelitUtilRoot\diaroutines
18-Aug-2008 12:10:58
1394 bytes
ModelitUtilRoot\diaroutines
14-Aug-2008 10:06:50
118784 bytes
readqinsy - read or scan Qinsy datafile using mex-file
CALL:
locs = readqinsy(fname) (scan file)
locs = readqinsy(fname, locs) (read file)
INPUT:
fname: <string>
name of quinsy file. If this is the only input argument, the
output argument will only contain the header data.
locs: <struct array>
This value must be equal to or a subset of the output of
an earlier call to readqinsy. It tells the function which data to
retrieve from file.
OUTPUT:
locs:
Struct array with 1 record per location:
+----sLoccod (char array)
+----marker (double)
+----aantal (double)
+----lBegdat (double)
+----iBegtyd (double)
+----lEnddat (double)
+----iEndtyd (double)
+----xy (double)
+----z (double)
If "readqinsy" was called with 1 argument only the headeer data
will be nonempty (sLoccod, marker and aantal).
If called with 2 input arguments also the remaining (data) fields
are returned nonempty.
EXAMPLE
locs = readqinsy(fname);
data= readqinsy(fname,locs(2:2:end));
See also: readrwslod
ModelitUtilRoot\diaroutines
11-Jun-2010 22:01:25
4559 bytes
ModelitUtilRoot\diaroutines
10-Jun-2010 17:22:14
20480 bytes
ModelitUtilRoot\diaroutines
27-May-2009 18:07:30
20480 bytes
readrwslod - scan or read rwslod data file using mex file
CALL:
locs = readrwslod(fname) (scan file)
locs = readrwslod(fname, locs) (read file)
INPUT:
fname: <string>
name of rwaslod file. If this is the only input argument, the
output argument will only contain the header data.
locs: <struct array>
This value must be equal to or a subset of the output of
an earlier call to readrwslod. It tells the function which data
to retrieve from file.
OUTPUT:
locs: <struct array>
If called with only filename (scanning mode), readrewslod will
only return the header fields. A struct array with the following
fields is returned:
+----longdate (double)
+----sLoccod (char array)
+----raailocatie (double array)
+----aantal (double)
+----marker (double)
If called with 2 argumenets (read mode) a more elaborate struct
array is returned:
+----longdate (double)
+----sLoccod (char array)
+----raailocatie (double array)
+----aantal (double)
+----marker (double)
+----xy (int32 array)
+----z (int32 array)
+----lBegdat (double)
+----iBegtyd (double)
+----lEnddat (double)
+----iEndtyd (double)
EXAMPLE:
locs = readrwslod(fname);
data= readrwslod(fname,locs(2:2:end));
See also: readqinsy
revisions:
20100730 WIJZ ZIJPP: bug hersteld inlezen meervopudige raai
ModelitUtilRoot\diaroutines
30-Jul-2010 13:01:11
5115 bytes
ModelitUtilRoot\diaroutines
01-Sep-2004 17:11:09
20480 bytes
ModelitUtilRoot\diaroutines
01-Sep-2004 16:42:22
20480 bytes
readstruct - Alternative for readdia_R14. Read only Donar MetaInfo.
CALL:
Defaultopt = readstruct(fname)
INPUT:
fname:
(Optional) name of headerfile, default value = 'defaultheader.hdr'.
OUTPUT:
Defaultopt:
Structure with metainfo.
APPROACH:
Read the headerfile one line at the time.
Ignore comments.
Fill a structure with the fields specified in the lines.
At this moment only a subset of alle valid metainfo fields is supported.
See also: readdia_R14
ModelitUtilRoot\diaroutines
19-Mar-2009 16:47:06
8103 bytes
writedia - Write DIA structure to file.
CALL:
rc = 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 verifyDia
ModelitUtilRoot\diaroutines
02-Aug-2010 17:52:17
4278 bytes
ModelitUtilRoot\diaroutines
14-Aug-2008 10:06:34
98304 bytes
ExportTable - Exporteer geselecteerde rijen en kolommen van een tabel
als een Excel bestand.
CALL:
ExportTable(T, N)
INPUT:
T: jacontrol object of type jxtable
N: (optional) default categorie file t.b.v. bewaren default
directory (defaultwaarde: 1)
OUTPUT:
geen directe uitvoer, een Excel bestand met de geselecteerde rijen en
kolommen is weggeschreven
ModelitUtilRoot\jacontrol
01-Dec-2008 13:43:54
1341 bytes
add -
CALL:
obj = add(obj, jac, y, x, varargin)
INPUT:
obj: jacontrol of type jpanel
jac: jacontrol to be added to jpanel
y: row
x: column
varargin: parameter value pairs: possible values:
- gridwidth, gridheight
Specify the number of columns (for gridwidth) or rows (for gridheight) in the component's display area. These constraints specify the number of cells the component uses, not the number of pixels it uses. The default value is 1. Use GridBagConstraints.REMAINDER to specify that the component be the last one in its row (for gridwidth) or column (for gridheight). Use GridBagConstraints.RELATIVE to specify that the component be the next to last one in its row (for gridwidth) or column (for gridheight). We recommend specifying the gridwidth and gridheight values for each component rather than just using GridBagConstraints.RELATIVE and GridBagConstraints.REMAINDER; this tends to result in more predictable layouts.
Note: GridBagLayout does not allow components to span multiple rows unless the component is in the leftmost column or you have specified positive gridx and gridy values for the component.
fill
Used when the component's display area is larger than the component's requested size to determine whether and how to resize the component. Valid values (defined as GridBagConstraints constants) include NONE (the default), HORIZONTAL (make the component wide enough to fill its display area horizontally, but do not change its height), VERTICAL (make the component tall enough to fill its display area vertically, but do not change its width), and BOTH (make the component fill its display area entirely).
ipadx, ipady
Specifies the internal padding: how much to add to the size of the component. The default value is zero. The width of the component will be at least its minimum width plus ipadx*2 pixels, since the padding applies to both sides of the component. Similarly, the height of the component will be at least its minimum height plus ipady*2 pixels.
insets:
vector: [top, left, bottom, right)
Specifies the external padding of the component i.e. the minimum amount
of space between the component and the edges of its display area.
By default, each component has no external padding.
anchor
Used when the component is smaller than its display area to determine where (within the area) to place the component. Valid values (defined as GridBagConstraints constants) are CENTER (the default), PAGE_START, PAGE_END, LINE_START, LINE_END, FIRST_LINE_START, FIRST_LINE_END, LAST_LINE_END, and LAST_LINE_START.
Here is a picture of how these values are interpreted in a container that has the default, left-to-right component orientation.
-------------------------------------------------
|FIRST_LINE_START PAGE_START FIRST_LINE_END|
| |
| |
|LINE_START CENTER LINE_END|
| |
| |
|LAST_LINE_START PAGE_END LAST_LINE_END|
-------------------------------------------------
Version note: The PAGE_* and *LINE_* constants were introduced in 1.4. Previous releases require values named after points of the compass. For example, NORTHEAST indicates the top-right part of the display area. We recommend that you use the new constants, instead, since they enable easier localization.
weightx, weighty
Specifying weights is an art that can have a significant impact on the appearance of the components a GridBagLayout controls. Weights are used to determine how to distribute space among columns (weightx) and among rows (weighty); this is important for specifying resizing behavior.
Unless you specify at least one non-zero value for weightx or weighty, all the components clump together in the center of their container. This is because when the weight is 0.0 (the default), the GridBagLayout puts any extra space between its grid of cells and the edges of the container.
Generally weights are specified with 0.0 and 1.0 as the extremes: the numbers in between are used as necessary. Larger numbers indicate that the component's row or column should get more space. For each column, the weight is related to the highest weightx specified for a component within that column, with each multicolumn component's weight being split somehow between the columns the component is in. Similarly, each row's weight is related to the highest weighty specified for a component within that row. Extra space tends to go toward the rightmost column and bottom row.
ModelitUtilRoot\jacontrol
21-Jun-2010 16:19:04
6393 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
ModelitUtilRoot\jacontrol
09-Feb-2009 19:41:50
609 bytes
addGlue - add stretchable space to toolbar CALL: addGlue(toolbar) INPUT: toolbar: <jacontrol object> of type JToolBar OUTPUT: no output, stretchable space is added to the end of the toolbar See also: addGap, addSeparator
ModelitUtilRoot\jacontrol
09-Feb-2009 16:53:40
542 bytes
INPUT
Htool: matlab toolbar handle, returned from call to "uitoolbar"
N: number of pixels required for gap
ModelitUtilRoot\jacontrol
18-Sep-2007 12:18:54
474 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
ModelitUtilRoot\jacontrol
24-Oct-2005 20:51:58
2293 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, index] = 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
ModelitUtilRoot\jacontrol
03-May-2010 20:44:42
1568 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.
ModelitUtilRoot\jacontrol
30-Mar-2009 15:49:18
1271 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
ModelitUtilRoot\jacontrol
18-May-2010 15:06:02
760 bytes
matlab2javadateformat - convert string with matlab dateformat to a java
dateformat, mainly to use with tables
CALL:
format = matlab2javadateformat(format)
INPUT:
format: string with matlab dateformat
OUTPUT:
format: string with java dateformat
APPROACH:
Matlab format:
yyyy full year, e.g. 1990, 2000, 2002
yy partial year, e.g. 90, 00, 02
mmmm full name of the month, according to the calendar locale, e.g.
"March", "April" in the UK and USA English locales.
mmm first three letters of the month, according to the calendar
locale, e.g. "Mar", "Apr" in the UK and USA English locales.
mm numeric month of year, padded with leading zeros, e.g. ../03/..
or ../12/..
m capitalized first letter of the month, according to the
calendar locale; for backwards compatibility.
dddd full name of the weekday, according to the calendar locale, e.g.
"Monday", "Tuesday", for the UK and USA calendar locales.
ddd first three letters of the weekday, according to the calendar
locale, e.g. "Mon", "Tue", for the UK and USA calendar locales.
dd numeric day of the month, padded with leading zeros, e.g.
05/../.. or 20/../..
d capitalized first letter of the weekday; for backwards
compatibility
HH hour of the day, according to the time format. In case the time
format AM | PM is set, HH does not pad with leading zeros. In
case AM | PM is not set, display the hour of the day, padded
with leading zeros. e.g 10:20 PM, which is equivalent to 22:20;
9:00 AM, which is equivalent to 09:00.
MM minutes of the hour, padded with leading zeros, e.g. 10:15,
10:05, 10:05 AM.
SS second of the minute, padded with leading zeros, e.g. 10:15:30,
10:05:30, 10:05:30 AM.
FFF milliseconds field, padded with leading zeros, e.g.
10:15:30.015.
PM set the time format as time of morning or time of afternoon. AM
or PM is appended to the date string, as appropriate.
Java format
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800
Conversion table:
y -> y
m -> M
M -> m
d -> d
H -> H
S -> s
F -> S
PM -> a
ModelitUtilRoot\jacontrol
01-May-2009 14:05:34
3412 bytes
node2treepath - CALL: treepath = node2treepath(node) INPUT: node: OUTPUT: treepath
ModelitUtilRoot\jacontrol
24-Oct-2005 20:33:30
553 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
ModelitUtilRoot\jacontrol
24-Dec-2009 13:11:18
4857 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
ModelitUtilRoot\jacontrol\@jacontrol
07-May-2008 16:05:28
392 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
ModelitUtilRoot\jacontrol\@jacontrol
12-Jun-2010 09:49:38
60960 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
ModelitUtilRoot\jacontrol\@jacontrol
30-Jun-2006 12:04:50
1020 bytes
overload setappdata for jacontrol objects INPUT
ModelitUtilRoot\jacontrol\@jacontrol
19-Mar-2008 11:39:32
226 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
ModelitUtilRoot\jacontrol\@jacontrol
07-May-2010 17:14:28
11203 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
ModelitUtilRoot\jacontrol\@jacontrol
23-May-2007 17:59:20
879 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
ModelitUtilRoot\jacontrol\@jacontrol
26-Mar-2008 10:09:02
3649 bytes
overload setappdata for jacontrol objects INPUT
ModelitUtilRoot\jacontrol\@jacontrol
07-Oct-2004 21:49:27
166 bytes
ishandle - ishandle implementation for jacontrol objects
CALL
rc=ishandle(obj)
INPUT
obj
jacontrol object
OUTPUT
rc
true is uicontainer that is of jacontrol object still is valid
handle
ModelitUtilRoot\jacontrol\@jacontrol
20-Aug-2008 22:43:12
390 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:
hParent: usually: cuurent figure
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
ModelitUtilRoot\jacontrol\@jacontrol
18-Jun-2010 16:41:32
18087 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
ModelitUtilRoot\jacontrol\@jacontrol
19-Aug-2010 11:09:05
186987 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
ModelitUtilRoot\jacontrol\@jacontrol
28-Aug-2007 14:12:50
971 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)
ModelitUtilRoot\jacontrol\@jacontrol
12-Jan-2007 23:29:36
1115 bytes
overload setappdata for jacontrol objects INPUT
ModelitUtilRoot\jacontrol\@jacontrol
19-Mar-2008 11:39:34
229 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
ModelitUtilRoot\jacontrol\@jacontrol
20-Jan-2008 11:51:28
765 bytes
test - hulpfunctie voor jacontrol testroutines
ModelitUtilRoot\jacontrol\@jacontrol
11-Apr-2009 12:32:22
4353 bytes
Return all feasible propery names for getproperty Call
ModelitUtilRoot\jacontrol\@jacontrol\private
20-Jul-2009 19:28:46
271 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
ModelitUtilRoot\jacontrol\@jacontrol\private
26-Mar-2008 13:01:12
3822 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
ModelitUtilRoot\jacontrol\@jacontrol\private
20-Jul-2009 18:57:19
547 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
ModelitUtilRoot\jacontrol\@jacontrol\private
10-Oct-2004 00:54:04
1182 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
ModelitUtilRoot\jacontrol\@jacontrol\private
21-Apr-2009 13:37:38
4585 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
ModelitUtilRoot\jacontrol\@jacontrol\private
12-Jun-2010 09:49:56
13080 bytes
Enumerate fields for jacontrol object
ModelitUtilRoot\jacontrol\@jacontrol\private
20-Jul-2009 19:25:06
382 bytes
allPanels - return a list of panels for specified figure
CALL
objlist = allPanels(HWIN, tag)
INPUT:
HWIN: handle of figure in which one or more panels are defined
tag: limit output to panel object with matching tag
OUTPUT:
objlist: array of panel objects.
See also: @panel
ModelitUtilRoot\matlabguru
21-Apr-2010 11:15:40
942 bytes
debug utility: display items to update
SUMMARY
For debugging purposes it may be usefull to include a line with
"dispupd(upd)" in the display function. This results in displaying a
list of items that will be updated and facilitates troubleshooting.
In a deployed environment no debug information will be plotted
CALL
dispupd(upd)
INPUT
upd: the update structure, as returned from evaldepend
OUTPUT
this function returns no output arguments but displays information in
the command window
See also: evaldepend
ModelitUtilRoot\matlabguru
10-Aug-2008 19:07:15
1229 bytes
evaldepend - evaluate update structure for combination of object and figure
SUMMARY
This function evaluates the update structure for the combination of:
- 1 or more 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)
upd = evaldepend(HWIN, ind)
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
ModelitUtilRoot\matlabguru
28-Jun-2010 16:50:47
4083 bytes
getdepend - retrieve dependency tree for combination of object and figure
CALL:
deptree = getdepend(HWIN, obj)
or
deptree = 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 registered for this combination
of object and figure, see also setdepend.
NOTE:
This function exist also as an overloaded function
See also: setdepend, evaldepend
ModelitUtilRoot\matlabguru
28-Aug-2009 08:39:50
1587 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
ModelitUtilRoot\matlabguru
07-Mar-2007 11:23:24
719 bytes
retrieve - retrieve undoredo object using specified name "dbname"
CALL:
db = retrieve(HWIN, dbname)
db = retrieve(HWIN)
db = retrieve
INPUT:
HWIN: handle
dbname: database name. Typically "db" or "opt"
EXAMPLES:
db=undoredo(initdb,'dbname',db)
....
db=retrieve('db')
See also: unodoredo
ModelitUtilRoot\matlabguru
20-Apr-2009 10:52:18
1030 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
ModelitUtilRoot\matlabguru
20-Mar-2008 12:34:48
282 bytes
undomenu - execute undo, redo of undo-menu
CALL
undomenu(obj,event,operation,fp_getdata,HWIN)
undomenu(obj,event,operation,'opt',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:
-1- 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')
-2- CHAR string conting "opt" or "db"
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
ModelitUtilRoot\matlabguru
01-Dec-2009 00:34:36
2700 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
ModelitUtilRoot\matlabguru\@arglist
17-Aug-2008 15:15:26
488 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)
ModelitUtilRoot\matlabguru\@arglist
09-May-2009 14:07:06
620 bytes
ModelitUtilRoot\matlabguru\@arglist
12-Jun-2007 14:13:32
29 bytes
ModelitUtilRoot\matlabguru\@arglist
12-Jun-2007 14:22:38
37 bytes
ModelitUtilRoot\matlabguru\@arglist
12-Jun-2007 14:14:10
28 bytes
add - register toolbar to other element such as toolbar or menu
ModelitUtilRoot\matlabguru\@panel
05-Jul-2010 15:56:53
694 bytes
addbutton - register panel with toolbar or menu
INPUT
panelobj:
panel object
handle:
handle of toolbar
varargin:
properties to be added to function that creates button
REQUIRED PROPERTIES OF panelobj
cdata
icon for button
tooltip
tooltip to display
showlocation
relapth object that specifies location of parameter that
controls panel-visibility
ModelitUtilRoot\matlabguru\@panel
19-Aug-2010 13:31:41
1167 bytes
obj - display information
ModelitUtilRoot\matlabguru\@panel
05-Feb-2009 13:47:55
422 bytes
frameOnOff - hide or show panel
CALL
[sInfo,handles]=frameOnOff(panelobj,sInfo,handles,...
buttonTag,Visible,fpFrame,C,HWIN)
INPUT
panelobj: panel that needs to be hidden or shown
sInfo : information structure to be passed on, possibly modified by
panel constructor.
buttonTag: tag from button in toolbar (empty if no such button
exists)
Visible:
True ==> panel show panel,
False ==> hide panel
fpFrame: "define" function for panel.
If fpFrame is cell array:
==> constructor will be called as:
[handles,sInfo]=feval(fpFrame{1},>> sInfo <<INSERTED,fpFrame{2:end})
In all other cases:
==> constructor will be called as:
[handles,sInfo]=feval(fpFrame,sInfo)
Note: fpFrame must supply handles outpput:
handles
+----frame: frame handle
OUTPUT
sInfo:
sInfo argument returned from panel constructor. This provides a
mechanism to share data between the display function and the
constructor.
handles:
handles returned from the frame constructor.
ModelitUtilRoot\matlabguru\@panel
06-Jul-2010 18:40:09
3364 bytes
panel/get - return data from panel object
CALL
prop=get(obj,propname)
INPUT
obj
panel object
propname
property to retrieve
OUTPUT
prop
required property value
ModelitUtilRoot\matlabguru\@panel
05-Jul-2010 16:29:26
492 bytes
getPanelTag - export field "tag"
CALL
tag=getPanelTag(obj)
INPUT
obj
panel object
OUTPUT
tag
tag that is stored with panel
See also:
get, set
ModelitUtilRoot\matlabguru\@panel
17-Aug-2008 13:35:30
288 bytes
panel - constructor voor het panel object
CALL:
obj = panel(HWIN,<paramname>,<paramval>,<paramname>,<paramval>,..)
obj = panel(HWIN,<paramname>,<paramval>,<paramstruct>)
INPUT:
All input arguments are optional and passed on as parameter/value pairs
See also: setDefault, setInit, setUpdate, showPanels2
<paramname>,<paramval>
defaultvalue:
class
function pointer
signature:
function opt=defaultvalue(opt,modus)
description:
Function that returns struct containing values that
will be initialized at first time use. "modus" can be
any string, but conventions are that following values
are used:
modus='opt': initialize setting
modus='db' : initialize workspace variable
initvalue:
class
function pointer
signature:
function opt=initvalue(opt,modus)
description:
Identical to property "defaultvalue", but this
property is used to initialize overruling properties
update:
class
function pointer
signature:
function agtree=update(agtree,modus)
description:
Function that returns struct containing values for
dependency tree
show:
class
function pointer
signature:
<for function showpanels>
DORESIZE=show(C,upd,opt,db,varargin)
<for function showpanels2>
[DORESIZE,infostruct]=showPanels2(objlist,infostruct,C,upd,opt,db,varargin)
note:
This function is invoked by the method "showPanels".
By convention, the arguments "C,upd,opt,db,varargin"
are passed on from showPanels.
DORESIZE=showPanels(allpanels(HWIN),C,upd,opt,db,...)
description:
Function that updates the GUI after the changes in the
datamodel have occured
userdata:
class
structure
description:
information that can be passed on inside objects.
Typically the parentframe and rank of the frame can be
passed on to the "define" function.
tag:
class
char string
description:
string that is stored in the object.
allPanels(HWIN,tag) retrieves panels that match tag
toolBarButtonHandle:
class
handle
description:
handle of object that will be modified by the method
"frameOnOff" (and possibly other methods) using the
statement:
set(panelobj.toolBarButtonHandle,...
'State',offon(Visible));
example
panel('toolBarButtonHandle',gch('BTNxxx',HWIN),...
cdata
cdata for icon, see getcdata
tooltip
tooltip for menu
showlocation
relpath object contain path to database that controls panel
visibility
EXAMPLE
function createPanel
panel(HWIN,...
'defaultvalue',@fp_default,...
'initvalue', @fp_init,...
'update', @fp_update,...
'show', @fp_show,...
'tag', 'tagstring')
ModelitUtilRoot\matlabguru\@panel
05-Jul-2010 15:46:33
8744 bytes
This is a template for a panel creation function Copy this code and adapt it to you needs. When done save under a different name
ModelitUtilRoot\matlabguru\@panel
29-Jul-2009 15:35:36
3337 bytes
Replace currently stored panel with current one
CALL
retrieve(this)
INPUT
this: panel object
EXAMPLE
set(thispanel,'handles',createFrame)
store(thispanel)
<Some other code>
p=retrieve(thispanel) %get panel including modified properties
See also: panel/store
ModelitUtilRoot\matlabguru\@panel
30-Jun-2010 02:03:07
614 bytes
panel/set - return data from panel object
CALL
obj=set(obj,propname,propvalue)
INPUT
obj
panel object
propname
any of {'parent','tag' or 'handles'}
propvalue
property value that will be applied
OUTPUT
obj
panel object after update
ModelitUtilRoot\matlabguru\@panel
17-Aug-2008 13:23:39
666 bytes
setDefault - Initialize default values for panels
CALL
init=setDefault(objlist,init,modus)
INPUT
objlist
list of panel object to process
init
structure with initial data before update
modus
by convention this value is "db" or "opt"
OUTPUT
init
structure with initial data after update
EXAMPLE (1)
%initialize database structure
ud=setDefault(allPanels(HWIN),ud,'db')
EXAMPLE (2)
%set default fields for all declared panels:
defopt=setDefault(allPanels(HWIN),defopt,'opt');
% sttFile returns name of stt file for this m-module
opt =ur_getopt(defopt,sttFile);
%set initial fields for all declared panels:
opt =setInit(allPanels(HWIN),opt,'opt')
See also
panel
allPanels
setInit
ModelitUtilRoot\matlabguru\@panel
23-Jun-2010 10:25:03
1390 bytes
setInit - Initialize initial values for panels
the fields in the option structure "init" will be overrided by
the initial fields defined with each panel
CALL
init=setInit(objlist,init,modus)
INPUT
objlist
list of panel objects
init
structure with initial values before update
modus
extra argument for the function "initvalue"
OUTPUT
init
structure with initial values after update
EXAMPLE
see panel constructor for example
ModelitUtilRoot\matlabguru\@panel
23-Jun-2010 11:01:02
902 bytes
setUpdate - evaluate update structure for panel
CALL
upd=setUpdate(objlist,upd,modus)
INPUT
objlist:
list of panel objects
upd:
update structure before update
modus:
if specified, this argument will be passed to the update function
of the specified panels. Typically this field contal the string
"all"
OUTPUT
upd:
update structure fater update
EXAMPLE
upd.visible.updobj={'visible'};
upd=setUpdate(allPanels(HWIN),upd,'opt')
ModelitUtilRoot\matlabguru\@panel
23-Jun-2010 10:25:58
2567 bytes
showPanels - function to visualize all panels
CALL
DORESIZE=showPanels(objlist,C,upd,opt,db,varargin)
INPUT
objlist <array of class panel>
list of panel objects that need updating. Typically this list is
retreived using the AllPanes function.
C
by convention this structure is the third input of the "show"
function that is stored in the object. Typically this structure
stores a number of constants.
upd
by convention this structure is the fourth input of the "show"
function that is stored in the object. Typically it holds the upd
stucture that is returned from evaldepend.
opt
by convention this structure is the fifth input of the "show"
function that is stored in the object. Typically it holds the
user preference data.
db
by convention this structure is the seventh input of the "show"
function that is stored in the object. Typically it holds the
user workspace data.
varargin
any furter arguments that need to be passed to the update
function
OUTPUT
DORESIZE <logical>
if any of the called diplay function returns "DORESIZE=true" this
value will be true as well. Otherwise it will be false.
NOTE
the function showpanels2 is more powerful and more extendible.
EXAMPLE
%update all declared panels:
DORESIZE=DORESIZE | showPanels(allPanels(HWIN),C,upd,opt,db);
See also:
showpanels2
ModelitUtilRoot\matlabguru\@panel
17-Aug-2008 13:32:43
1931 bytes
showPanels2 - alternate function to visualize all panels
CALL
[DORESIZE,infostruct]=showPanels2(objlist,infostruct,C,...
upd,opt,db,varargin)
INPUT
objlist <array of class panel>
list of panel objects that need updating. Typically this list is
retreived using the AllPanes function.
infostruct
+----W: waitbar handle (optional). loop will abort if empty.
by convention this structure is the second input of the "show"
function that is stored in the object. This structure will be
returned from the "show" function. Typically this structure
stores a number of parameters that are needed outside the "show"
function.
C
by convention this structure is the third input of the "show"
function that is stored in the object. Typically this structure
stores a number of constants.
upd
by convention this structure is the fourth input of the "show"
function that is stored in the object. Typically it holds the upd
stucture that is returned from evaldepend.
opt
by convention this structure is the fifth input of the "show"
function that is stored in the object. Typically it holds the
user preference data.
db
by convention this structure is the seventh input of the "show"
function that is stored in the object. Typically it holds the
user workspace data.
varargin
any furter arguments that need to be passed to the update
function
OUTPUT
DORESIZE <logical>
if any of the called diplay function returns "DORESIZE=true" this
value will be true as well. Otherwise it will be false.
infostruct
structure that contains all the updates taht are applied in the called displayfunctions
NOTE:
[DORESIZE,infostruct]=showPanels2(objlist,infostruct,C,upd,opt,db,varargin)
calls:
[drsz,infostruct]=feval(obj.show,obj,infostruct,C,upd,opt,db,varargin{:});
EXAMPLE
%update all declared panels:
DORESIZE=DORESIZE | showPanels(allPanels(HWIN),C,upd,opt,db);
ModelitUtilRoot\matlabguru\@panel
30-Jun-2010 02:00:34
2828 bytes
Replace currently stored panel with current one
CALL
store(this)
INPUT
this: panel object
EXAMPLE
set(thispanel,'handles',createFrame)
store(thispanel)
<Some other code>
p=retrieve(thispanel) %get panel including modified properties
See also: panel/retrieve
ModelitUtilRoot\matlabguru\@panel
29-Jun-2010 14:56:55
655 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
ModelitUtilRoot\matlabguru\@undoredo
15-Aug-2008 15:46:05
2995 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
%retrieve undoredo object:
db = get_db; %(get_db must be provided)
%remove all filles associated with undoredo object:
cleanupdisk(db);
%Destroy figure:
delete(obj)
ModelitUtilRoot\matlabguru\@undoredo
20-Apr-2009 11:34:51
1044 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
ModelitUtilRoot\matlabguru\@undoredo
08-Aug-2008 11:20:06
1327 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
ModelitUtilRoot\matlabguru\@undoredo
08-Aug-2008 15:16:02
1547 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
ModelitUtilRoot\matlabguru\@undoredo
08-Aug-2008 15:16:08
560 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
ModelitUtilRoot\matlabguru\@undoredo
19-Sep-2006 21:29:50
468 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
ModelitUtilRoot\matlabguru\@undoredo
28-May-2010 13:41:14
3267 bytes
getdata - Retreive data content from undoredo object
SUMMARY
In most cases data is retrieved from an object by subscripting, for
example:
obj=undoredo(1:8)
a=obj(3)
==> a=3
However there is no subscript that retrieves 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 retrieve data
content and data size.
SEE ALSO
undoredo/size
ModelitUtilRoot\matlabguru\@undoredo
20-Apr-2009 11:34:51
1124 bytes
getdepend - retrieve 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
ModelitUtilRoot\matlabguru\@undoredo
20-Apr-2009 11:34:52
1170 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 retrieve (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)
ModelitUtilRoot\matlabguru\@undoredo
20-Apr-2009 11:34:52
1024 bytes
getsignature - retrieve data content from undoredo object CALL: signature = getsignature(obj) INPUT: obj: <undoredo object> OUTPUT: signature: <double> with object's signature
ModelitUtilRoot\matlabguru\@undoredo
13-Dec-2005 23:51:28
285 bytes
retrieve name of settings file
CALL
str = getsttname(obj)
INPUT
obj: undoredo object
See also : sttsave
ModelitUtilRoot\matlabguru\@undoredo
05-May-2009 11:22:24
348 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
ModelitUtilRoot\matlabguru\@undoredo
17-Aug-2008 15:21:03
2145 bytes
Overloaded method for isempty within class undoredo
CALL/INPUT/OUPUT
type "help isempty" for help on this topic
ModelitUtilRoot\matlabguru\@undoredo
17-Aug-2008 16:03:36
182 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
ModelitUtilRoot\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
ModelitUtilRoot\matlabguru\@undoredo
17-Aug-2008 16:03:57
203 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
ModelitUtilRoot\matlabguru\@undoredo
28-Jan-2005 13:50:37
1013 bytes
THIS FUNCTION IS OBSOLETE. USE SETLABEL
ModelitUtilRoot\matlabguru\@undoredo
09-Aug-2008 14:23:57
1386 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))
ModelitUtilRoot\matlabguru\@undoredo
09-Aug-2008 11:39:04
2230 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
ModelitUtilRoot\matlabguru\@undoredo
15-Aug-2008 15:46:05
624 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
ModelitUtilRoot\matlabguru\@undoredo
08-Aug-2008 22:06:13
2178 bytes
setdata - overload method for "=" operator
SUMMARY
The subsasgn method provides 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
ModelitUtilRoot\matlabguru\@undoredo
02-Dec-2008 19:50:22
3851 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
ModelitUtilRoot\matlabguru\@undoredo
20-Apr-2009 11:34:53
3352 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);
ModelitUtilRoot\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
ModelitUtilRoot\matlabguru\@undoredo
17-Aug-2008 15:22:01
1281 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
ModelitUtilRoot\matlabguru\@undoredo
10-Aug-2008 19:07:05
1404 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
ModelitUtilRoot\matlabguru\@undoredo
17-Aug-2008 15:19:40
1177 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
ModelitUtilRoot\matlabguru\@undoredo
20-Jan-2007 19:40:41
3980 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.
ModelitUtilRoot\matlabguru\@undoredo
08-May-2009 08:41:38
5878 bytes
subsref - overloaded subsref function for undoredo object
ModelitUtilRoot\matlabguru\@undoredo
25-Jul-2007 14:00:01
4438 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
ModelitUtilRoot\matlabguru\@undoredo
15-Aug-2008 15:46:06
520 bytes
undoredo - constructor for undoredo object
CALL:
undoredo(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 be called)
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.
- dbname: typically "opt" or "db", but any string that qualifies as a
structure-fieldnmae is allowed. This field may be used in calls
using "retrieve". Examples:
db =retrieve(HWIN,'db')
opt=retrieve(HWIN,'opt')
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=undoredo(struct('field1',1','field2',2),...
'backupfile',C.autosave,...
'backupinterval',C.backupint',...
'displayfunction',@guishow,...
'storehandle',gcf,...
'storefield','undodata');
store(u); %store data
ModelitUtilRoot\matlabguru\@undoredo
05-May-2009 11:19:29
5663 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
ModelitUtilRoot\matlabguru\@undoredo
17-Aug-2008 16:10:05
549 bytes
NOTE: this function will be phased out and will be replaced by evaldepend this function is intentionally left undocumented
ModelitUtilRoot\matlabguru\@undoredo
09-Aug-2008 15:22:38
2253 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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 16:10:27
1463 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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:10:49
631 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
ModelitUtilRoot\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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:12:32
339 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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:15:06
1070 bytes
deletecachefile - delete file for undoredo object
CALL
deletecachefile(fname)
INPUT
fname: filename to delete
OUTPUT
none
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:17:35
668 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
ModelitUtilRoot\matlabguru\@undoredo\private
27-May-2006 15:53:28
1643 bytes
emptytransact - initialize transaction record with empty data
CALL
S=emptytransact
INPUT
none
OUTPUT
transaction record with empty data
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:19:22
514 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.
- dbname: typically "opt" or "db", but any string that qualifies as a
structure-fieldnmae is allowed. This field may be used in calls
using "retrieve". Examples:
db =retrieve(HWIN,'db')
opt=retrieve(HWIN,'opt')
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.
ModelitUtilRoot\matlabguru\@undoredo\private
01-Dec-2009 00:03:00
11753 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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:24:04
8796 bytes
This function is now obsolete
ModelitUtilRoot\matlabguru\@undoredo\private
20-Apr-2009 11:34:53
5406 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
ModelitUtilRoot\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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:27:55
8890 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
ModelitUtilRoot\matlabguru\@undoredo\private
20-Mar-2009 15:56:59
635 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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:31:36
713 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
ModelitUtilRoot\matlabguru\@undoredo\private
20-Mar-2009 15:57:00
1025 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
ModelitUtilRoot\matlabguru\@undoredo\private
17-Aug-2008 17:36:16
1083 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)
ModelitUtilRoot\matlabguru\undoredocopy
28-Jun-2010 17:11:46
1954 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
ModelitUtilRoot\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)
ModelitUtilRoot\matlabguru\undoredocopy
20-Apr-2009 11:34:56
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)
ModelitUtilRoot\matlabguru\undoredocopy
17-Aug-2008 13:57:44
4705 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:
Specify this initopt function:
function opt=initopt
defopt=struct('field1',100,'field2',200); %define default options
opt=ur_getopt(defopt,'options.stt'); %use saved options
function opt=deletef
try
opt=getdata(retrieve(gcf,'opt'))
save(opt.sttBackupName,'opt');
catch
end
ModelitUtilRoot\matlabguru\undoredocopy
01-Dec-2009 00:31:10
3001 bytes
ur_undomenu - execute undo, redo of undo-menu
CALL
undolist(operation)
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 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')
FILES WRITTEN TO
userdata hoofdscherm
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
ModelitUtilRoot\matlabguru\undoredocopy
20-Apr-2009 11:34:57
3437 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
ModelitUtilRoot\mbdresizedir
19-Oct-2009 16:00:20
8014 bytes
lm_exittext - set exit button in frame
CALL
fr_exitbutton(h_frame,BDCALL,align,str)
INPUT
h_frame: frame handle
BDCALL : function to call when button is pressed
align : set this parameter to 1 for alternative alignment. Defaults
to 0
str : String to display. Defaults to "x". Other values to
consider: "close", "cancel" etcetera
OUTPUT
no output arguments, a text object will be created, and if needed
also the axes that dsiplaye it
EXAMPLE
hframe=lm_createframe(hparent,'rank',1,...
'normsize',[1 1],...
'lineprops',mbdlineprops,... <<< AVOID 'border',1 because this obscures symbol
'minmarges',[5 5 5 5],...
'title','Example');
BDCALL={@set_setting,'showexample',0};
fr_exitbutton(h_frame,BDCALL);
ModelitUtilRoot\mbdresizedir
17-Aug-2008 10:29:26
1534 bytes
fr_link2toolbar - compact code to link buttons to toolbar
CALL
pixelpos=fr_link2toolbar(h,hframe,pixelpos,normpos,direction)
INPUT
h : list of toolbar button handles
hframe : handle of frame to print these buttons in
pixelpos : initial pixelposition
normpos : normalized position
direction : direction to plot buttons in 1: Left to Right, -1: Right to Left
OUTPUT
pixelpos : final pixel position
NOTE:
This function was created before Java toolbars became generally
available. It has been superseeded by other functions.
on 2008 08 05 this function seems to be no longer in use
The function will be preserved as an undocumented function.
EXAMPLE:
hframe = mbdcreateframe(h_main,...
'rank',0,...
'pixelsize',[0 C.BSIZE+3],...
'minmarges',[2 0 2 0],...
'normsize',[1 0]);
% Creeer buttons
%button die alles opvult (is nodig omdat ivm slider waardoor buttons door toolbar dreigen te vallen)
h=uicontrol('style','frame','enable','off','hittest','off');
mbdlinkobj(h,hframe,'normpos',[0 0 1 0],'pixelpos',[0 0 0 C.BSIZE+4]);
%redo and undo
h=[];
%%button UNDO
h(end+1)=uicontrol('cdata',getcdata('sundo'),'tooltip','Undo',...
'callb',{@ur_undomenu,1,@get_db_maria});
%%button REDO
h(end+1)=uicontrol('cdata',getcdata('sredo'),'tooltip','Redo',...
'callb',{@ur_undomenu,2,@get_db_maria});
pixpos=fr_link2toolbar(h,hframe,[3 2 C.BSIZE C.BSIZE],[0 0 0 0],1);
%To incluse separator:
pixpos = fr_insertseparator(hframe,C.FRAMECOLOR,pixpos,[0 0 0 0],1);
%OR: pixpos = fr_insertseparator(hframe,C.FRAMECOLOR,pixpos);
%To create buttons on the right:
pixpos=fr_link2toolbar(h,hframe,[-C.BSIZE-1 3 C.BSIZE C.BSIZE],[1 0 0 0],-1);
SEE ALSO
fr_insertseparator
ModelitUtilRoot\mbdresizedir
17-Aug-2008 10:18:06
2217 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
ModelitUtilRoot\mbdresizedir
11-Aug-2008 22:53:54
2059 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
ModelitUtilRoot\mbdresizedir
11-Aug-2008 22:22:02
1521 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
ModelitUtilRoot\mbdresizedir
20-Apr-2009 11:34:58
2452 bytes
mbd_defaultframeprop - define default properties for frame editor
CALL
frameopt=mbd_defaultframeprop
INPUT
none
OUTPUT
frameopt[]
struct array with (dutch) labels fro frame editor
See also
mbd_defaulttextprop
ModelitUtilRoot\mbdresizedir
17-Aug-2008 10:25:50
1268 bytes
delete frame and all dependent items
CALL
mbd_deleteframe(hframes)
INPUT
hframes: list of frame handles
OUTPUT
none
See also: lm_deleteframecontent
ModelitUtilRoot\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
ModelitUtilRoot\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]);
ModelitUtilRoot\mbdresizedir
14-Oct-2006 00:21:48
1437 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
ModelitUtilRoot\mbdresizedir
08-Jun-2010 18:46:17
23598 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
ModelitUtilRoot\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]);
ModelitUtilRoot\mbdresizedir
08-Mar-2008 12:49:30
20660 bytes
Creeer een frame dat kan worden geminimaliseerd
CALL
[h_ItemFrame,h_frame]=mbddoubleframe(h_parent,titlestr,outer_frame_opt,inner_frame_opt)
INPUT
h_parent : parent frame
titlestr : titel
outer_frame_opt : cell array met opties voor buitenste frame
Default properties:
'normsize',[1 0],...
'pixelsize',[0 NaN],...
'border',0,...
'splithor',0
inner_frame_opt : cell array met opties voor binneste frame
Default properties:
'normsize',[1 1],...
'lineprops',mbdlineprops,...
'active',1
OUTPUT
h_ItemFrame: frame waarin getekend kan worden
h_frame: buitenste frame
ZIE OOK
equivalent aan mbdcreateframe
EXAMPLE
mbddoubleframe(h_parent,'Edit object',{'rank',1,'tag','EDITOR'},{})
mbddoubleframe(h_parent,'Edit object',{'tag','EDITOR'})
mbddoubleframe(h_parent,'Edit object')
ModelitUtilRoot\mbdresizedir
15-Aug-2008 18:35:09
3041 bytes
lm_frameonoff - toggle visible status of frame
CALL:
active = mbdframeonoff(option,resize,framehandle)
INPUT:
option: <string> (optional)
- 'toggle' (default)
- 'on'
- 'off'
resize: <boolean> (optional)
- 1 ==> call resize function immediately (default)
- 0 ==> suspend resize function
obj: <handle> (optional)
of the calling object (button or other graphics object)
OUTPUT:
active: <boolean>
EXAMPLE:
%Create some frame
h_legenda = mbdcreateframe(h_legaslid,...
'rank',1,...
'normsize',[1 1],...
'border',0,...
'splithor',0);
%read image for button
%create button, SET PROPER CALLBACK AND USERDATA!
h=uicontrol('val',1,...
'style','toggle',...
'cdata',getcdata('sheaders'),...
'tooltip','activate/deactivate frame',...
'callb','mbdframeonoff',...
'userd',h_legenda); %<<<< ESSENTIAL CODE !!!!!!!!!!!
%Position button in toolbar
mbdlinkobj(h,hheader,'normpos',[1 0 0 0],'pixelpos',pixpos);
REVISION:
21-Mar-2005 - third argument 'obj' added to make callback from
uitoggletool possible
ModelitUtilRoot\mbdresizedir
04-Aug-2008 23:54:31
3228 bytes
mbdinnerpixelsize - Change pixelsize property of frame SUMMARY Change pixelsize property of frame so that the 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 shrink 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 outbordersize: computed outer border size
ModelitUtilRoot\mbdresizedir
13-Oct-2009 19:20:08
979 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
ModelitUtilRoot\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
ModelitUtilRoot\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"
ModelitUtilRoot\mbdresizedir
19-Mar-2010 09:43:20
2739 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
ModelitUtilRoot\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]);
ModelitUtilRoot\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
ModelitUtilRoot\mbdresizedir
17-Apr-2010 09:53:46
37783 bytes
lmshiftrank - change the rank of a frame.
If the 'splithor' property of the parent frame is set to true
this causes the frame to move to the left or right or
up or down if this property is set to false
CALL:
hchange = mbdshiftrank(option, resize)
INPUT:
option: string with shift direction, possible values:
- 'up' increase rank of frame
- 'down' decrease rank of frame
resize: boolean, if true call lm_resize afterwards
OUTPUT:
hchange: handles of the frames whose position has changed.
APPROACH:
The handle of the frame for which the rank must be changed must be
stored in the userdata field of the uicontrol whose callback is
executed.
ModelitUtilRoot\mbdresizedir
12-Aug-2008 14:46:22
3323 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"
ModelitUtilRoot\mbdresizedir
12-Aug-2008 14:59:38
11163 bytes
callback - Internal component of dateselector object.
CALL/INPUT/OUTUT:
not for external use
ModelitUtilRoot\mbdresizedir\@dateselector
17-Aug-2008 10:47:42
232 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:
ModelitUtilRoot\mbdresizedir\@dateselector
17-Aug-2008 10:39:14
7921 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
ModelitUtilRoot\mbdresizedir\@dateselector
17-Aug-2008 10:44:05
1164 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
ModelitUtilRoot\mbdresizedir\@dateselector
17-Aug-2008 10:42:02
3335 bytes
getDefopt - Private function of dateselector object
CALL/INPUT/OUTUT:
not for external use
ModelitUtilRoot\mbdresizedir\@dateselector\private
17-Aug-2008 10:47:48
347 bytes
lm_arrange - arrange uicontrol objects in rows and columns
CALL
lm_arrange(hframe,varargin)
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 =10)
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 (See also lm_set):
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
ModelitUtilRoot\mbdresizedir\LayoutManager
15-Apr-2010 10:23:34
3670 bytes
lm_createframe - maak een lm_resize frame aan
CALL
h=lm_createframe(handle,'property', value, 'property', value)
h=lm_createframe('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',lm_lineprops('color','k','shadowed',0 ),...
...,'lineprops',lm_lineprops,...
'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',lm_patchprops('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=lm_createframe(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=lm_createframe(HWIN,'splithor',0,'pixelsize',[NaN NaN],'normsize',[1 1]);
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
5180 bytes
lm_divider -
CALL:
[hframe, jseparator] = lm_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
ModelitUtilRoot\mbdresizedir\LayoutManager
04-Aug-2008 18:46:53
1254 bytes
lm_initaxes -
CALL:
h = lm_initaxes(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=lm_initaxes;
h=text(1,1,'my text','parent',hax);
lm_linkobj(h,hframe,'pixelpos',[ 10 10 20 20]);
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:56:52
1061 bytes
Shadowed : 1==> apply shadow
0==> do not apply
SEE ALSO: lm_patchprops
s=struct('xdata',[],'ydata',[],'facecolor','none','hittest','off','faceli','gouraud');
s=struct('XData',[],'YData',[],'Color',[ 0.6758 0.6602 0.6016],'HitTest','off','LineWidth',1,'Shadowed',1); %hoofdletters zijn belangrijk ivm mbd_frame_edit
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
750 bytes
lm_linkobj - linkt een object aan een mbdframe
CALL
lm_linkobj(hobj, hframe, property, value, property, value,...)
lm_linkobj(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 lm_resize
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
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
4131 bytes
lm_linkslider2frame - maak y-positie van content van frame afhankelijk
van slider
INPUT
hslid: handle van slider object
targetframe: target frame. De inhoud van dit frame wordt verticaal
veplaatst als functie van slider
OUTPUT
geen directe output. slider handle wordt opgeslagen in target frame
onder property "slider"
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
816 bytes
lm_listframeHandles - retrieve frame handles and data
INPUT
hfig: figure handle (defaults to gcf(
OUTPUT
FrameHandles: Nx1 list of frmae handles
FrameData: Nx1 struct array with corresponding application data
ModelitUtilRoot\mbdresizedir\LayoutManager
20-Apr-2009 11:34:57
693 bytes
SEE ALSO: lm_lineprops
s=struct('xdata',[],'ydata',[],'facecolor','none','hittest','off','faceli','gouraud');
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
525 bytes
get pixelsize of frame that depends on children
INPUT
hframe: frame handle
OUTPUT
pixelsize: pixel size of frame
EXAMPLE 1: keep centre of figure unchanged
hmain=lm_createframe(HWIN,'splithor',0,'pixelsize',[NaN NaN],'norms',[0 0]);
lm_createframe(hmain,'pixelsize',[47 20],'norms',[1 1]);
lm_createframe(hmain,'pixelsize',[20 58],'norms',[1 1]);
pixelsize=lm_pixelsize(hframe);
pos=get(HWIN,'pos');
mid=pos(1:2)+pos(3:4)/2';
set(HWIN,'pos',[mid 0 0]+[-pixelsize/2 pixelsize]);
lm_resize
EXAMPLE 2: position figure in the middle of the screen
pixelsize=lm_pixelsize(h_main);
scrsz=get(0,'screens');
mid=scrsz(3:4)/2;
set(HWIN,'pos',[mid 0 0]+[-pixelsize/2 pixelsize]);
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
1214 bytes
lm_resize - resize het figuur en alle objecten in het figuur
CALL
callback functie voor ResizeFcn
INPUT
hfig : figure handle
event: not used
OUTPUT
All frames created with "lm_createframe" and all objects linked to
frames with "lm_linkobj" are positioned in a figure.
EXAMPLE
lm_resize(HWIN);
set(HWIN,'Vis','on','ResizeFcn',@lm_resize);
AANPAK
- maak een lijst van alle zichtbare lm_resize 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 lm_resize 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 lm_resize frames de posities van de bijhorende objecten
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
1468 bytes
lm_set - change property of individual object after properties for a
group have been set lm_link_obj.
CALL
lm_set([h1,h2..],...
'normpos',NP,...
'pixelpos',PP,...
'visible',V,...
'enable',E,...
'clipping',C,...
'clipframe',CF,...
'keepypos',K,...
'keeppixelsize',KP)
INPUT:
[h1,g2,..]
Array of handles for which properties will be changed
Property-Value pairs
See lm_linkobj for descriptions
See also: lm_linkobj
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2010 15:22:36
2131 bytes
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
403 bytes
sortframes - maak een gesorteerde lijst van lm_resize frames
CALL
h=sortframes
INPUT
OUTPUT
FrameData[]: verzamelde informatie 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[]: corresponderende lijst met parent indices
AANPAK
- 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"
ModelitUtilRoot\mbdresizedir\LayoutManager
29-Jun-2008 23:54:19
3296 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')
ModelitUtilRoot\newmfiles\2007
16-Aug-2010 13:43:57
559 bytes
structarray2table - convert array of structures to stucture of arrays
CALL:
T = structarray2table(S, VERBOSE)
INPUT:
S(N): array of structures (structarray)
+----M1(1)
+----M2(1)
+----M3(1)
OUTPUT:
T(1): structure of arrays (tablestruct)
+----M1(N,1)
+----M2(N,1)
+----M3(N,1)
See also: table2structarray
ModelitUtilRoot\table
17-Apr-2010 11:10:20
3580 bytes
table2dlmfile - convert struct of arrays to Excel
SUMMARY
convert struct of arrays to table that may be imported in EXCEL.
Output contains 1 row per field
INPUT
fname: name of file to be saved
T : tablestruct
sep : separator (default ;). Use '\t' for tab
flds : fields to be saved
DoHeader: TRUE/FALSE if TRUE: display field names in row 1
OUTPUT
no output
See also: dlmfile2table
ModelitUtilRoot\table
16-Aug-2008 14:28:11
2298 bytes
table2string - convert the structure use to fill table to a string
CALL:
str = table2string(Contents)
INPUT:
Contents: <struct> in table format with fields
header: <cellstring> with header
data: <cellarray> with data
OUTPUT:
str: <string> string representation of table
See also: composeDiaList
ModelitUtilRoot\table
11-Sep-2009 13:43:52
664 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
ModelitUtilRoot\table
24-Dec-2009 12:03:12
1750 bytes
tablecat - apply cat to each field INPUT: S,T: struct of arrays(tablestruct) flds: cellstr OUTPUT: S: struct of arrays See also: table2structarray, tableselect
ModelitUtilRoot\table
14-Apr-2010 16:15:03
1755 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
ModelitUtilRoot\table
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 or logical vector
flds: cell array
OUTPUT:
S: struct of arrays (tablestruct), all fields must be (N x 1)
See also: table2structarray, tableunselect, structarrayselect
ModelitUtilRoot\table
06-Nov-2009 15:18:14
2538 bytes
tablesort - get unique rows of table
CALL:
[indx,M]=tablesort(table,flds,mode)
INPUT:
table: first structure of arrays (table)
+----fld1(N1,:)
+----fld2(N1,:)
flds={key1,key2,key3,...}
mode: array of integer (optional) sorting direction, allowed values:
1 --> 'ascend' (default)
-1 --> 'descend'
OUTPUT:
indx: sorted order of rows
M: output of call to subroutine "table2uint32" on input parameter
"table"
See also: table2uint32, tableunique
EXAMPLE:
indx=tablesort(S);
T=tableselect(S,indx);
ModelitUtilRoot\table
01-Sep-2009 18:40:44
1739 bytes
serializeDOM - serialise a DOM by transformation to a string or file
CALL:
String = serialize(DOM)
serialize(DOM,fileName)
INPUT:
DOM: <java-object> org.apache.xerces.dom.DocumentImpl
fileName: <string> (optional) valid filename
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
Revisions
20100825 (ZIJPP): modified help info
ModelitUtilRoot\xml_toolbox
25-Aug-2010 12:27:56
2165 bytes
ModelitUtilRoot\xml_toolbox
29-Aug-2010 18:02:31
5162 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:19:02
947 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:21:52
1002 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:34:26
1764 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
ModelitUtilRoot\xml_toolbox\@xml
26-Jun-2008 00:12:41
1527 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
ModelitUtilRoot\xml_toolbox\@xml
01-Jun-2006 17:27:18
1547 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:36:14
648 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:20:28
685 bytes
inspect - visualize the xml document as a tree in a separate window
CALL:
inspect(obj)
INPUT:
obj: <xml-object>
OUTPUT:
none, 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
ModelitUtilRoot\xml_toolbox\@xml
01-Oct-2009 15:24:15
2191 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:53:38
790 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
ModelitUtilRoot\xml_toolbox\@xml
02-Jun-2006 17:17:54
1618 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:21:22
995 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:14:12
585 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 06:26:44
896 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
ModelitUtilRoot\xml_toolbox\@xml
02-Jun-2006 17:18:00
1731 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
ModelitUtilRoot\xml_toolbox\@xml
06-Jun-2006 07:00:26
1336 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 07:17:48
968 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
ModelitUtilRoot\xml_toolbox\@xml
01-Jun-2006 17:28:20
2025 bytes
storeStructure - store contents of structure in xml object
CALL:
obj = storeStructure(obj,S)
INPUT:
S: <struct> or <struct array>
OUTPUT:
obj: <xml-object>
EXAMPLE:
obj=xml
obj = storeStructure(obj,S)
inspect(obj)
NOTES
- This function is called by xml object constructor, in case where
constructure is called with a structure as its input argument.
- Although alternative uses of this method may be possible, they have
not yet been tested
See also: xml
ModelitUtilRoot\xml_toolbox\@xml
29-Aug-2010 17:49:10
3316 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 07:14:00
960 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
ModelitUtilRoot\xml_toolbox\@xml
08-Jun-2006 07:13:44
665 bytes
view - convert the xml-object into a string
Note: This method has been superseeded by the method "xml2str"
the method view is kept for backward compability but will become
obsolete in the future.
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
ModelitUtilRoot\xml_toolbox\@xml
25-Aug-2010 16:35:30
733 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
ModelitUtilRoot\xml_toolbox\@xml
29-Aug-2010 16:33:39
8556 bytes
xml2str - convert the xml-object into a string
Note: This method replaces the method "view"
the method view is kept for backward compability
CALL:
xml2str(obj)
S=xml2str(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'))
xml2str(obj)
See also: xml, xml/save, xml/inspect
ModelitUtilRoot\xml_toolbox\@xml
01-Oct-2009 10:40:00
680 bytes
xml2struct - transform xml object to Matlab structure if contents of XML
permit this
CALL
s=xml2struct(obj)
s=xml2struct(obj,NOCELL)
INPUT
obj: XML object
NOCELL: if true, do NOT store data in cells. Defaults to false
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"
ModelitUtilRoot\xml_toolbox\@xml
03-Jan-2009 13:42:07
3593 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
ModelitUtilRoot\xml_toolbox\@xml
19-Dec-2008 15:26:59
7454 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
ModelitUtilRoot\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
ModelitUtilRoot\xml_toolbox\@xml
13-Jun-2006 14:18:28
1705 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:00:24
1223 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:50:54
409 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
ModelitUtilRoot\xml_toolbox\@xml\private
02-Jun-2006 08:10:50
1154 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:36:56
1322 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:28:44
1042 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:28:36
577 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:29:08
1223 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
ModelitUtilRoot\xml_toolbox\@xml\private
08-Jun-2006 08:44:10
653 bytes
do_combinegrids - combineer grids tbv bodemkaart
CALL:
griddata = do_combinegrids(griddata,griddata_new,opt);
INPUT:
griddata: rekengrid (Laagste prioriteit)
LET OP! dit zijn de pure grid data zonder de meta data, dus
bijvoorbeeld: ud.grid(9).grid
griddata_new: mutatiegrid (Hoogste prioriteit)
LET OP! dit zijn de pure grid data zonder de meta data, dus
bijvoorbeeld: ud.grid(9).grid
De informatie over meta data is reeds in het herkomst veld
gekoieerd ZIE OOK: appendhistory.m
opt: <struct> met opties, met volgende velden:
opt.stap: stapgrootte bij combineren
1 van rekengrid
2 van mutatiegrid
3 kleinste van beiden
4 grootste van beide
opt.begrenzing: begrenzing nieuwe grid
1 van rekengrid
2 van mutatiegrid
3 omhullende van beiden
4 doorsnede van beide
OUTPUT:
griddata: gecombineerd grid, [] wanneer operatie mislukt
LET OP! dit zijn de pure grid data zonder de meta data, zie
griddata. Deze griddata wordt buiten deze procedure aan de
metadata gekoppeld.
ApplicationRoot\ma\kjhroutines
19-Jul-2007 21:36:02
10139 bytes
do_interp - interpolate gaps in the grid
CALL:
ok = do_interp(db,gridindx,interp_index,opt,maxID,cntr,N);
INPUT:
db: <struct> met de centrale database
gridindx: <integer> met de index van het grid, correspondeert met
het aan te passen grid.
interp_index <integer>: lineaire index van de vol te schatten hiaten
opt: <integer> met de toe te passen interpolatie methode
1 -> incremental interpolation (calls interp_grid)
2 -> global interpolation (calls fillmiss)
maxID: <integer> hoogste ID die voorkomt in de lijst van
samengestelde grids
cntr: <struct array> met contour data (voor verslag)
N: <integer> aantal uitgesloten punten op grond van contour
data (voor verslag)
OUTPUT:
ok: <boolean> succesvol?
APPROACH:
Er zijn drie soorten punten
-1- punten met data (niet te interpoleren)
-2- punten zonder data (te interpoleren)
-3- punten zonder data (niet te interpoleren)
ApplicationRoot\ma\kjhroutines
24-Jul-2007 11:27:44
7970 bytes
do_smooth - smooth grid
CALL:
[smooth_index,z_interp,convergentie,report] = do_smooth(griddata,opt)
INPUT:
griddata: <struct> met een grid, zie ook emptygrid,
metagrid.grid is rekengrid
opt: <struct> met opties, met volgende velden:
opt.smooth_rand: smoothing conditie (rafelrand)
0 do not smooth rafel rand
1 smooth rafelrand
opt.smooth_rand_grad: smoothing parameter(rafelrand)
opt.smooth_rest: smoothing conditie (rest)
0 do not smooth rest
1 smooth rest
opt.smooth_rest_grad: smoothing parameter(rest)
OUTPUT:
smooth_index: <vector> met indices van gesmoothde punten
z_interp: <vector> met de bij smooth_index horende waarden
convergentie: <boolean> 1 wanneer convergentie bereikt is
report: <string> met rapportage per iteratie
APPROACH:
STAP1 : bepaal gradient van grid voor alle coordinaten ==> dx,dy
STAP2 : selecteer de punten met gradient overschrijding
(op interne en restpunten) ==> f_edge,f_rest
STAP3 : voeg deze twee verzamelingen samen ==> f_all, STOP indien leeg
STAP4 : smooth deze punten en ga terug naar STAP 1
(beperk de gradient berekening eventueel tot alleen de
gewijzigde punten)
ApplicationRoot\ma\kjhroutines
19-Jul-2007 23:03:54
11637 bytes
do_swan_interp - combineer grids tbv bodemkaart
CALL:
SWANgrid = do_swan_interp(SWANgrid, griddata)
INPUT:
SWANgrid: <struct> aan te vullen SWAN grid
griddata: <struct> rekengrid (Laagste prioriteit)
LET OP! dit zijn de pure grid data zonder de meta data, dus
bijvoorbeeld: ud.grid(9).grid
OUTPUT:
SWANgrid: <struct> aangevuld SWAN grid
ApplicationRoot\ma\kjhroutines
05-Mar-2007 10:24:16
1458 bytes
interpoleer NaN waarden door lineaire interpolatie
INPUT
M: cellen met NaN dienen geinterpoleerd te worden.
TEST:
if nargin==0
CASE=1;
switch CASE
case 1
load Mdata
M(1,:)=[];
M(end,:)=[];
M(:,1)=[];
M(:,end)=[];
case 2
%Simple test. Zijpp, sept 2004
M=ones(4,5);
M(:,end)=10;
M(end,:)=5;
M(2:end-1,2:end-1)=NaN;
% disp(fillmiss([A;A]));
end
disp(' ')
disp(M);
disp(' ')
disp(real2str(fillmisslinear(M)));
return
end
VERBOSE=0;
ApplicationRoot\ma\kjhroutines
14-Sep-2004 12:10:18
3911 bytes
get_hiaat_index - bepaal de lineaire index naar de missing values in
een grid terwijl uitwendige punten genegeerd worden.
CALL:
[interp_index,stopped] = get_hiaat_index(alpha)
INPUT:
alpha: <matrix of double>,
alpha>0 -> data
alpha==0 -> missing values
OUTPUT:
interp_index: <linear index> naar de missing values
stopped: <boolean> succesvol?
ApplicationRoot\ma\kjhroutines
08-Jan-2006 20:13:54
11064 bytes
grid_edge - find internal edges
CALL
f_edge = grid_edge(grid)
INPUT
grid : grid structure with at least the fields
herkomst
OUTPUT
f_edge : linear index to edge points
ApplicationRoot\ma\kjhroutines
08-Jan-2006 18:03:06
5364 bytes
maxdxy - bepaal de gradient van een grid
CALL:
maxdxy = gridgradient(Z,isdata,f_select)
INPUT:
Z: <matrix of int16> afmetingen NxM
isdata: <matrix of logical> afmetingen NxM die aangeeft wat de
datapunten zijn
f_select: <index> waarvoor de gradient berekend moet worden
OUTPUT:
maxdxy: <matrix of double> met het maximum van de gradient in x en y
richting
ApplicationRoot\ma\kjhroutines
24-Jul-2007 22:25:46
11362 bytes
remove comment from seperate line
ModelitUtilRoot\docutool
24-Dec-1999 12:31:02
418 bytes
show - show image file
CALL
image: filename (with or without extension)
Modelit
www.modelit.nl
ModelitUtilRoot\docutool
30-Apr-2003 18:56:03
450 bytes
jarkus - schematiseer volgens jarkus definitie
CALL:
[M,status] = jarkus(xyloc,z,status,STAPGROOTTE1,STAPGROOTTE2)
INPUT:
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter
breedte: 2 (afgerond op cm)
z: <array of double> met de diepte (eenheid niet belangrijk)
status: <array of uint8> met de binaire statuscode
STAPGROOTTE1: <double> stapgrootte (in meters)
STAPGROOTTE2: <double> stapgrootte (in meters)
OUTPUT:
M: <matrix of double> met de geschematiseerde reeks
kolom 1 -> x (meter)
kolom 2 -> y (meter)
kolom 3 -> z (meter)
status: <array of uint8> met de binaire statuscode
ApplicationRoot\ma\rekenfuncties
20-Feb-2008 10:34:12
5849 bytes
koppel - koppel twee raaien
CALL:
[db,OpenUitgangData] = koppel(db,ID1,ID2)
INPUT
db: <struct> met de centrale database
ID1: <integer> ID van de eerste raai
ID2: <integer> ID van de tweede raai
OUTPUT:
db: <struct> met de bijgewerkte centrale database
OpenUitgangData: <matrix of double> met de data voor open uitgang file
kolom 1 -> x-coordinaat
kolom 2 -> diepte
kolom 3 -> verklaring herkomst
1 -> hoogte meting (*)
2 -> hoogtemeting overlappend met diep (**)
3 -> geinterpoleerde meetwaarde (*)
4 -> diepte meting overlappend met hoog (**)
5 -> dieptemeting (*)
(*) deze datapunten worden ook in de
gekoppelde raai opgeslagen
(**) deze datapunten worden niet in de
gekoppelde raai opgeslagen
ApplicationRoot\ma\rekenfuncties
07-Aug-2007 12:16:46
11018 bytes
schema_wesp - schematiseer volgens wesp
INPUT:
DREMPEL_HOOGTE: <double> hoogte waarop hoge gedeelte van de raai begint
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn)(meter)
breedte: 2 (afgerond op cm)
z: <array of double> met de diepte (eenheid onbelangrijk)
STAP_LAAG: <double> stapgrootte voor laag gedeelte (meter)
STAP_HOOG: <double> stapgrootte voor hoog gedeelte (meter)
STAP_DWARS: <double> maximale uitwijking vanaf raai
OUTPUT:
xy: <matrix of double> geschematiseerde coordinaten, breedte == 2
z: <array of double> geschematiseerde diepte
APPROACH:
Deze functie lijkt op de JARKUS schematisatie, maar wordt gelijk bij
het inlezen van de data toegepast, waardoor controle op status
achterwege kan blijven. Een ander verschil is dat de datapunten niet
worden gecentreerd op het midden van ieder interval.
- Bepaal het eerste punt dat boven drempel uitkomt.
- Zet DREMPEL = voetmaat van dit punt
- Beschouw dit en alle achtereenvolgende punten als het hoge gedeelte
van de reeks.
- Beschouw de overige punten als het lage gedeelte.
- Dun uit vanaf drempel
- Dun uit tot drempel (aanroep zelfde routine, maar tekens omgedraaid)
- Rond voetmaten af op de cm.
- Voeg het absoluut hoogste punt toe. Wanneer coordinaten samenvallen:
vervang ander punt
SEE ALSO:
jarkus
schematiseren
ApplicationRoot\ma\rekenfuncties
18-Oct-2005 15:12:28
4318 bytes
schematiseren - maak een geschematiseerde reeks voor een raai aan
CALL:
[ud,str] = schematiseren(ud,baseind,NEWGROUP,xyloc)
INPUT:
ud: <struct> met de centrale database
baseind: <substruct> met verwijzing naar huidige raai
NEWGROUP: <boolean> database mutatie status
xyloc: <matrix of double> (optioneel) locale x-y
(voetmaat-loodlijn) in meter, breedte: 2
OUTPUT:
ud: <struct> met de geactualiseerde centrale database
str: <char array>
ApplicationRoot\ma\rekenfuncties
10-Jun-2008 15:39:48
4452 bytes
selectandkoppel - koppel diepteraaien
CALL:
[ud,str,OpenUitgangData,koppelindx] =
selectandkoppel(ud,curindx)
INPUT:
ud: <struct> met de centrale database
curindx: <integer> met de index van raai die gekoppeld moet worden
OUTPUT:
ud: <struct> met de geactualiseerde database
str: <char array> met rapportage
OpenUitgangData: <matrix of double> met data voor open uitgang file
Kolom 1 -> voetmaat
Kolom 2 -> diepte
Kolom 3 -> code
koppelindx: <integer> met de index van de raai waarmee gekoppeld is
(ook voor open uitgangfile)
APPROACH:
check of dit een diepte meting is
selecteer raai om mee te koppelen
voer koppeling uit
SEE ALSO:
Raai2OpenUitgang
ApplicationRoot\ma\rekenfuncties
07-Aug-2007 12:17:52
3748 bytes
setref1D - rekenmodule voor het instellen van de referentieraai met de 1D
smooth methode
CALL:
[dbdata,foutlier] = setref1D(dbdata,baseind,xyloc,NEWGROUP)
INPUT:
dbdata: <struct> met de centrale database
baseind: <substruct> index naar de huidige raai
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
NEWGROUP: <boolean> database mutatie status
OUTPUT:
dbdata: <struct> met de geactualiseerde centrale database
foutlier: <array of integer> met indices in raai van overschrijdende
waarden
ApplicationRoot\ma\rekenfuncties
27-Jun-2007 15:44:12
1182 bytes
setref2D - rekenmodule voor het instellen van de referentieraai met de 2D
smooth methode
CALL:
[dbdata,foutlier,succes,IDs] = setref2D(dbdata,curindx,xyloc,NEWGROUP)
INPUT:
dbdata: <struct> met de centrale database
curindx: <integer> index naar de huidige raai
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
NEWGROUP: <boolean> database mutatie status
OUTPUT:
dbdata: <struct> met de geactualiseerde centrale database
foutlier: <array of integer> met indices in raai van overschrijdende
waarden
succes: <boolean> wel of geen geschikte buur-raai gevonden
IDs: <struct> met velden
- links -> IDs van linkerburen
- current -> IDs van huidige raai
- rechts -> IDs van rechterburen
ApplicationRoot\ma\rekenfuncties
20-Feb-2008 10:32:45
3373 bytes
verwoutliers - rekenmodule voor het verwijderen van outliers
(geen interactie met gebruiker)
CALL:
[dbdata,xyloc] = verwoutliers(dbdata,baseind,NEWGROUP,xyloc)
INPUT:
dbdata: <struct> met de centrale database
baseind: <substruct> met index naar huidige raai
NEWGROUP: <boolean> 1 voor een aparte vermelding in de undo/redo lijst
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
OUTPUT:
dbdata: <struct> met de geactualiseerde centrale database (de outliers
zijn verwijderd)
xyloc: <matrix of double> locale x-y (voetmaat-loodlijn) in meter,
breedte: 2 (maar afgerond op cm)
ApplicationRoot\ma\rekenfuncties
04-Jul-2007 11:25:18
2358 bytes
curindx - haal de index van de raai met ID op
CALL:
curindx = findraai(raaiarray,ID)
INPUT:
raaiarray: <struct array> met raaien
ID: <integer> met het ID van gezochte raai
OUTPUT:
curindx: <integer> met de index van de gezochte raai in 'raaiarray'
[] als niet aanwezig
ApplicationRoot\ma\rekenfuncties\hulpfuncties
27-Sep-2005 16:24:28
690 bytes
getbinstatus - bepaal binaire status uit geaggregeerde status
CALL:
[bhiaat,bcontrole,boutlier,bvalide,bherkomst] = getbinstatus(status)
INPUT:
status: (UINT8) statusbits voor alle data
OUTPUT:
bhiaat: <boolean>
bcontrole: <boolean>
boutlier: <boolean>
bvalide: <boolean>
bherkomst: <boolean>
APPROACH:
bit 1: Hiaat (factor 1)
0: Niet aangemerkt als hiaat
1: Wel aangemerkt als hiaat
bit 2 Controle (factor 2)
0: Niet vergeleken met referentie
1: Wel vergeleken met referentie
bit 3 Outlier (factor 4)
0: Geen significante afwijking met referentie
1: Wel significante afwijking met referentie
bit 4 Validatie status (factor 8)
0: Niet behandeld
1: Wel behandeld
bit 5: Herkomst (factor 16)
0: gemeten
1: geschat
SEE ALSO:
getstatustype
setbinstatus
ishiaat
ApplicationRoot\ma\rekenfuncties\hulpfuncties
28-Sep-2005 11:24:30
1594 bytes
getraaitype - bepaal type van deze raai
CALL:
types = getraaitype(raaiarray)
INPUT:
raaiarray: <array of struct> met raaien
OUTPUT:
types: <integer> bijbehorende types, mogelijke waarden:
1 -> niet geschematiseerde natte natte raai(DIEPTE)
sAnacod=F025 & sBewcod~=SCHEM_R1
2 -> gekoppelde raai(GEKOPPELD)
sAnacod=F147
3 -> droge raai(HOOGTE)
sAnacod=F110 / F003 / F022
4 -> geschematiseerde natte raai(JARKUS)
sAnacod=F025 & sBewcod=SCHEM_R1
EXAMPLE:
DIEPTE=1; %(gebruik constantes voor leesbaarheid code)
GEKOPPELD=2;
HOOGTE=3;
JARKUS=4;
types=getraaitype(db.raai);
..
See also: findkaartbladen
ApplicationRoot\ma\rekenfuncties\hulpfuncties
05-Mar-2007 10:34:32
1878 bytes
getstatustype - stel geaggregeerd statustype in (combinatie van alle
status bits)
CALL:
[statustype,bvalide,bherkomst,aggregstatus] = getstatustype(status)
INPUT:
status: <vector of uint8> met geaggregeerde status bits
OUTPUT:
statustype: <double> bepaal welk symbool geplot wordt,
mogelijke waarden:
C.OK
C.HIAAT
C.OUTLIER
C.ANDERS
C.INTERP
bvalide: <boolean>
1 -> valide
0 -> nog niet valide
bherkomst: <boolean>
1 -> geinterpoleerd
0 -> niet geinterpoleerd
aggregstatus: <struct> geinitialiseerde structure met aggregatiestatus
met velden:
- numhiaat
- numoutlier
- numanders
- numvalide
- numtotal
SEE ALSO:
getbinstatus
setbinstatus
getaggregstatus
ApplicationRoot\ma\rekenfuncties\hulpfuncties
28-Sep-2005 10:59:04
4540 bytes
ishiaat - bepaal de hiaten aan de hand van de status
CALL:
bhiaat = ishiaat(status)
INPUT:
status: <vector of uint8) met de statusbits voor alle data
bit 1: Hiaat (FACTOR 1)
bit 2: Controle (FACTOR 2)
bit 3: Outlier (FACTOR 4)
bit 4: Validatie status (FACTOR 8)
bit 5: Herkomst (FACTOR 16)
OUTPUT: <vector of boolean> met de hiaten
SEE ALSO:
getbinstatus
ishiaat
APPROACH:
bits: van rechts naar links
bit 1: Hiaat
0: Niet aangemerkt als hiaat
1: Wel aangemerkt als hiaat
bit 2 Controle
0: Niet vergeleken met referentie
1: Wel vergeleken met referentie
bit 3 Outlier
0: Geen significante afwijking met referentie
1: Wel significante afwijking met referentie
bit 4 Validatie status
0: Niet behandeld
1: Wel behandeld
bit 5: Herkomst
0: gemeten
1: geschat
ApplicationRoot\ma\rekenfuncties\hulpfuncties
08-Jan-2006 20:23:12
1507 bytes
longdate2datenum - reken longdate formaat om naar datenum formaat CALL: D = longdate2datenum(yyyymmdd) INPUT: yyyymmdd: <array of longdate> met datums OUTPUT: D: <array of datenum> met geconverteerde datums
ApplicationRoot\ma\rekenfuncties\hulpfuncties
27-Sep-2005 16:26:48
595 bytes
setbinstatus - combineer binaire status in geaggregeerde status
CALL:
[status] = setbinstatus(bhiaat,bcontrole,boutlier,bvalide,bherkomst)
INPUT:
bhiaat: <boolean>
bcontrole: <boolean>
boutlier: <boolean>
bvalide: <boolean>
bherkomst: <boolean>
OUTPUT:
status: (UINT8) geaggregeerde statusbits voor alle data
APPROACH:
bit 1: Hiaat (factor 1)
0: Niet aangemerkt als hiaat
1: Wel aangemerkt als hiaat
bit 2 Controle (factor 2)
0: Niet vergeleken met referentie
1: Wel vergeleken met referentie
bit 3 Outlier (factor 4)
0: Geen significante afwijking met referentie
1: Wel significante afwijking met referentie
bit 4 Validatie status (factor 8)
0: Niet behandeld
1: Wel behandeld
bit 5: Herkomst (factor 16)
0: gemeten
1: geschat
SEE ALSO:
getbinstatus
getstatustype
ApplicationRoot\ma\rekenfuncties\hulpfuncties
28-Sep-2005 11:24:02
1400 bytes
striphiaat - verwijder hiaten uit raai
CALL:
raai = striphiaat(raai)
INPUT:
raai: <struct> met een raai met hiaten
OUTPUT:
raai: <struct> met een raai zonder hiaten
ApplicationRoot\ma\rekenfuncties\hulpfuncties
27-Sep-2005 18:01:26
524 bytes