This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(5) |
Sep
(3) |
Oct
(41) |
Nov
(41) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(75) |
Feb
(10) |
Mar
(170) |
Apr
(174) |
May
(66) |
Jun
(11) |
Jul
(10) |
Aug
(44) |
Sep
(73) |
Oct
(28) |
Nov
(139) |
Dec
(52) |
2003 |
Jan
(35) |
Feb
(93) |
Mar
(62) |
Apr
(10) |
May
(55) |
Jun
(70) |
Jul
(37) |
Aug
(16) |
Sep
(56) |
Oct
(31) |
Nov
(57) |
Dec
(83) |
2004 |
Jan
(85) |
Feb
(67) |
Mar
(27) |
Apr
(37) |
May
(75) |
Jun
(85) |
Jul
(160) |
Aug
(68) |
Sep
(104) |
Oct
(25) |
Nov
(39) |
Dec
(23) |
2005 |
Jan
(10) |
Feb
(45) |
Mar
(43) |
Apr
(19) |
May
(108) |
Jun
(31) |
Jul
(41) |
Aug
(23) |
Sep
(65) |
Oct
(58) |
Nov
(44) |
Dec
(54) |
2006 |
Jan
(96) |
Feb
(27) |
Mar
(69) |
Apr
(59) |
May
(67) |
Jun
(35) |
Jul
(13) |
Aug
(461) |
Sep
(160) |
Oct
(399) |
Nov
(32) |
Dec
(72) |
2007 |
Jan
(316) |
Feb
(305) |
Mar
(318) |
Apr
(54) |
May
(194) |
Jun
(173) |
Jul
(282) |
Aug
(91) |
Sep
(227) |
Oct
(365) |
Nov
(168) |
Dec
(18) |
2008 |
Jan
(71) |
Feb
(111) |
Mar
(155) |
Apr
(173) |
May
(70) |
Jun
(67) |
Jul
(55) |
Aug
(83) |
Sep
(32) |
Oct
(68) |
Nov
(80) |
Dec
(29) |
2009 |
Jan
(46) |
Feb
(18) |
Mar
(95) |
Apr
(76) |
May
(140) |
Jun
(98) |
Jul
(84) |
Aug
(123) |
Sep
(94) |
Oct
(131) |
Nov
(142) |
Dec
(125) |
2010 |
Jan
(128) |
Feb
(158) |
Mar
(172) |
Apr
(134) |
May
(94) |
Jun
(84) |
Jul
(32) |
Aug
(127) |
Sep
(167) |
Oct
(109) |
Nov
(69) |
Dec
(78) |
2011 |
Jan
(39) |
Feb
(58) |
Mar
(52) |
Apr
(47) |
May
(56) |
Jun
(76) |
Jul
(55) |
Aug
(54) |
Sep
(165) |
Oct
(255) |
Nov
(328) |
Dec
(263) |
2012 |
Jan
(82) |
Feb
(147) |
Mar
(400) |
Apr
(216) |
May
(209) |
Jun
(160) |
Jul
(86) |
Aug
(141) |
Sep
(156) |
Oct
(6) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(2) |
2016 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(5) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
From: <cd...@us...> - 2012-08-04 21:05:34
|
Revision: 10823 http://octave.svn.sourceforge.net/octave/?rev=10823&view=rev Author: cdf Date: 2012-08-04 21:05:28 +0000 (Sat, 04 Aug 2012) Log Message: ----------- prepare for release Modified Paths: -------------- trunk/octave-forge/extra/fpl/DESCRIPTION Modified: trunk/octave-forge/extra/fpl/DESCRIPTION =================================================================== --- trunk/octave-forge/extra/fpl/DESCRIPTION 2012-08-04 21:03:39 UTC (rev 10822) +++ trunk/octave-forge/extra/fpl/DESCRIPTION 2012-08-04 21:05:28 UTC (rev 10823) @@ -8,5 +8,4 @@ Categories: Graphics Depends: octave ( >= 3.0.0 ) License: GNU/GPL -SystemRequirements: SVNRelease: 10822 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cd...@us...> - 2012-08-04 21:03:45
|
Revision: 10822 http://octave.svn.sourceforge.net/octave/?rev=10822&view=rev Author: cdf Date: 2012-08-04 21:03:39 +0000 (Sat, 04 Aug 2012) Log Message: ----------- prepare for release Modified Paths: -------------- trunk/octave-forge/extra/fpl/DESCRIPTION trunk/octave-forge/extra/fpl/INDEX Modified: trunk/octave-forge/extra/fpl/DESCRIPTION =================================================================== --- trunk/octave-forge/extra/fpl/DESCRIPTION 2012-08-04 20:59:31 UTC (rev 10821) +++ trunk/octave-forge/extra/fpl/DESCRIPTION 2012-08-04 21:03:39 UTC (rev 10822) @@ -9,4 +9,4 @@ Depends: octave ( >= 3.0.0 ) License: GNU/GPL SystemRequirements: -SVNRelease: 10821 +SVNRelease: 10822 Modified: trunk/octave-forge/extra/fpl/INDEX =================================================================== --- trunk/octave-forge/extra/fpl/INDEX 2012-08-04 20:59:31 UTC (rev 10821) +++ trunk/octave-forge/extra/fpl/INDEX 2012-08-04 21:03:39 UTC (rev 10822) @@ -1,10 +1,13 @@ FPL >> FEM Plotting -Functions to save data in VTK format +functions to save data in VTK format fpl_vtk_write_field.m fpl_vtk_b64_write_field.m fpl_vtk_assemble_series.m savevtk savevtkvector -Pdetool compatible plotting functions +functions to save data in OpenDX format + fpl_dx_write_field + fpl_dx_write_series +pdetool compatible plotting functions pdesurf pdemesh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cd...@us...> - 2012-08-04 20:59:40
|
Revision: 10821 http://octave.svn.sourceforge.net/octave/?rev=10821&view=rev Author: cdf Date: 2012-08-04 20:59:31 +0000 (Sat, 04 Aug 2012) Log Message: ----------- prepare for release Modified Paths: -------------- trunk/octave-forge/extra/fpl/DESCRIPTION trunk/octave-forge/extra/fpl/INDEX trunk/octave-forge/extra/fpl/src/array_to_uint8.cc Added Paths: ----------- trunk/octave-forge/extra/fpl/inst/deprecated/ trunk/octave-forge/extra/fpl/inst/deprecated/FPL2coloredgradient.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2coloredrubbersheet.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2dxappenddata.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2dxoutputdata.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2dxoutputtimeseries.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2pdequiver.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2pdequiver.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2pdeshowmesh.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2pdeshowmesh.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2pdesurf.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2ptcquiver.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2ptcquiver.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2ptcshowmesh.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2ptcshowmesh.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2ptcsurf.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2ptcsurf.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2showmesh.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2trspdesurf.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2trspdesurf.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2trsptcsurf.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL2trsptcsurf.net trunk/octave-forge/extra/fpl/inst/deprecated/FPL2vtkoutputdata.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL3dxoutputfield.m trunk/octave-forge/extra/fpl/inst/deprecated/FPL3dxoutputmesh.m Removed Paths: ------------- trunk/octave-forge/extra/fpl/inst/FPL2coloredgradient.net trunk/octave-forge/extra/fpl/inst/FPL2coloredrubbersheet.net trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m trunk/octave-forge/extra/fpl/inst/FPL2dxoutputdata.m trunk/octave-forge/extra/fpl/inst/FPL2dxoutputtimeseries.m trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.m trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.net trunk/octave-forge/extra/fpl/inst/FPL2pdeshowmesh.m trunk/octave-forge/extra/fpl/inst/FPL2pdeshowmesh.net trunk/octave-forge/extra/fpl/inst/FPL2pdesurf.m trunk/octave-forge/extra/fpl/inst/FPL2ptcquiver.m trunk/octave-forge/extra/fpl/inst/FPL2ptcquiver.net trunk/octave-forge/extra/fpl/inst/FPL2ptcshowmesh.m trunk/octave-forge/extra/fpl/inst/FPL2ptcshowmesh.net trunk/octave-forge/extra/fpl/inst/FPL2ptcsurf.m trunk/octave-forge/extra/fpl/inst/FPL2ptcsurf.net trunk/octave-forge/extra/fpl/inst/FPL2showmesh.net trunk/octave-forge/extra/fpl/inst/FPL2trspdesurf.m trunk/octave-forge/extra/fpl/inst/FPL2trspdesurf.net trunk/octave-forge/extra/fpl/inst/FPL2trsptcsurf.m trunk/octave-forge/extra/fpl/inst/FPL2trsptcsurf.net trunk/octave-forge/extra/fpl/inst/FPL2vtkoutputdata.m trunk/octave-forge/extra/fpl/inst/FPL3dxoutputfield.m trunk/octave-forge/extra/fpl/inst/FPL3dxoutputmesh.m Modified: trunk/octave-forge/extra/fpl/DESCRIPTION =================================================================== --- trunk/octave-forge/extra/fpl/DESCRIPTION 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/DESCRIPTION 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,12 +1,12 @@ Name: fpl -Version: 1.2.0 -Date: 2010-06-12 -Author: Carlo de Falco, Massimiliano Culpo +Version: 1.3.0 +Date: 2012-08-04 +Author: Carlo de Falco, Massimiliano Culpo and others Maintainer: Carlo de Falco, Massimiliano Culpo Title: Fem PLotting Description: Collection of routines to save data in different graphical formats. Categories: Graphics Depends: octave ( >= 3.0.0 ) License: GNU/GPL -SystemRequirements: dx ( >= 4.3.2), sed, bash -SVNRelease: 7425 \ No newline at end of file +SystemRequirements: +SVNRelease: 10821 Modified: trunk/octave-forge/extra/fpl/INDEX =================================================================== --- trunk/octave-forge/extra/fpl/INDEX 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/INDEX 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,28 +1,10 @@ FPL >> FEM Plotting -Functions to save data in DX format - fpl_dx_write_field.m - fpl_dx_write_series.m Functions to save data in VTK format fpl_vtk_write_field.m + fpl_vtk_b64_write_field.m fpl_vtk_assemble_series.m savevtk savevtkvector Pdetool compatible plotting functions pdesurf pdemesh -Legacy DX export functions - FPL2dxappenddata - FPL2dxoutputdata - FPL2dxoutputtimeseries - FPL3dxoutputmesh - FPL3dxoutputfield -Legacy DX wrappers - FPL2pdeshowmesh - FPL2ptcshowmesh - FPL2pdesurf - FPL2ptcsurf - FPL2trspdesurf - FPL2trsptcsurf - FPL2pdequiver - FPL2ptcquiver - FPL2vtkoutputdata Deleted: trunk/octave-forge/extra/fpl/inst/FPL2coloredgradient.net =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2coloredgradient.net 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2coloredgradient.net 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,635 +0,0 @@ -// -// time: Wed Jun 13 18:54:22 2007 -// -// version: 3.2.0 (format), 4.4.4 (DX) -// -// -// MODULE main -// workspace: width = 459, height = 507 -// layout: snap = 0, width = 50, height = 50, align = NN -// -macro main( -) -> ( -) { - // - // node FileSelector[1]: x = 28, y = 29, inputs = 0, label = FileSelector - // output[1]: visible = 1, type = 32, value = "__FILE__DX__" - // output[2]: visible = 1, type = 32, value = "__FILE__DX__" - // - // - // node Import[1]: x = 34, y = 109, inputs = 6, label = Import - // -main_Import_1_out_1 = - Import( - main_FileSelector_1_out_1, - main_Import_1_in_2, - main_Import_1_in_3, - main_Import_1_in_4, - main_Import_1_in_5, - main_Import_1_in_6 - ) [instance: 1, cache: 1]; - // - // node Post[1]: x = 124, y = 167, inputs = 2, label = Post - // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" - // -main_Post_1_out_1 = - Post( - main_Import_1_out_1, - main_Post_1_in_2 - ) [instance: 1, cache: 1]; - // - // node Gradient[1]: x = 227, y = 144, inputs = 2, label = Gradient - // -main_Gradient_1_out_1 = - Gradient( - main_Post_1_out_1, - main_Gradient_1_in_2 - ) [instance: 1, cache: 1]; - // - // node AutoGlyph[1]: x = 241, y = 215, inputs = 7, label = AutoGlyph - // -main_AutoGlyph_1_out_1 = - AutoGlyph( - main_Gradient_1_out_1, - main_AutoGlyph_1_in_2, - main_AutoGlyph_1_in_3, - main_AutoGlyph_1_in_4, - main_AutoGlyph_1_in_5, - main_AutoGlyph_1_in_6, - main_AutoGlyph_1_in_7 - ) [instance: 1, cache: 1]; - // - // node AutoColor[1]: x = 253, y = 283, inputs = 10, label = AutoColor - // -main_AutoColor_1_out_1, -main_AutoColor_1_out_2 = - AutoColor( - main_AutoGlyph_1_out_1, - main_AutoColor_1_in_2, - main_AutoColor_1_in_3, - main_AutoColor_1_in_4, - main_AutoColor_1_in_5, - main_AutoColor_1_in_6, - main_AutoColor_1_in_7, - main_AutoColor_1_in_8, - main_AutoColor_1_in_9, - main_AutoColor_1_in_10 - ) [instance: 1, cache: 1]; - // - // node ShowConnections[1]: x = 39, y = 242, inputs = 1, label = ShowConnections - // -main_ShowConnections_1_out_1 = - ShowConnections( - main_Post_1_out_1 - ) [instance: 1, cache: 1]; - // - // node Color[1]: x = 72, y = 328, inputs = 5, label = Color - // input[2]: defaulting = 0, visible = 1, type = 32, value = "black" - // input[3]: defaulting = 0, visible = 1, type = 5, value = .5 - // -main_Color_1_out_1 = - Color( - main_ShowConnections_1_out_1, - main_Color_1_in_2, - main_Color_1_in_3, - main_Color_1_in_4, - main_Color_1_in_5 - ) [instance: 1, cache: 1]; - // - // node ColorBar[1]: x = 339, y = 285, inputs = 16, label = ColorBar - // input[9]: defaulting = 0, visible = 0, type = 16777248, value = {"black"} - // -main_ColorBar_1_out_1 = - ColorBar( - main_AutoColor_1_out_2, - main_ColorBar_1_in_2, - main_ColorBar_1_in_3, - main_ColorBar_1_in_4, - main_ColorBar_1_in_5, - main_ColorBar_1_in_6, - main_ColorBar_1_in_7, - main_ColorBar_1_in_8, - main_ColorBar_1_in_9, - main_ColorBar_1_in_10, - main_ColorBar_1_in_11, - main_ColorBar_1_in_12, - main_ColorBar_1_in_13, - main_ColorBar_1_in_14, - main_ColorBar_1_in_15, - main_ColorBar_1_in_16 - ) [instance: 1, cache: 1]; - // - // node Collect[1]: x = 280, y = 393, inputs = 3, label = Collect - // -main_Collect_1_out_1 = - Collect( - main_Color_1_out_1, - main_AutoColor_1_out_1, - main_ColorBar_1_out_1 - ) [instance: 1, cache: 1]; - // - // node Image[1]: x = 188, y = 445, inputs = 49, label = Image - // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1" - // input[4]: defaulting = 0, visible = 0, type = 1, value = 1 - // input[5]: defaulting = 0, visible = 0, type = 8, value = [0.182894 0.102434 0] - // input[6]: defaulting = 0, visible = 0, type = 8, value = [0.182894 0.102434 3.60504] - // input[7]: defaulting = 0, visible = 0, type = 5, value = 0.460265 - // input[8]: defaulting = 0, visible = 0, type = 1, value = 772 - // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.791 - // input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0] - // input[11]: defaulting = 1, visible = 0, type = 5, value = 7.30519 - // input[12]: defaulting = 0, visible = 0, type = 1, value = 0 - // input[14]: defaulting = 0, visible = 0, type = 1, value = 1 - // input[15]: defaulting = 1, visible = 0, type = 32, value = "none" - // input[16]: defaulting = 1, visible = 0, type = 32, value = "none" - // input[17]: defaulting = 1, visible = 0, type = 1, value = 1 - // input[18]: defaulting = 1, visible = 0, type = 1, value = 1 - // input[19]: defaulting = 0, visible = 0, type = 1, value = 0 - // input[22]: defaulting = 0, visible = 0, type = 32, value = "snow" - // input[25]: defaulting = 0, visible = 0, type = 32, value = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/doping.tif" - // input[26]: defaulting = 0, visible = 0, type = 32, value = "tiff" - // input[29]: defaulting = 0, visible = 0, type = 3, value = 1 - // input[31]: defaulting = 0, visible = 0, type = 1, value = -5 - // input[33]: defaulting = 0, visible = 0, type = 3, value = 1 - // input[34]: defaulting = 0, visible = 0, type = 3, value = 0 - // input[36]: defaulting = 0, visible = 0, type = 3, value = 1 - // input[37]: defaulting = 0, visible = 0, type = 16777248, value = {"clear", "black", "blue", "blue"} - // input[38]: defaulting = 0, visible = 0, type = 16777248, value = {"background", "grid", "ticks", "labels"} - // input[39]: defaulting = 0, visible = 0, type = 5, value = 0.65 - // input[40]: defaulting = 0, visible = 0, type = 32, value = "roman_d" - // input[41]: defaulting = 0, visible = 0, type = 32, value = "panzoom" - // depth: value = 24 - // window: position = (0.0000,0.0000), size = 0.6141x0.6396 - // internal caching: 1 - // -main_Image_1_out_1, -main_Image_1_out_2, -main_Image_1_out_3 = - Image( - main_Image_1_in_1, - main_Collect_1_out_1, - main_Image_1_in_3, - main_Image_1_in_4, - main_Image_1_in_5, - main_Image_1_in_6, - main_Image_1_in_7, - main_Image_1_in_8, - main_Image_1_in_9, - main_Image_1_in_10, - main_Image_1_in_11, - main_Image_1_in_12, - main_Image_1_in_13, - main_Image_1_in_14, - main_Image_1_in_15, - main_Image_1_in_16, - main_Image_1_in_17, - main_Image_1_in_18, - main_Image_1_in_19, - main_Image_1_in_20, - main_Image_1_in_21, - main_Image_1_in_22, - main_Image_1_in_23, - main_Image_1_in_24, - main_Image_1_in_25, - main_Image_1_in_26, - main_Image_1_in_27, - main_Image_1_in_28, - main_Image_1_in_29, - main_Image_1_in_30, - main_Image_1_in_31, - main_Image_1_in_32, - main_Image_1_in_33, - main_Image_1_in_34, - main_Image_1_in_35, - main_Image_1_in_36, - main_Image_1_in_37, - main_Image_1_in_38, - main_Image_1_in_39, - main_Image_1_in_40, - main_Image_1_in_41, - main_Image_1_in_42, - main_Image_1_in_43, - main_Image_1_in_44, - main_Image_1_in_45, - main_Image_1_in_46, - main_Image_1_in_47, - main_Image_1_in_48, - main_Image_1_in_49 - ) [instance: 1, cache: 1]; -// network: end of macro body -CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2); -} -main_FileSelector_1_out_1 = "/tmp/SECS2D.6003912.dx"; -main_Import_1_in_2 = NULL; -main_Import_1_in_3 = NULL; -main_Import_1_in_4 = NULL; -main_Import_1_in_5 = NULL; -main_Import_1_in_6 = NULL; -main_Import_1_out_1 = NULL; -main_Post_1_in_2 = "positions"; -main_Post_1_out_1 = NULL; -main_Gradient_1_in_2 = NULL; -main_Gradient_1_out_1 = NULL; -main_AutoGlyph_1_in_2 = NULL; -main_AutoGlyph_1_in_3 = NULL; -main_AutoGlyph_1_in_4 = NULL; -main_AutoGlyph_1_in_5 = NULL; -main_AutoGlyph_1_in_6 = NULL; -main_AutoGlyph_1_in_7 = NULL; -main_AutoGlyph_1_out_1 = NULL; -main_AutoColor_1_in_2 = NULL; -main_AutoColor_1_in_3 = NULL; -main_AutoColor_1_in_4 = NULL; -main_AutoColor_1_in_5 = NULL; -main_AutoColor_1_in_6 = NULL; -main_AutoColor_1_in_7 = NULL; -main_AutoColor_1_in_8 = NULL; -main_AutoColor_1_in_9 = NULL; -main_AutoColor_1_in_10 = NULL; -main_AutoColor_1_out_1 = NULL; -main_AutoColor_1_out_2 = NULL; -main_ShowConnections_1_out_1 = NULL; -main_Color_1_in_2 = "black"; -main_Color_1_in_3 = .5; -main_Color_1_in_4 = NULL; -main_Color_1_in_5 = NULL; -main_Color_1_out_1 = NULL; -main_ColorBar_1_in_2 = NULL; -main_ColorBar_1_in_3 = NULL; -main_ColorBar_1_in_4 = NULL; -main_ColorBar_1_in_5 = NULL; -main_ColorBar_1_in_6 = NULL; -main_ColorBar_1_in_7 = NULL; -main_ColorBar_1_in_8 = NULL; -main_ColorBar_1_in_9 = {"black"}; -main_ColorBar_1_in_10 = NULL; -main_ColorBar_1_in_11 = NULL; -main_ColorBar_1_in_12 = NULL; -main_ColorBar_1_in_13 = NULL; -main_ColorBar_1_in_14 = NULL; -main_ColorBar_1_in_15 = NULL; -main_ColorBar_1_in_16 = NULL; -main_ColorBar_1_out_1 = NULL; -main_Collect_1_out_1 = NULL; -macro Image( - id, - object, - where, - useVector, - to, - from, - width, - resolution, - aspect, - up, - viewAngle, - perspective, - options, - buttonState = 1, - buttonUpApprox = "none", - buttonDownApprox = "none", - buttonUpDensity = 1, - buttonDownDensity = 1, - renderMode = 0, - defaultCamera, - reset, - backgroundColor, - throttle, - RECenable = 0, - RECfile, - RECformat, - RECresolution, - RECaspect, - AAenable = 0, - AAlabels, - AAticks, - AAcorners, - AAframe, - AAadjust, - AAcursor, - AAgrid, - AAcolors, - AAannotation, - AAlabelscale, - AAfont, - interactionMode, - title, - AAxTickLocs, - AAyTickLocs, - AAzTickLocs, - AAxTickLabels, - AAyTickLabels, - AAzTickLabels, - webOptions) -> ( - object, - camera, - where) -{ - ImageMessage( - id, - backgroundColor, - throttle, - RECenable, - RECfile, - RECformat, - RECresolution, - RECaspect, - AAenable, - AAlabels, - AAticks, - AAcorners, - AAframe, - AAadjust, - AAcursor, - AAgrid, - AAcolors, - AAannotation, - AAlabelscale, - AAfont, - AAxTickLocs, - AAyTickLocs, - AAzTickLocs, - AAxTickLabels, - AAyTickLabels, - AAzTickLabels, - interactionMode, - title, - renderMode, - buttonUpApprox, - buttonDownApprox, - buttonUpDensity, - buttonDownDensity) [instance: 1, cache: 1]; - autoCamera = - AutoCamera( - object, - "front", - object, - resolution, - aspect, - [0,1,0], - perspective, - viewAngle, - backgroundColor) [instance: 1, cache: 1]; - realCamera = - Camera( - to, - from, - width, - resolution, - aspect, - up, - perspective, - viewAngle, - backgroundColor) [instance: 1, cache: 1]; - coloredDefaultCamera = - UpdateCamera(defaultCamera, - background=backgroundColor) [instance: 1, cache: 1]; - nullDefaultCamera = - Inquire(defaultCamera, - "is null + 1") [instance: 1, cache: 1]; - resetCamera = - Switch( - nullDefaultCamera, - coloredDefaultCamera, - autoCamera) [instance: 1, cache: 1]; - resetNull = - Inquire( - reset, - "is null + 1") [instance: 2, cache: 1]; - reset = - Switch( - resetNull, - reset, - 0) [instance: 2, cache: 1]; - whichCamera = - Compute( - "($0 != 0 || $1 == 0) ? 1 : 2", - reset, - useVector) [instance: 1, cache: 1]; - camera = Switch( - whichCamera, - resetCamera, - realCamera) [instance: 3, cache: 1]; - AAobject = - AutoAxes( - object, - camera, - AAlabels, - AAticks, - AAcorners, - AAframe, - AAadjust, - AAcursor, - AAgrid, - AAcolors, - AAannotation, - AAlabelscale, - AAfont, - AAxTickLocs, - AAyTickLocs, - AAzTickLocs, - AAxTickLabels, - AAyTickLabels, - AAzTickLabels) [instance: 1, cache: 1]; - switchAAenable = Compute("$0+1", - AAenable) [instance: 2, cache: 1]; - object = Switch( - switchAAenable, - object, - AAobject) [instance:4, cache: 1]; - SWapproximation_options = - Switch( - buttonState, - buttonUpApprox, - buttonDownApprox) [instance: 5, cache: 1]; - SWdensity_options = - Switch( - buttonState, - buttonUpDensity, - buttonDownDensity) [instance: 6, cache: 1]; - HWapproximation_options = - Format( - "%s,%s", - buttonDownApprox, - buttonUpApprox) [instance: 1, cache: 1]; - HWdensity_options = - Format( - "%d,%d", - buttonDownDensity, - buttonUpDensity) [instance: 2, cache: 1]; - switchRenderMode = Compute( - "$0+1", - renderMode) [instance: 3, cache: 1]; - approximation_options = Switch( - switchRenderMode, - SWapproximation_options, - HWapproximation_options) [instance: 7, cache: 1]; - density_options = Switch( - switchRenderMode, - SWdensity_options, - HWdensity_options) [instance: 8, cache: 1]; - renderModeString = Switch( - switchRenderMode, - "software", - "hardware")[instance: 9, cache: 1]; - object_tag = Inquire( - object, - "object tag")[instance: 3, cache: 1]; - annoted_object = - Options( - object, - "send boxes", - 0, - "cache", - 1, - "object tag", - object_tag, - "ddcamera", - whichCamera, - "rendering approximation", - approximation_options, - "render every", - density_options, - "button state", - buttonState, - "rendering mode", - renderModeString) [instance: 1, cache: 1]; - RECresNull = - Inquire( - RECresolution, - "is null + 1") [instance: 4, cache: 1]; - ImageResolution = - Inquire( - camera, - "camera resolution") [instance: 5, cache: 1]; - RECresolution = - Switch( - RECresNull, - RECresolution, - ImageResolution) [instance: 10, cache: 1]; - RECaspectNull = - Inquire( - RECaspect, - "is null + 1") [instance: 6, cache: 1]; - ImageAspect = - Inquire( - camera, - "camera aspect") [instance: 7, cache: 1]; - RECaspect = - Switch( - RECaspectNull, - RECaspect, - ImageAspect) [instance: 11, cache: 1]; - switchRECenable = Compute( - "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4", - RECenable, - switchRenderMode, - RECresolution, - ImageResolution, - RECaspect, - ImageAspect) [instance: 4, cache: 1]; - NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object); - Display( - NoRECobject, - camera, - where, - throttle) [instance: 1, cache: 1]; - image = - Render( - RECNoRerenderObject, - camera) [instance: 1, cache: 1]; - Display( - image, - NULL, - where, - throttle) [instance: 2, cache: 1]; - WriteImage( - image, - RECfile, - RECformat) [instance: 1, cache: 1]; - rec_where = Display( - RECNoRerHW, - camera, - where, - throttle) [instance: 1, cache: 0]; - rec_image = ReadImageWindow( - rec_where) [instance: 1, cache: 1]; - WriteImage( - rec_image, - RECfile, - RECformat) [instance: 1, cache: 1]; - RECupdateCamera = - UpdateCamera( - camera, - resolution=RECresolution, - aspect=RECaspect) [instance: 2, cache: 1]; - Display( - RECRerenderObject, - camera, - where, - throttle) [instance: 1, cache: 1]; - RECRerenderObject = - ScaleScreen( - RECRerenderObject, - NULL, - RECresolution, - camera) [instance: 1, cache: 1]; - image = - Render( - RECRerenderObject, - RECupdateCamera) [instance: 2, cache: 1]; - WriteImage( - image, - RECfile, - RECformat) [instance: 2, cache: 1]; -} -main_Image_1_in_1 = "Image_1"; -main_Image_1_in_3 = "X24,,"; -main_Image_1_in_4 = 1; -main_Image_1_in_5 = [0.182894 0.102434 0]; -main_Image_1_in_6 = [0.182894 0.102434 3.60504]; -main_Image_1_in_7 = 0.460265; -main_Image_1_in_8 = 772; -main_Image_1_in_9 = 0.791; -main_Image_1_in_10 = [0 1 0]; -main_Image_1_in_11 = NULL; -main_Image_1_in_12 = 0; -main_Image_1_in_13 = NULL; -main_Image_1_in_14 = 1; -main_Image_1_in_15 = NULL; -main_Image_1_in_16 = NULL; -main_Image_1_in_17 = NULL; -main_Image_1_in_18 = NULL; -main_Image_1_in_19 = 0; -main_Image_1_in_20 = NULL; -main_Image_1_in_21 = NULL; -main_Image_1_in_22 = "snow"; -main_Image_1_in_23 = NULL; -main_Image_1_in_25 = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/doping.tif"; -main_Image_1_in_26 = "tiff"; -main_Image_1_in_27 = NULL; -main_Image_1_in_28 = NULL; -main_Image_1_in_29 = 1; -main_Image_1_in_30 = NULL; -main_Image_1_in_31 = -5; -main_Image_1_in_32 = NULL; -main_Image_1_in_33 = 1; -main_Image_1_in_34 = 0; -main_Image_1_in_35 = NULL; -main_Image_1_in_36 = 1; -main_Image_1_in_37 = {"clear", "black", "blue", "blue"}; -main_Image_1_in_38 = {"background", "grid", "ticks", "labels"}; -main_Image_1_in_39 = 0.65; -main_Image_1_in_40 = "roman_d"; -main_Image_1_in_41 = "panzoom"; -main_Image_1_in_42 = NULL; -main_Image_1_in_43 = NULL; -main_Image_1_in_44 = NULL; -main_Image_1_in_45 = NULL; -main_Image_1_in_46 = NULL; -main_Image_1_in_47 = NULL; -main_Image_1_in_48 = NULL; -main_Image_1_in_49 = NULL; -Executive("product version 4 4 4"); -$sync -main(); Deleted: trunk/octave-forge/extra/fpl/inst/FPL2coloredrubbersheet.net =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2coloredrubbersheet.net 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2coloredrubbersheet.net 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,619 +0,0 @@ -// -// time: Wed Jun 13 17:16:01 2007 -// -// version: 3.2.0 (format), 4.4.4 (DX) -// -// -// MODULE main -// workspace: width = 533, height = 507 -// layout: snap = 0, width = 50, height = 50, align = NN -// -macro main( -) -> ( -) { - // - // node FileSelector[1]: x = 51, y = 31, inputs = 0, label = FileSelector - // output[1]: visible = 1, type = 32, value = "__FILE__DX__" - // output[2]: visible = 1, type = 32, value = "__FILE__DX__" - // - // - // node Import[1]: x = 104, y = 118, inputs = 6, label = Import - // -main_Import_1_out_1 = - Import( - main_FileSelector_1_out_1, - main_Import_1_in_2, - main_Import_1_in_3, - main_Import_1_in_4, - main_Import_1_in_5, - main_Import_1_in_6 - ) [instance: 1, cache: 1]; - // - // node Post[1]: x = 249, y = 57, inputs = 2, label = Post - // input[2]: defaulting = 0, visible = 1, type = 32, value = "__DATA_DEPENDENCY__" - // -main_Post_1_out_1 = - Post( - main_Import_1_out_1, - main_Post_1_in_2 - ) [instance: 1, cache: 1]; - // - // node RubberSheet[1]: x = 228, y = 142, inputs = 4, label = RubberSheet - // -main_RubberSheet_1_out_1 = - RubberSheet( - main_Post_1_out_1, - main_RubberSheet_1_in_2, - main_RubberSheet_1_in_3, - main_RubberSheet_1_in_4 - ) [instance: 1, cache: 1]; - // - // node AutoColor[1]: x = 253, y = 283, inputs = 10, label = AutoColor - // -main_AutoColor_1_out_1, -main_AutoColor_1_out_2 = - AutoColor( - main_RubberSheet_1_out_1, - main_AutoColor_1_in_2, - main_AutoColor_1_in_3, - main_AutoColor_1_in_4, - main_AutoColor_1_in_5, - main_AutoColor_1_in_6, - main_AutoColor_1_in_7, - main_AutoColor_1_in_8, - main_AutoColor_1_in_9, - main_AutoColor_1_in_10 - ) [instance: 1, cache: 1]; - // - // node ShowConnections[1]: x = 49, y = 232, inputs = 1, label = ShowConnections - // -main_ShowConnections_1_out_1 = - ShowConnections( - main_RubberSheet_1_out_1 - ) [instance: 1, cache: 1]; - // - // node Color[1]: x = 72, y = 328, inputs = 5, label = Color - // input[2]: defaulting = 0, visible = 1, type = 32, value = "black" - // input[3]: defaulting = 0, visible = 1, type = 5, value = .5 - // -main_Color_1_out_1 = - Color( - main_ShowConnections_1_out_1, - main_Color_1_in_2, - main_Color_1_in_3, - main_Color_1_in_4, - main_Color_1_in_5 - ) [instance: 1, cache: 1]; - // - // node ColorBar[1]: x = 413, y = 290, inputs = 16, label = ColorBar - // input[9]: defaulting = 0, visible = 0, type = 16777248, value = {"black"} - // -main_ColorBar_1_out_1 = - ColorBar( - main_AutoColor_1_out_2, - main_ColorBar_1_in_2, - main_ColorBar_1_in_3, - main_ColorBar_1_in_4, - main_ColorBar_1_in_5, - main_ColorBar_1_in_6, - main_ColorBar_1_in_7, - main_ColorBar_1_in_8, - main_ColorBar_1_in_9, - main_ColorBar_1_in_10, - main_ColorBar_1_in_11, - main_ColorBar_1_in_12, - main_ColorBar_1_in_13, - main_ColorBar_1_in_14, - main_ColorBar_1_in_15, - main_ColorBar_1_in_16 - ) [instance: 1, cache: 1]; - // - // node Collect[1]: x = 280, y = 393, inputs = 3, label = Collect - // -main_Collect_1_out_1 = - Collect( - main_Color_1_out_1, - main_AutoColor_1_out_1, - main_ColorBar_1_out_1 - ) [instance: 1, cache: 1]; - // - // node Image[1]: x = 188, y = 445, inputs = 49, label = Image - // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1" - // input[4]: defaulting = 0, visible = 0, type = 1, value = 1 - // input[5]: defaulting = 0, visible = 0, type = 8, value = [0.466889 0.863877 0.166499] - // input[6]: defaulting = 0, visible = 0, type = 8, value = [0.466889 0.863877 4.74189] - // input[7]: defaulting = 0, visible = 0, type = 5, value = 1.01623 - // input[8]: defaulting = 0, visible = 0, type = 1, value = 1254 - // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.730064 - // input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0] - // input[11]: defaulting = 1, visible = 0, type = 5, value = 12.6739 - // input[12]: defaulting = 0, visible = 0, type = 1, value = 0 - // input[14]: defaulting = 0, visible = 0, type = 1, value = 1 - // input[15]: defaulting = 1, visible = 0, type = 32, value = "none" - // input[16]: defaulting = 1, visible = 0, type = 32, value = "none" - // input[17]: defaulting = 1, visible = 0, type = 1, value = 1 - // input[18]: defaulting = 1, visible = 0, type = 1, value = 1 - // input[19]: defaulting = 0, visible = 0, type = 1, value = 0 - // input[22]: defaulting = 0, visible = 0, type = 32, value = "snow" - // input[25]: defaulting = 0, visible = 0, type = 32, value = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/doping.tif" - // input[26]: defaulting = 0, visible = 0, type = 32, value = "tiff" - // input[29]: defaulting = 0, visible = 0, type = 3, value = 1 - // input[31]: defaulting = 0, visible = 0, type = 1, value = -5 - // input[33]: defaulting = 0, visible = 0, type = 3, value = 1 - // input[34]: defaulting = 0, visible = 0, type = 3, value = 0 - // input[36]: defaulting = 0, visible = 0, type = 3, value = 1 - // input[37]: defaulting = 0, visible = 0, type = 16777248, value = {"clear", "black", "blue", "blue"} - // input[38]: defaulting = 0, visible = 0, type = 16777248, value = {"background", "grid", "ticks", "labels"} - // input[39]: defaulting = 0, visible = 0, type = 5, value = 0.65 - // input[40]: defaulting = 0, visible = 0, type = 32, value = "roman_d" - // input[41]: defaulting = 0, visible = 0, type = 32, value = "panzoom" - // depth: value = 24 - // window: position = (0.0000,0.0283), size = 0.9906x0.9375 - // internal caching: 1 - // -main_Image_1_out_1, -main_Image_1_out_2, -main_Image_1_out_3 = - Image( - main_Image_1_in_1, - main_Collect_1_out_1, - main_Image_1_in_3, - main_Image_1_in_4, - main_Image_1_in_5, - main_Image_1_in_6, - main_Image_1_in_7, - main_Image_1_in_8, - main_Image_1_in_9, - main_Image_1_in_10, - main_Image_1_in_11, - main_Image_1_in_12, - main_Image_1_in_13, - main_Image_1_in_14, - main_Image_1_in_15, - main_Image_1_in_16, - main_Image_1_in_17, - main_Image_1_in_18, - main_Image_1_in_19, - main_Image_1_in_20, - main_Image_1_in_21, - main_Image_1_in_22, - main_Image_1_in_23, - main_Image_1_in_24, - main_Image_1_in_25, - main_Image_1_in_26, - main_Image_1_in_27, - main_Image_1_in_28, - main_Image_1_in_29, - main_Image_1_in_30, - main_Image_1_in_31, - main_Image_1_in_32, - main_Image_1_in_33, - main_Image_1_in_34, - main_Image_1_in_35, - main_Image_1_in_36, - main_Image_1_in_37, - main_Image_1_in_38, - main_Image_1_in_39, - main_Image_1_in_40, - main_Image_1_in_41, - main_Image_1_in_42, - main_Image_1_in_43, - main_Image_1_in_44, - main_Image_1_in_45, - main_Image_1_in_46, - main_Image_1_in_47, - main_Image_1_in_48, - main_Image_1_in_49 - ) [instance: 1, cache: 1]; -// network: end of macro body -CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2); -} -main_FileSelector_1_out_1 = "__FILE__DX__"; -main_Import_1_in_2 = NULL; -main_Import_1_in_3 = NULL; -main_Import_1_in_4 = NULL; -main_Import_1_in_5 = NULL; -main_Import_1_in_6 = NULL; -main_Import_1_out_1 = NULL; -main_Post_1_in_2 = "positions"; -main_Post_1_out_1 = NULL; -main_RubberSheet_1_in_2 = NULL; -main_RubberSheet_1_in_3 = NULL; -main_RubberSheet_1_in_4 = NULL; -main_RubberSheet_1_out_1 = NULL; -main_AutoColor_1_in_2 = NULL; -main_AutoColor_1_in_3 = NULL; -main_AutoColor_1_in_4 = NULL; -main_AutoColor_1_in_5 = NULL; -main_AutoColor_1_in_6 = NULL; -main_AutoColor_1_in_7 = NULL; -main_AutoColor_1_in_8 = NULL; -main_AutoColor_1_in_9 = NULL; -main_AutoColor_1_in_10 = NULL; -main_AutoColor_1_out_1 = NULL; -main_AutoColor_1_out_2 = NULL; -main_ShowConnections_1_out_1 = NULL; -main_Color_1_in_2 = "black"; -main_Color_1_in_3 = .5; -main_Color_1_in_4 = NULL; -main_Color_1_in_5 = NULL; -main_Color_1_out_1 = NULL; -main_ColorBar_1_in_2 = NULL; -main_ColorBar_1_in_3 = NULL; -main_ColorBar_1_in_4 = NULL; -main_ColorBar_1_in_5 = NULL; -main_ColorBar_1_in_6 = NULL; -main_ColorBar_1_in_7 = NULL; -main_ColorBar_1_in_8 = NULL; -main_ColorBar_1_in_9 = {"black"}; -main_ColorBar_1_in_10 = NULL; -main_ColorBar_1_in_11 = NULL; -main_ColorBar_1_in_12 = NULL; -main_ColorBar_1_in_13 = NULL; -main_ColorBar_1_in_14 = NULL; -main_ColorBar_1_in_15 = NULL; -main_ColorBar_1_in_16 = NULL; -main_ColorBar_1_out_1 = NULL; -main_Collect_1_out_1 = NULL; -macro Image( - id, - object, - where, - useVector, - to, - from, - width, - resolution, - aspect, - up, - viewAngle, - perspective, - options, - buttonState = 1, - buttonUpApprox = "none", - buttonDownApprox = "none", - buttonUpDensity = 1, - buttonDownDensity = 1, - renderMode = 0, - defaultCamera, - reset, - backgroundColor, - throttle, - RECenable = 0, - RECfile, - RECformat, - RECresolution, - RECaspect, - AAenable = 0, - AAlabels, - AAticks, - AAcorners, - AAframe, - AAadjust, - AAcursor, - AAgrid, - AAcolors, - AAannotation, - AAlabelscale, - AAfont, - interactionMode, - title, - AAxTickLocs, - AAyTickLocs, - AAzTickLocs, - AAxTickLabels, - AAyTickLabels, - AAzTickLabels, - webOptions) -> ( - object, - camera, - where) -{ - ImageMessage( - id, - backgroundColor, - throttle, - RECenable, - RECfile, - RECformat, - RECresolution, - RECaspect, - AAenable, - AAlabels, - AAticks, - AAcorners, - AAframe, - AAadjust, - AAcursor, - AAgrid, - AAcolors, - AAannotation, - AAlabelscale, - AAfont, - AAxTickLocs, - AAyTickLocs, - AAzTickLocs, - AAxTickLabels, - AAyTickLabels, - AAzTickLabels, - interactionMode, - title, - renderMode, - buttonUpApprox, - buttonDownApprox, - buttonUpDensity, - buttonDownDensity) [instance: 1, cache: 1]; - autoCamera = - AutoCamera( - object, - "front", - object, - resolution, - aspect, - [0,1,0], - perspective, - viewAngle, - backgroundColor) [instance: 1, cache: 1]; - realCamera = - Camera( - to, - from, - width, - resolution, - aspect, - up, - perspective, - viewAngle, - backgroundColor) [instance: 1, cache: 1]; - coloredDefaultCamera = - UpdateCamera(defaultCamera, - background=backgroundColor) [instance: 1, cache: 1]; - nullDefaultCamera = - Inquire(defaultCamera, - "is null + 1") [instance: 1, cache: 1]; - resetCamera = - Switch( - nullDefaultCamera, - coloredDefaultCamera, - autoCamera) [instance: 1, cache: 1]; - resetNull = - Inquire( - reset, - "is null + 1") [instance: 2, cache: 1]; - reset = - Switch( - resetNull, - reset, - 0) [instance: 2, cache: 1]; - whichCamera = - Compute( - "($0 != 0 || $1 == 0) ? 1 : 2", - reset, - useVector) [instance: 1, cache: 1]; - camera = Switch( - whichCamera, - resetCamera, - realCamera) [instance: 3, cache: 1]; - AAobject = - AutoAxes( - object, - camera, - AAlabels, - AAticks, - AAcorners, - AAframe, - AAadjust, - AAcursor, - AAgrid, - AAcolors, - AAannotation, - AAlabelscale, - AAfont, - AAxTickLocs, - AAyTickLocs, - AAzTickLocs, - AAxTickLabels, - AAyTickLabels, - AAzTickLabels) [instance: 1, cache: 1]; - switchAAenable = Compute("$0+1", - AAenable) [instance: 2, cache: 1]; - object = Switch( - switchAAenable, - object, - AAobject) [instance:4, cache: 1]; - SWapproximation_options = - Switch( - buttonState, - buttonUpApprox, - buttonDownApprox) [instance: 5, cache: 1]; - SWdensity_options = - Switch( - buttonState, - buttonUpDensity, - buttonDownDensity) [instance: 6, cache: 1]; - HWapproximation_options = - Format( - "%s,%s", - buttonDownApprox, - buttonUpApprox) [instance: 1, cache: 1]; - HWdensity_options = - Format( - "%d,%d", - buttonDownDensity, - buttonUpDensity) [instance: 2, cache: 1]; - switchRenderMode = Compute( - "$0+1", - renderMode) [instance: 3, cache: 1]; - approximation_options = Switch( - switchRenderMode, - SWapproximation_options, - HWapproximation_options) [instance: 7, cache: 1]; - density_options = Switch( - switchRenderMode, - SWdensity_options, - HWdensity_options) [instance: 8, cache: 1]; - renderModeString = Switch( - switchRenderMode, - "software", - "hardware")[instance: 9, cache: 1]; - object_tag = Inquire( - object, - "object tag")[instance: 3, cache: 1]; - annoted_object = - Options( - object, - "send boxes", - 0, - "cache", - 1, - "object tag", - object_tag, - "ddcamera", - whichCamera, - "rendering approximation", - approximation_options, - "render every", - density_options, - "button state", - buttonState, - "rendering mode", - renderModeString) [instance: 1, cache: 1]; - RECresNull = - Inquire( - RECresolution, - "is null + 1") [instance: 4, cache: 1]; - ImageResolution = - Inquire( - camera, - "camera resolution") [instance: 5, cache: 1]; - RECresolution = - Switch( - RECresNull, - RECresolution, - ImageResolution) [instance: 10, cache: 1]; - RECaspectNull = - Inquire( - RECaspect, - "is null + 1") [instance: 6, cache: 1]; - ImageAspect = - Inquire( - camera, - "camera aspect") [instance: 7, cache: 1]; - RECaspect = - Switch( - RECaspectNull, - RECaspect, - ImageAspect) [instance: 11, cache: 1]; - switchRECenable = Compute( - "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4", - RECenable, - switchRenderMode, - RECresolution, - ImageResolution, - RECaspect, - ImageAspect) [instance: 4, cache: 1]; - NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object); - Display( - NoRECobject, - camera, - where, - throttle) [instance: 1, cache: 1]; - image = - Render( - RECNoRerenderObject, - camera) [instance: 1, cache: 1]; - Display( - image, - NULL, - where, - throttle) [instance: 2, cache: 1]; - WriteImage( - image, - RECfile, - RECformat) [instance: 1, cache: 1]; - rec_where = Display( - RECNoRerHW, - camera, - where, - throttle) [instance: 1, cache: 0]; - rec_image = ReadImageWindow( - rec_where) [instance: 1, cache: 1]; - WriteImage( - rec_image, - RECfile, - RECformat) [instance: 1, cache: 1]; - RECupdateCamera = - UpdateCamera( - camera, - resolution=RECresolution, - aspect=RECaspect) [instance: 2, cache: 1]; - Display( - RECRerenderObject, - camera, - where, - throttle) [instance: 1, cache: 1]; - RECRerenderObject = - ScaleScreen( - RECRerenderObject, - NULL, - RECresolution, - camera) [instance: 1, cache: 1]; - image = - Render( - RECRerenderObject, - RECupdateCamera) [instance: 2, cache: 1]; - WriteImage( - image, - RECfile, - RECformat) [instance: 2, cache: 1]; -} -main_Image_1_in_1 = "Image_1"; -main_Image_1_in_3 = "X24,,"; -main_Image_1_in_4 = 1; -main_Image_1_in_5 = [0.466889 0.863877 0.166499]; -main_Image_1_in_6 = [0.466889 0.863877 4.74189]; -main_Image_1_in_7 = 1.01623; -main_Image_1_in_8 = 1254; -main_Image_1_in_9 = 0.730064; -main_Image_1_in_10 = [0 1 0]; -main_Image_1_in_11 = NULL; -main_Image_1_in_12 = 0; -main_Image_1_in_13 = NULL; -main_Image_1_in_14 = 1; -main_Image_1_in_15 = NULL; -main_Image_1_in_16 = NULL; -main_Image_1_in_17 = NULL; -main_Image_1_in_18 = NULL; -main_Image_1_in_19 = 0; -main_Image_1_in_20 = NULL; -main_Image_1_in_21 = NULL; -main_Image_1_in_22 = "snow"; -main_Image_1_in_23 = NULL; -main_Image_1_in_25 = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/doping.tif"; -main_Image_1_in_26 = "tiff"; -main_Image_1_in_27 = NULL; -main_Image_1_in_28 = NULL; -main_Image_1_in_29 = 1; -main_Image_1_in_30 = NULL; -main_Image_1_in_31 = -5; -main_Image_1_in_32 = NULL; -main_Image_1_in_33 = 1; -main_Image_1_in_34 = 0; -main_Image_1_in_35 = NULL; -main_Image_1_in_36 = 1; -main_Image_1_in_37 = {"clear", "black", "blue", "blue"}; -main_Image_1_in_38 = {"background", "grid", "ticks", "labels"}; -main_Image_1_in_39 = 0.65; -main_Image_1_in_40 = "roman_d"; -main_Image_1_in_41 = "panzoom"; -main_Image_1_in_42 = NULL; -main_Image_1_in_43 = NULL; -main_Image_1_in_44 = NULL; -main_Image_1_in_45 = NULL; -main_Image_1_in_46 = NULL; -main_Image_1_in_47 = NULL; -main_Image_1_in_48 = NULL; -main_Image_1_in_49 = NULL; -Executive("product version 4 4 4"); -$sync -main(); Deleted: trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,90 +0,0 @@ -## Copyright (C) 2004-2008 Carlo de Falco, Massimiliano Culpo -## -## This file is part of -## -## FPL - Fem PLotting package for octave -## -## FPL is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## FPL is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with FPL; If not, see <http://www.gnu.org/licenses/>. -## -## -## AUTHORS: -## Carlo de Falco <cdf _AT_ users.sourceforge.net> -## -## Culpo Massimiliano -## Bergische Universitaet Wuppertal -## Fachbereich C - Mathematik und Naturwissenschaften -## Arbeitsgruppe fuer Angewandte MathematD-42119 Wuppertal Gaussstr. 20 -## D-42119 Wuppertal, Germany - -## -*- texinfo -*- -## @deftypefn {Function File} {} FPL2dxappenddata ( @var{filename}, -## @var{p}, @var{t}, @var{u}, @var{attr_name}, @var{attr_rank}, -## @var{attr_shape}, @var{endflie} ) -## -## Apends data to a file in DX form. -## Only one variable can be written to the file -## variable must be a scalar, vector or tensor of doubles -## mesh data in the file must be consistent with this variable -## -## Variable must be a scalar, vector or tensor of doubles -## -## @itemize @minus -## @item @var{filename}= name of file to save (type string) -## @item @var{p}, @var{t} = mesh -## @item @var{u} = variable to save -## @item @var{attr_name} = name of the variable (type string) -## @item @var{attr_rank} = rank of variable data (0 for scalar, 1 for vector, etc.) -## @item @var{attr_shape} = number of components of variable data (assumed 1 for scalar) -## @item @var{endfile} = 0 if you want to add other variables to the -## same file, 1 otherwise -## @end itemize -## @end deftypefn - -function FPL2dxappenddata(filename,p,t,u,attr_name,attr_rank,attr_shape,endfile) - - p = p'; - t = t'; - t = t(:,1:3); - - fid=fopen (filename,'a'); - Nnodi = size(p,1); - Ntriangoli = size(t,1); - - fprintf(fid,'\nattribute "element type" string "triangles"\nattribute "ref" string "positions"\n\n'); - - if ((attr_rank==0) & (min(size(u))==1)) - fprintf(fid,'object "%s.data"\nclass array type double rank 0 items %d data follows',attr_name,Nnodi); - fprintf(fid,'\n %1.7e',u); - else - fprintf(fid,'object "%s.data"\nclass array type double rank %d shape %d items %d data follows', ... - attr_name,attr_rank,attr_shape,Nnodi); - for i=1:Nnodi - fprintf(fid,'\n'); - fprintf(fid,' %1.7e',u(i,:)); - endfor - endif - fprintf(fid,['\nattribute "dep" string "positions"\n\n' ... - 'object "%s" class field\n'... - 'component "positions" value "pos"\n'... - 'component "connections" value "con"\n'... - 'component "data" value "%s.data"\n'],... - attr_name,attr_name); - - if(endfile) - fprintf(fid,'\nend\n'); - endif - - fclose (fid); - -endfunction \ No newline at end of file Deleted: trunk/octave-forge/extra/fpl/inst/FPL2dxoutputdata.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2dxoutputdata.m 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2dxoutputdata.m 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,126 +0,0 @@ -## Copyright (C) 2004-2008,2009 Carlo de Falco, Massimiliano Culpo -## -## This file is part of -## -## FPL - Fem PLotting package for octave -## -## FPL is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## FPL is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with FPL; If not, see <http://www.gnu.org/licenses/>. -## -## -## AUTHORS: -## Carlo de Falco <cdf _AT_ users.sourceforge.net> -## -## Culpo Massimiliano -## Bergische Universitaet Wuppertal -## Fachbereich C - Mathematik und Naturwissenschaften -## Arbeitsgruppe fuer Angewandte MathematD-42119 Wuppertal Gaussstr. 20 -## D-42119 Wuppertal, Germany - -## -*- texinfo -*- -## @deftypefn {Function File} {} FPL2dxoutputdata ( @var{filename}, @ -## @var{p}, @var{t}, @var{u}, @var{attr_name}, @var{attr_rank}, @ -## @var{attr_shape}, @var{endfile} ) -## -## Outputs data in DX form. -## -## Variable must be a scalar, vector or tensor of doubles -## -## @itemize @minus -## @item @var{filename}= name of file to save (type string) -## @item @var{p}, @var{t} = mesh -## @item @var{u} = variable to save -## @item @var{attr_name} = name of the variable (type string) -## @item @var{attr_rank} = rank of variable data (0 for scalar, 1 for vector, etc.) -## @item @var{attr_shape} = number of components of variable data (assumed 1 for scalar) -## @item @var{endfile} = 0 if you want to add other variables to the -## same file, 1 otherwise -## @end itemize -## @end deftypefn - -function FPL2dxoutputdata(filename,p,t,u,attr_name,attr_rank,attr_shape,endfile) - - p = p'; - t = t'; - t = t(:,1:3); - - fid=fopen (filename,'w'); - Nnodi = size(p,1); - Ntriangoli = size(t,1); - Ndati = size(u,1); - - fprintf(fid,"object ""pos""\nclass array type float rank 1 shape 2 items %d data follows",Nnodi); - - for i=1:Nnodi - fprintf(fid,"\n"); - fprintf(fid," %1.7e",p(i,:)); - endfor - - if (min(min(t))==1) - t=t-1; - elseif(min(min(t))~=0) - disp('WARNING: check triangle structure') - endif - ## In DX format nodes are - ## numbered starting from zero, - ## instead we want to number - ## them starting from 1! - ## Here we restore the DX - ## format - - fprintf(fid,"\n\nobject ""con""\nclass array type int rank 1 shape 3 items %d data follows",Ntriangoli); - for i=1:Ntriangoli - fprintf(fid,"\n"); - fprintf(fid," %d",t(i,:)); - endfor - - fprintf(fid,"\nattribute ""element type"" string ""triangles""\nattribute ""ref"" string ""positions""\n\n"); - - if ((attr_rank==0) && (min(size(u))==1)) - fprintf(fid,"object ""%s.data""\nclass array type double rank 0 items %d data follows",attr_name,Ndati); - fprintf(fid,"\n %1.7e",u); - - else - fprintf(fid,"object ""%s.data""\nclass array type double rank %d shape %d items %d data follows", ... - attr_name,attr_rank,attr_shape,Ndati); - for i=1:Ndati - fprintf(fid,"\n"); - fprintf(fid," %1.7e",u(i,:)); - endfor - - endif - - if Ndati==Nnodi - fprintf(fid,["\nattribute ""dep"" string ""positions""\n\n" ... - "object ""%s"" class field\n"... - "component ""positions"" value ""pos""\n"... - "component ""connections"" value ""con""\n"... - "component ""data"" value ""%s.data""\n"],... - attr_name,attr_name); - elseif Ndati==Ntriangoli - fprintf(fid,["\nattribute ""dep"" string ""connections""\n\n" ... - "object ""%s"" class field\n"... - "component ""positions"" value ""pos""\n"... - "component ""connections"" value ""con""\n"... - "component ""data"" value ""%s.data""\n"],... - attr_name,attr_name); - endif - - if(endfile) - fprintf(fid,"\nend\n"); - endif - - fclose (fid); - - -endfunction \ No newline at end of file Deleted: trunk/octave-forge/extra/fpl/inst/FPL2dxoutputtimeseries.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2dxoutputtimeseries.m 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2dxoutputtimeseries.m 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,71 +0,0 @@ -## Copyright (C) 2004-2008 Carlo de Falco, Massimiliano Culpo -## -## This file is part of -## -## FPL - Fem PLotting package for octave -## -## FPL is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## FPL is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with FPL; If not, see <http://www.gnu.org/licenses/>. -## -## -## AUTHORS: -## Carlo de Falco <cdf _AT_ users.sourceforge.net> -## -## Culpo Massimiliano -## Bergische Universitaet Wuppertal -## Fachbereich C - Mathematik und Naturwissenschaften -## Arbeitsgruppe fuer Angewandte MathematD-42119 Wuppertal Gaussstr. 20 -## D-42119 Wuppertal, Germany - -## -*- texinfo -*- -## @deftypefn {Function File} {} FPL2dxoutputtimeseries ( @var{filename}, @var{p}, @var{t}, @var{u}, @var{attr_name}, @var{attr_rank}, @var{attr_shape}, @var{time} ) -## -## Outputs a time series in DX form. -## variable must be a scalar, vector or tensor of doubles -## @itemize @minus -## @item @var{filename}= name of file to save (type string) -## @item @var{p}, @var{t} = mesh -## @item @var{u} = variable to save -## @item @var{attr_name} = name of the variable (type string) -## @item @var{attr_rank} = rank of variable data (0 for scalar, 1 for vector, etc.) -## @item @var{attr_shape} = number of components of variable data (assumed 1 for scalar) -## @item @var{time} = time instants -## @end itemize -## @end deftypefn - -function FPL2dxoutputtimeseries(filename,p,t,u,attr_name,attr_rank,attr_shape,time) - - Nsteps = length(time); - if (Nsteps<=1) - endfile = 1; - else - endfile = 0; - endif - - FPL2dxoutputdata(filename,p,t,u(:,1:attr_shape),[attr_name "1"],attr_rank,attr_shape,endfile); - - for it = 2:Nsteps - FPL2dxappenddata(filename,p,t,u(:,[1:attr_shape]+attr_shape*(it-1)),... - [attr_name num2str(it)],attr_rank,attr_shape,endfile); - endfor - - fid=fopen(filename,"a"); - - fprintf (fid, "object \"%s_series\" class series\n",attr_name); - for it = 1:Nsteps - fprintf (fid,"member %d position %g value \"%s\"\n",it-1,time(it),[attr_name num2str(it)]); - endfor - fprintf (fid, "\nend\n"); - fclose(fid); - -endfunction \ No newline at end of file Deleted: trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.m 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.m 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,92 +0,0 @@ -## Copyright (C) 2004-2008 Carlo de Falco, Massimiliano Culpo -## -## This file is part of -## -## FPL - Fem PLotting package for octave -## -## FPL is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## FPL is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with FPL; If not, see <http://www.gnu.org/licenses/>. -## -## -## AUTHORS: -## Carlo de Falco <cdf _AT_ users.sourceforge.net> -## -## Culpo Massimiliano -## Bergische Universitaet Wuppertal -## Fachbereich C - Mathematik und Naturwissenschaften -## Arbeitsgruppe fuer Angewandte MathematD-42119 Wuppertal Gaussstr. 20 -## D-42119 Wuppertal, Germany - -## -*- texinfo -*- -## @deftypefn {Function File} {} FPL2pdequiver (@var{mesh}, @ -## @var{vx}, @var{vy}, [ @var{property}, @var{value} ...]) -## -## Plots the 2D vector field @var{vx}, @var{vy} -## defined on the triangulation @var{mesh} using opendx. -## -## Options (default values): -## @var{sample_density} (100) -## -## @seealso{FPL2pdesurf, FPL2ptcsurf, FPL2ptcquiver} -## @end deftypefn - -function FPL2pdequiver(mesh,vecfieldx,vecfieldy,varargin); - - sample_density = "100"; - - if( (nargin >= 3) && (rem(nargin,2)==1) ) - for ii=1:2:length(varargin) - [ varargin{ii} " = " varargin{ii+1} ";" ] - eval([ varargin{ii} " = """ varargin{ii+1} """;" ]); - endfor - else - error(["wrong number of parameters " num2str (nargin)]) - endif - - JX = sum(vecfieldx,1)'/3; - JY = sum(vecfieldy,1)'/3; - - dataname = mktemp("/tmp",".dx"); - scriptname = mktemp("/tmp",".net"); - - FPL2dxoutputdata(dataname,mesh.p,mesh.t,[ JX JY],'J',1,2,1); - - showmesh = file_in_path(path,"FPL2pdequiver.net"); - - system (["cp " showmesh " " scriptname]); - system (["sed -i \'s|__FILE__DX__|" dataname "|g\' " scriptname]); - system (["sed -i \'s|__SAMPLE__DENSITY__|" sample_density "|g\' " scriptname]); - - command = ["dx -noConfirmedQuit -program " scriptname " -execute -image >& /dev/null & "]; - - system(command); - - -endfunction - -function filename = mktemp (direct,ext); - - if (~exist(direct,"dir")) - error("trying to save temporary file to non existing directory") - endif - - done=false; - - while ~done - filename = [direct,"/FPL.",num2str(floor(rand*1e7)),ext]; - if ~exist(filename,"file") - done =true; - endif - endwhile - -endfunction Deleted: trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.net =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.net 2012-08-04 19:47:21 UTC (rev 10820) +++ trunk/octave-forge/extra/fpl/inst/FPL2pdequiver.net 2012-08-04 20:59:31 UTC (rev 10821) @@ -1,613 +0,0 @@ -// -// time: Fri Jun 15 19:24:56 2007 -// -// version: 3.2.0 (format), 4.4.4 (DX) -// -// -// MODULE main -// workspace: width = 481, height = 614 -// layout: snap = 0, width = 50, height = 50, align = NN -// -macro main( -) -> ( -) { - // - // node FileSelector[1]: x = 173, y = 81, inputs = 0, label = FileSelector - // output[1]: visible = 1, type = 32, value = "__FILE__DX__" - // output[2]: visible = 1, type = 32, value = "__FILE__DX__" - // - // - // node Import[1]: x = 203, y = 177, inputs = 6, label = Import - // -main_Import_1_out_1 = - Import( - main_FileSelector_1_out_1, - main_Import_1_in_2, - main_Import_1_in_3, - main_Import_1_in_4, - main_Import_1_in_5, - main_Import_1_in_6 - ) [instance: 1, cache: 1]; - // - // node Sample[1]: x = 89, y = 238, inputs = 2, label = Sample - // input[2]: defaulting = 0, visible = 1, type = 1, value = __SAMPLE__DENSITY__ - // -main_Sample_1_out_1 = - Sample( - main_Import_1_out_1, - main_Sample_1_in_2 - ) [instance: 1, cache: 1]; - // - // node AutoGlyph[1]: x = 64, y = 323, inputs = 7, label = AutoGlyph - // -main_AutoGlyph_1_out_1 = - AutoGlyph( - main_Sample_1_out_1, - main_AutoGlyph_1_in_2, - main_AutoGlyph_1_in_3, - main_AutoGlyph_1_in_4, - main_AutoGlyph_1_in_5, - main_AutoGlyph_1_in_6, - main_AutoGlyph_1_in_7 - ) [instance: 1, cache: 1]; - // - // node AutoColor[1]: x = 76, y = 415, inputs = 10, label = AutoColor - // -main_AutoColor_1_out_1, -main_AutoColor_1_out_2 = - AutoColor( - main_AutoGlyph_1_out_1, - main_AutoColor_1_in_2, - main_AutoColor_1_in_3, - main_AutoColor_1_in_4, - main_AutoColor_1_in_5, - main_AutoColor_1_in_6, - main_AutoColor_1_in_7, - main_AutoColor_1_in_8, - main_AutoColor_1_in_9, - main_AutoColor_1_in_10 - ) [instance: 1, cache: 1]; - // - // node ColorBar[1]: x = 238, y = 367, inputs = 16, label = ColorBar - // -main_ColorBar_1_out_1 = - ColorBar( - main_AutoColor_1_out_2, - main_ColorBar_1_in_2, - main_ColorBar_1_in_3, - main_ColorBar_1_in_4, - main_ColorBar_1_in_5, - main_ColorBar_1_in_6, - main_ColorBar_1_in_7, - main_ColorBar_1_in_8, - main_ColorBar_1_in_9, - main_ColorBar_1_in_10, - main_ColorBar_1_in_11, - main_ColorBar_1_in_12, - main_ColorBar_1_in_13, - main_ColorBar_1_in_14, - main_ColorBar_1_in_15, - main_ColorBar_1_in_16 - ) [instance: 1, cache: 1]; - // - // node ShowConnections[1]: x = 348, y = 295, inputs = 1, label = ShowConnections - // -main_ShowConnections_1_ou... [truncated message content] |
From: <cd...@us...> - 2012-08-04 19:47:27
|
Revision: 10820 http://octave.svn.sourceforge.net/octave/?rev=10820&view=rev Author: cdf Date: 2012-08-04 19:47:21 +0000 (Sat, 04 Aug 2012) Log Message: ----------- add makefile Added Paths: ----------- trunk/octave-forge/extra/fpl/src/Makefile Added: trunk/octave-forge/extra/fpl/src/Makefile =================================================================== --- trunk/octave-forge/extra/fpl/src/Makefile (rev 0) +++ trunk/octave-forge/extra/fpl/src/Makefile 2012-08-04 19:47:21 UTC (rev 10820) @@ -0,0 +1,9 @@ +OCTFILES := array_to_uint8.oct + +all: $(OCTFILES) + +%.oct: %.cc + mkoctfile $< + +clean: + -rm -f *.o core octave-core *.oct *~ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cd...@us...> - 2012-08-04 19:31:09
|
Revision: 10819 http://octave.svn.sourceforge.net/octave/?rev=10819&view=rev Author: cdf Date: 2012-08-04 19:31:01 +0000 (Sat, 04 Aug 2012) Log Message: ----------- base64 encoded binary vtk files Modified Paths: -------------- trunk/octave-forge/extra/fpl/inst/fpl_vtk_write_field.m Added Paths: ----------- trunk/octave-forge/extra/fpl/inst/fpl_vtk_b64_write_field.m Added: trunk/octave-forge/extra/fpl/inst/fpl_vtk_b64_write_field.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/fpl_vtk_b64_write_field.m (rev 0) +++ trunk/octave-forge/extra/fpl/inst/fpl_vtk_b64_write_field.m 2012-08-04 19:31:01 UTC (rev 10819) @@ -0,0 +1,234 @@ +## Copyright (C) 2012 Carlo de Falco +## Copyright (C) 2008,2009,2010 Massimiliano Culpo +## +## This file is part of: +## FPL - Fem PLotting package for octave +## +## FPL is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## FPL is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with FPL; If not, see <http://www.gnu.org/licenses/>. +## +## author: Carlo de Falco <cdf _AT_ users.sourceforge.net> +## author: Massimiliano Culpo <culpo _AT_ users.sourceforge.net> + +## -*- texinfo -*- +## @deftypefn {Function File} {} fpl_vtk_b64_write_field (@var{basename}, @ +## @var{mesh}, @var{nodedata}, @var{celldata}) +## +## Output data field in binary serial XML-VTK UnstructuredGrid format. +## +## @var{basename} is a string containing the base-name of the (vtu) file +## where the data will be saved. +## +## @var{mesh} is a PDE-tool like mesh, like the ones generated by the +## "msh" package. +## +## @var{nodedata} and @var{celldata} are (Ndata x 2) cell arrays containing +## respectively <PointData> and <CellData> representing scalars or +## vectors: +## @itemize @minus +## @item @var{*data}@{:,1@} = variable data; +## @item @var{*data}@{:,2@} = variable names; +## @end itemize +## +## +## Example: +## @example +## %% generate msh1, node centered field nc1, cell centered field cc1 +## fpl_vtk_b64_write_field ("example", msh1, @{nc1, "temperature"@}, @{cc1, "density"@}); +## %% generate msh2, node centered field nc2 +## fpl_vtk_b64_write_field ("example", msh2, @{nc2, "temperature"@}, @{@}); +## @end example +## +## The difference between @code{fpl_vtk_write_field} and @code{fpl_vtk_b64_write_field} +## is that the former saves data in ASCII format while the former uses base64-encoded +## binary format. +## +## @seealso{fpl_dx_write_field, fpl_dx_write_series, @ +## fpl_vtk_assemble_series, fpl_vtk_write_field} +## +## @end deftypefn + +function fpl_vtk_b64_write_field (basename, mesh, nodedata, celldata, endfile) + + ## Check input + if (nargin != 4) + print_usage (); + endif + + if (! ischar (basename)) + error ("fpl_vtk_b64_write_field: basename should be a string"); + elseif (! isstruct (mesh)) + error ("fpl_vtk_b64_write_field: mesh should be a struct"); + elseif (! (iscell (nodedata) && iscell (celldata))) + error ("fpl_vtk_b64_write_field: nodedata and celldata should be cell arrays"); + endif + + filename = [basename ".vtu"]; + + if (! exist (filename, "file")) + fid = fopen (filename, "w"); + + ## Format + fprintf (fid, "<?xml version=""1.0""?>\n"); + + ## Start file + fprintf (fid, "<VTKFile type=""UnstructuredGrid"" version=""0.1"" byte_order=""LittleEndian"">\n"); + + ## Start Header + fprintf (fid, " <UnstructuredGrid>\n"); + else + error ("fpl_vtk_b64_write_field: file %s exists", filename); + endif + + offset = 0; + data = ""; + + p = mesh.p; + dim = rows (p); # 2D or 3D + + if dim == 2 + t = mesh.t (1:3,:); + elseif dim == 3 + t = mesh.t (1:4,:); + else + error ("fpl_vtk_b64_write_field: neither 2D triangle nor 3D tetrahedral mesh"); + endif + + t -= 1; + + nnodes = columns (p); + nelems = columns (t); + + ## Piece + fprintf (fid, " <Piece NumberOfPoints=""%d"" NumberOfCells=""%d"">\n", nnodes, nelems); + + ## Encode data-sets + [data, offset] = print_data_points (fid, nodedata, nnodes, data, offset); + [data, offset] = print_cell_data (fid, celldata, nelems, data, offset); + + ## Encode mesh + [data, offset] = print_grid (fid, dim, p, nnodes, t, nelems, data, offset); + + ## End Piece + fprintf (fid, " </Piece>\n"); + + ## End Header + fprintf (fid, " </UnstructuredGrid>\n"); + + ## Write data + fprintf (fid, " <AppendedData encoding=""base64"">\n"); + fprintf (fid, "_%s\n", data); + fprintf (fid, " </AppendedData>>\n"); + + ## End file + fprintf (fid, "</VTKFile>"); + fclose (fid); + +endfunction + +## Print Points and Cells Data +function [data, offset] = print_grid (fid, dim, p, nnodes, t, nelems, data, offset) + + if dim == 2 + p = [p; zeros(1,nnodes)]; + eltype = 5; + else + eltype = 10; + endif + + ## VTK-Points (mesh nodes) + fprintf (fid, " <Points>\n"); + fprintf (fid, " <DataArray type=""Float64"" Name=""Array"" NumberOfComponents=""3"" format=""appended"" offset=""%d"" />\n", offset); + newdata = array_to_uint8(p)(:); + data = [data, base64_encode([array_to_uint8(int32 (numel (newdata)))(:); newdata])]; + offset = numel (data); + + fprintf (fid, " </Points>\n"); + + ## VTK-Cells (mesh elements) + fprintf (fid, " <Cells>\n"); + fprintf (fid, " <DataArray type=""Int32"" Name=""connectivity"" format=""appended"" offset=""%d"" />\n", offset); + newdata = array_to_uint8(int32 (t))(:); + data = [data, base64_encode([array_to_uint8(int32 (numel (newdata)))(:); newdata])]; + offset = numel (data); + + fprintf (fid, " <DataArray type=""Int32"" Name=""offsets"" format=""appended"" offset=""%d"" />\n", offset); + tmp = (dim+1):(dim+1):((dim+1)*nelems); + newdata = array_to_uint8(int32 (tmp))(:); + data = [data, base64_encode([array_to_uint8(int32 (numel (newdata)))(:); newdata])]; + offset = numel (data); + + fprintf (fid, " <DataArray type=""UInt8"" Name=""types"" format=""appended"" offset=""%d"" />\n", offset); + tmp = eltype*ones(nelems,1); + newdata = array_to_uint8(uint8 (tmp))(:); + data = [data, base64_encode([array_to_uint8(int32 (numel (newdata)))(:); newdata])]; + offset = numel (data); + + fprintf (fid, " </Cells>\n"); + +endfunction + +## Print DataPoints +function [data, offset] = print_data_points (fid, nodedata, nnodes, data, offset) + + ## # of data to print in + ## <PointData> field + nvdata = size (nodedata, 1); + + if (nvdata) + fprintf (fid, " <PointData>\n"); + for ii = 1:nvdata + ndata = nodedata{ii,1}; + ndataname = nodedata{ii,2}; + nsamples = rows (ndata); + ncomp = columns (ndata); + if (nsamples != nnodes) + error ("fpl_vtk_b64_write_field: wrong number of samples in <PointData> ""%s""", ndataname); + endif + fprintf (fid, " <DataArray type=""Float64"" Name=""%s"" ", ndataname); + fprintf (fid, "NumberOfComponents=""%d"" format=""appended"" offset=""%d"" />\n", ncomp, offset); + newdata = array_to_uint8(ndata.')(:); + data = [data, base64_encode([array_to_uint8(int32 (numel (newdata)))(:); newdata])]; + offset = numel (data); + endfor + fprintf (fid, " </PointData>\n"); + endif + +endfunction + +function [data, offset] = print_cell_data (fid, celldata, nelems, data, offset) + + ## # of data to print in + ## <CellData> field + nvdata = size (celldata, 1); + + if (nvdata) + fprintf (fid, "<CellData>\n"); + for ii = 1:nvdata + cdata = celldata{ii,1}; + cdataname = celldata{ii,2}; + nsamples = rows (cdata); + ncomp = columns (cdata); + if nsamples != nelems + error ("fpl_vtk_b64_write_field: wrong number of samples in <CellData> ""%s""", cdataname); + endif + fprintf (fid, " <DataArray type=""Float64"" Name=""%s"" ", cdataname); + fprintf (fid, "NumberOfComponents=""%d"" format=""appended"" offset=""%d"" />\n", ncomp, offset); + newdata = array_to_uint8(cdata.')(:); + data = [data, base64_encode([array_to_uint8(int32 (numel (newdata)))(:); newdata])]; + offset = numel (data); + endfor + fprintf (fid, " </CellData>\n"); + endif + +endfunction \ No newline at end of file Modified: trunk/octave-forge/extra/fpl/inst/fpl_vtk_write_field.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/fpl_vtk_write_field.m 2012-08-04 18:10:11 UTC (rev 10818) +++ trunk/octave-forge/extra/fpl/inst/fpl_vtk_write_field.m 2012-08-04 19:31:01 UTC (rev 10819) @@ -187,12 +187,12 @@ if (nsamples != nnodes) error ("fpl_vtk_write_field: wrong number of samples in <PointData> ""%s""", dataname); endif - fprintf (fid, "<DataArray type=""Float32"" Name=""%s"" ", dataname); + fprintf (fid, "<DataArray type=""Float64"" Name=""%s"" ", dataname); fprintf (fid, "NumberOfComponents=""%d"" format=""ascii"">\n", ncomp); - for jj = 1:nsamples - fprintf (fid, "%g ", data(jj,:)); +% for jj = 1:nsamples + fprintf (fid, "%g ", data); fprintf (fid, "\n"); - endfor +% endfor fprintf (fid, "</DataArray>\n"); endfor fprintf (fid, "</PointData>\n"); @@ -216,12 +216,12 @@ if nsamples != nelems error ("fpl_vtk_write_field: wrong number of samples in <CellData> ""%s""", dataname); endif - fprintf (fid, "<DataArray type=""Float32"" Name=""%s"" ", dataname); + fprintf (fid, "<DataArray type=""Float64"" Name=""%s"" ", dataname); fprintf (fid, "NumberOfComponents=""%d"" format=""ascii"">\n", ncomp); - for jj = 1:nsamples +% for jj = 1:nsamples fprintf (fid, "%g ", data(jj,:)); fprintf (fid, "\n"); - endfor +% endfor fprintf (fid, "</DataArray>\n"); endfor fprintf (fid, "</CellData>\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-04 18:10:17
|
Revision: 10818 http://octave.svn.sourceforge.net/octave/?rev=10818&view=rev Author: paramaniac Date: 2012-08-04 18:10:11 +0000 (Sat, 04 Aug 2012) Log Message: ----------- control-devel: copy-paste docstrings Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/moesp.m trunk/octave-forge/extra/control-devel/inst/n4sid.m trunk/octave-forge/extra/control-devel/inst/test_devel.m Modified: trunk/octave-forge/extra/control-devel/inst/moesp.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/moesp.m 2012-08-04 13:50:51 UTC (rev 10817) +++ trunk/octave-forge/extra/control-devel/inst/moesp.m 2012-08-04 18:10:11 UTC (rev 10818) @@ -22,6 +22,205 @@ ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} moesp (@var{dat}, @var{n}, @var{opt}, @dots{}) ## Estimate state-space model using @acronym{MOESP} algorithm. ## @acronym{MOESP}: Multivariable Output Error State sPace. +## If no output arguments are given, the singular values are +## plotted on the screen in order to estimate the system order. +## +## @strong{Inputs} +## @table @var +## @item dat +## iddata set containing the measurements, i.e. time-domain signals. +## @item n +## The desired order of the resulting state-space system @var{sys}. +## If not specified, @var{n} is chosen automatically according +## to the singular values and tolerances. +## @item @dots{} +## Optional pairs of keys and values. @code{'key1', value1, 'key2', value2}. +## @item opt +## Optional struct with keys as field names. +## Struct @var{opt} can be created directly or +## by command @command{options}. @code{opt.key1 = value1, opt.key2 = value2}. +## @end table +## +## +## @strong{Outputs} +## @table @var +## @item sys +## Discrete-time state-space model. +## @item x0 +## Initial state vector. If @var{dat} is a multi-experiment dataset, +## @var{x0} becomes a cell vector containing an initial state vector +## for each experiment. +## @item info +## Struct containing additional information. +## @table @var +## @item info.K +## Kalman gain matrix. +## @item info.Q +## State covariance matrix. +## @item info.Ry +## Output covariance matrix. +## @item info.S +## State-output cross-covariance matrix. +## @item info.L +## Noise variance matrix factor. LL'=Ry. +## @end table +## @end table +## +## +## +## @strong{Option Keys and Values} +## @table @var +## @item 'n' +## The desired order of the resulting state-space system @var{sys}. +## @var{s} > @var{n} > 0. +## +## @item 's' +## The number of block rows @var{s} in the input and output +## block Hankel matrices to be processed. @var{s} > 0. +## In the MOESP theory, @var{s} should be larger than @var{n}, +## the estimated dimension of state vector. +## +## @item 'alg', 'algorithm' +## Specifies the algorithm for computing the triangular +## factor R, as follows: +## @table @var +## @item 'C' +## Cholesky algorithm applied to the correlation +## matrix of the input-output data. Default method. +## @item 'F' +## Fast QR algorithm. +## @item 'Q' +## QR algorithm applied to the concatenated block +## Hankel matrices. +## @end table +## +## @item 'tol' +## Absolute tolerance used for determining an estimate of +## the system order. If @var{tol} >= 0, the estimate is +## indicated by the index of the last singular value greater +## than or equal to @var{tol}. (Singular values less than @var{tol} +## are considered as zero.) When @var{tol} = 0, an internally +## computed default value, @var{tol} = @var{s}*@var{eps}*SV(1), is used, +## where SV(1) is the maximal singular value, and @var{eps} is +## the relative machine precision. +## When @var{tol} < 0, the estimate is indicated by the +## index of the singular value that has the largest +## logarithmic gap to its successor. Default value is 0. +## +## @item 'rcond' +## The tolerance to be used for estimating the rank of +## matrices. If the user sets @var{rcond} > 0, the given value +## of @var{rcond} is used as a lower bound for the reciprocal +## condition number; an m-by-n matrix whose estimated +## condition number is less than 1/@var{rcond} is considered to +## be of full rank. If the user sets @var{rcond} <= 0, then an +## implicitly computed, default tolerance, defined by +## @var{rcond} = m*n*@var{eps}, is used instead, where @var{eps} is the +## relative machine precision. Default value is 0. +## +## @item 'confirm' +## Specifies whether or not the user's confirmation of the +## system order estimate is desired, as follows: +## @table @var +## @item true +## User's confirmation. +## @item false +## No confirmation. Default value. +## @end table +## +## @item 'noise' +## The desired type of noise input channels. +## @table @var +## @item 'n' +## No error inputs. Default value. +## @iftex +## @tex +## $$ x_{k+1} = A x_k + B u_k $$ +## $$ y_k = C x_k + D u_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## x[k+1] = A x[k] + B u[k] +## y[k] = C x[k] + D u[k] +## @end example +## @end ifnottex +## +## @item 'e' +## Return @var{sys} as a (p-by-m+p) state-space model with +## both measured input channels u and noise channels e +## with covariance matrix @var{Ry}. +## @iftex +## @tex +## $$ x_{k+1} = A x_k + B u_k + K e_k $$ +## $$ y_k = C x_k + D u_k + e_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## x[k+1] = A x[k] + B u[k] + K e[k] +## y[k] = C x[k] + D u[k] + e[k] +## @end example +## @end ifnottex +## +## @item 'v' +## Return @var{sys} as a (p-by-m+p) state-space model with +## both measured input channels u and white noise channels v +## with identity covariance matrix. +## @iftex +## @tex +## $$ x_{k+1} = A x_k + B u_k + K L v_k $$ +## $$ y_k = C x_k + D u_k + L v_k $$ +## $$ e = L v, \\ L L^T = R_y $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## x[k+1] = A x[k] + B u[k] + K L v[k] +## y[k] = C x[k] + D u[k] + L v[k] +## e = L v, L L' = Ry +## @end example +## @end ifnottex +## +## @item 'k' +## Return @var{sys} as a Kalman predictor for simulation. +## @iftex +## @tex +## $$ \\widehat{x}_{k+1} = A \\widehat{x}_k + B u_k + K (y_k - \\widehat{y}_k) $$ +## $$ \\widehat{y}_k = C \\widehat{x}_k + D u_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## ^ ^ ^ +## x[k+1] = A x[k] + B u[k] + K(y[k] - y[k]) +## ^ ^ +## y[k] = C x[k] + D u[k] +## @end example +## @end ifnottex +## +## @iftex +## @tex +## $$ \\widehat{x}_{k+1} = (A-KC) \\widehat{x}_k + (B-KD) u_k + K y_k $$ +## $$ \\widehat{y}_k = C \\widehat{x}_k + D u_k + 0 y_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## ^ ^ +## x[k+1] = (A-KC) x[k] + (B-KD) u[k] + K y[k] +## ^ ^ +## y[k] = C x[k] + D u[k] + 0 y[k] +## @end example +## @end ifnottex +## @end table +## @end table +## +## +## @strong{Algorithm}@* +## Uses SLICOT IB01AD, IB01BD and IB01CD by courtesy of +## @uref{http://www.slicot.org, NICONET e.V.} +## ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> Modified: trunk/octave-forge/extra/control-devel/inst/n4sid.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/n4sid.m 2012-08-04 13:50:51 UTC (rev 10817) +++ trunk/octave-forge/extra/control-devel/inst/n4sid.m 2012-08-04 18:10:11 UTC (rev 10818) @@ -22,6 +22,205 @@ ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} n4sid (@var{dat}, @var{n}, @var{opt}, @dots{}) ## Estimate state-space model using @acronym{N4SID} algorithm. ## @acronym{N4SID}: Numerical algorithm for Subspace State Space System IDentification. +## If no output arguments are given, the singular values are +## plotted on the screen in order to estimate the system order. +## +## @strong{Inputs} +## @table @var +## @item dat +## iddata set containing the measurements, i.e. time-domain signals. +## @item n +## The desired order of the resulting state-space system @var{sys}. +## If not specified, @var{n} is chosen automatically according +## to the singular values and tolerances. +## @item @dots{} +## Optional pairs of keys and values. @code{'key1', value1, 'key2', value2}. +## @item opt +## Optional struct with keys as field names. +## Struct @var{opt} can be created directly or +## by command @command{options}. @code{opt.key1 = value1, opt.key2 = value2}. +## @end table +## +## +## @strong{Outputs} +## @table @var +## @item sys +## Discrete-time state-space model. +## @item x0 +## Initial state vector. If @var{dat} is a multi-experiment dataset, +## @var{x0} becomes a cell vector containing an initial state vector +## for each experiment. +## @item info +## Struct containing additional information. +## @table @var +## @item info.K +## Kalman gain matrix. +## @item info.Q +## State covariance matrix. +## @item info.Ry +## Output covariance matrix. +## @item info.S +## State-output cross-covariance matrix. +## @item info.L +## Noise variance matrix factor. LL'=Ry. +## @end table +## @end table +## +## +## +## @strong{Option Keys and Values} +## @table @var +## @item 'n' +## The desired order of the resulting state-space system @var{sys}. +## @var{s} > @var{n} > 0. +## +## @item 's' +## The number of block rows @var{s} in the input and output +## block Hankel matrices to be processed. @var{s} > 0. +## In the MOESP theory, @var{s} should be larger than @var{n}, +## the estimated dimension of state vector. +## +## @item 'alg', 'algorithm' +## Specifies the algorithm for computing the triangular +## factor R, as follows: +## @table @var +## @item 'C' +## Cholesky algorithm applied to the correlation +## matrix of the input-output data. Default method. +## @item 'F' +## Fast QR algorithm. +## @item 'Q' +## QR algorithm applied to the concatenated block +## Hankel matrices. +## @end table +## +## @item 'tol' +## Absolute tolerance used for determining an estimate of +## the system order. If @var{tol} >= 0, the estimate is +## indicated by the index of the last singular value greater +## than or equal to @var{tol}. (Singular values less than @var{tol} +## are considered as zero.) When @var{tol} = 0, an internally +## computed default value, @var{tol} = @var{s}*@var{eps}*SV(1), is used, +## where SV(1) is the maximal singular value, and @var{eps} is +## the relative machine precision. +## When @var{tol} < 0, the estimate is indicated by the +## index of the singular value that has the largest +## logarithmic gap to its successor. Default value is 0. +## +## @item 'rcond' +## The tolerance to be used for estimating the rank of +## matrices. If the user sets @var{rcond} > 0, the given value +## of @var{rcond} is used as a lower bound for the reciprocal +## condition number; an m-by-n matrix whose estimated +## condition number is less than 1/@var{rcond} is considered to +## be of full rank. If the user sets @var{rcond} <= 0, then an +## implicitly computed, default tolerance, defined by +## @var{rcond} = m*n*@var{eps}, is used instead, where @var{eps} is the +## relative machine precision. Default value is 0. +## +## @item 'confirm' +## Specifies whether or not the user's confirmation of the +## system order estimate is desired, as follows: +## @table @var +## @item true +## User's confirmation. +## @item false +## No confirmation. Default value. +## @end table +## +## @item 'noise' +## The desired type of noise input channels. +## @table @var +## @item 'n' +## No error inputs. Default value. +## @iftex +## @tex +## $$ x_{k+1} = A x_k + B u_k $$ +## $$ y_k = C x_k + D u_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## x[k+1] = A x[k] + B u[k] +## y[k] = C x[k] + D u[k] +## @end example +## @end ifnottex +## +## @item 'e' +## Return @var{sys} as a (p-by-m+p) state-space model with +## both measured input channels u and noise channels e +## with covariance matrix @var{Ry}. +## @iftex +## @tex +## $$ x_{k+1} = A x_k + B u_k + K e_k $$ +## $$ y_k = C x_k + D u_k + e_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## x[k+1] = A x[k] + B u[k] + K e[k] +## y[k] = C x[k] + D u[k] + e[k] +## @end example +## @end ifnottex +## +## @item 'v' +## Return @var{sys} as a (p-by-m+p) state-space model with +## both measured input channels u and white noise channels v +## with identity covariance matrix. +## @iftex +## @tex +## $$ x_{k+1} = A x_k + B u_k + K L v_k $$ +## $$ y_k = C x_k + D u_k + L v_k $$ +## $$ e = L v, \\ L L^T = R_y $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## x[k+1] = A x[k] + B u[k] + K L v[k] +## y[k] = C x[k] + D u[k] + L v[k] +## e = L v, L L' = Ry +## @end example +## @end ifnottex +## +## @item 'k' +## Return @var{sys} as a Kalman predictor for simulation. +## @iftex +## @tex +## $$ \\widehat{x}_{k+1} = A \\widehat{x}_k + B u_k + K (y_k - \\widehat{y}_k) $$ +## $$ \\widehat{y}_k = C \\widehat{x}_k + D u_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## ^ ^ ^ +## x[k+1] = A x[k] + B u[k] + K(y[k] - y[k]) +## ^ ^ +## y[k] = C x[k] + D u[k] +## @end example +## @end ifnottex +## +## @iftex +## @tex +## $$ \\widehat{x}_{k+1} = (A-KC) \\widehat{x}_k + (B-KD) u_k + K y_k $$ +## $$ \\widehat{y}_k = C \\widehat{x}_k + D u_k + 0 y_k $$ +## @end tex +## @end iftex +## @ifnottex +## @example +## ^ ^ +## x[k+1] = (A-KC) x[k] + (B-KD) u[k] + K y[k] +## ^ ^ +## y[k] = C x[k] + D u[k] + 0 y[k] +## @end example +## @end ifnottex +## @end table +## @end table +## +## +## @strong{Algorithm}@* +## Uses SLICOT IB01AD, IB01BD and IB01CD by courtesy of +## @uref{http://www.slicot.org, NICONET e.V.} +## ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> Modified: trunk/octave-forge/extra/control-devel/inst/test_devel.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/test_devel.m 2012-08-04 13:50:51 UTC (rev 10817) +++ trunk/octave-forge/extra/control-devel/inst/test_devel.m 2012-08-04 18:10:11 UTC (rev 10818) @@ -1,3 +1,44 @@ +## Copyright (C) 2012 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Script File} {} test_devel +## Execute all available tests at once. +## The Octave control-devel package is based on the @uref{http://www.slicot.org, SLICOT} library. +## SLICOT needs a LAPACK library which is also a prerequisite for Octave itself. +## In case of failing test, it is highly recommended to use +## @uref{http://www.netlib.org/lapack/, Netlib's reference LAPACK} +## for building Octave. Using ATLAS may lead to sign changes +## in some entries in the state-space matrices. +## In general, these sign changes are not 'wrong' and can be regarded as +## the result of state transformations. Such state transformations +## (but not input/output transformations) have no influence on the +## input-output behaviour of the system. For better numerics, +## the control package uses such transformations by default when +## calculating the frequency responses and a few other things. +## However, arguments like the Hankel singular Values (HSV) must not change. +## Differing HSVs and failing algorithms are known for using Framework Accelerate +## from Mac OS X 10.7. +## @end deftypefn + +## Author: Lukas Reichlin <luk...@gm...> +## Created: May 2010 +## Version: 0.1 + ## identification test @iddata/iddata test @iddata/cat This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cd...@us...> - 2012-08-04 13:50:57
|
Revision: 10817 http://octave.svn.sourceforge.net/octave/?rev=10817&view=rev Author: cdf Date: 2012-08-04 13:50:51 +0000 (Sat, 04 Aug 2012) Log Message: ----------- binary data output Modified Paths: -------------- trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m Added Paths: ----------- trunk/octave-forge/extra/fpl/src/ trunk/octave-forge/extra/fpl/src/array_to_uint8.cc Modified: trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m =================================================================== --- trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m 2012-08-04 13:16:23 UTC (rev 10816) +++ trunk/octave-forge/extra/fpl/inst/FPL2dxappenddata.m 2012-08-04 13:50:51 UTC (rev 10817) @@ -63,7 +63,7 @@ fprintf(fid,'\nattribute "element type" string "triangles"\nattribute "ref" string "positions"\n\n'); - if ((attr_rank==0) && (min(size(u))==1)) + if ((attr_rank==0) & (min(size(u))==1)) fprintf(fid,'object "%s.data"\nclass array type double rank 0 items %d data follows',attr_name,Nnodi); fprintf(fid,'\n %1.7e',u); else Added: trunk/octave-forge/extra/fpl/src/array_to_uint8.cc =================================================================== --- trunk/octave-forge/extra/fpl/src/array_to_uint8.cc (rev 0) +++ trunk/octave-forge/extra/fpl/src/array_to_uint8.cc 2012-08-04 13:50:51 UTC (rev 10817) @@ -0,0 +1,110 @@ +/* +Copyright (C) 2012 Carlo de Falco + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +<http://www.gnu.org/licenses/>. + +Author: Carlo de Falco <carlo@guglielmo.local> +Created: 2012-08-04 + +*/ + +#include <octave/oct.h> + +DEFUN_DLD(array_to_uint8,args,nargout,"\ +undocumented internal function\n\ +") +{ + octave_value_list retval; + int nargin = args.length (); + + if (nargin != 1) + print_usage (); + else + { + uint8NDArray out; + + if (! args(0).is_numeric_type ()) + error ("array_to_uint8: encoding is supported only for numeric arrays"); + else if (args(0).is_complex_type () + || args(0).is_sparse_type ()) + error ("array_to_uint8: encoding complex or sparse data is not supported"); + else if (args(0).is_integer_type ()) + { + +#define MAKE_INT_BRANCH(X) \ + if (args(0).is_ ## X ## _type ()) \ + { \ + const X##NDArray in = \ + args(0). X## _array_value (); \ + octave_idx_type len = \ + in.numel () * sizeof (X## _t) / sizeof (uint8_t); \ + if (! error_state) \ + { \ + out.resize1 (len); \ + std::copy ((uint8_t*) in.data(), \ + ((uint8_t*) in.data()) + len, \ + out.fortran_vec ()); \ + retval(0) = octave_value (out); \ + } \ + } + + MAKE_INT_BRANCH(int8) + else MAKE_INT_BRANCH(int16) + else MAKE_INT_BRANCH(int32) + else MAKE_INT_BRANCH(int64) + else MAKE_INT_BRANCH(uint8) + else MAKE_INT_BRANCH(uint16) + else MAKE_INT_BRANCH(uint32) + else MAKE_INT_BRANCH(uint64) + +#undef MAKE_INT_BRANCH + + else + panic_impossible (); + } + else if (args(0).is_single_type ()) + { + const FloatNDArray in = + args(0).float_array_value (); + octave_idx_type len = + in.numel () * sizeof (float) / sizeof (uint8_t); + if (! error_state) + { + out.resize1 (len); + std::copy ((uint8_t*) in.data(), + ((uint8_t*) in.data()) + len, + out.fortran_vec ()); + retval(0) = octave_value (out); + } + } + else + { + const Array<double> in = args(0).array_value (); + + octave_idx_type len = + in.numel () * sizeof (double) / sizeof (uint8_t); + + if (! error_state) + { + out.resize1 (len); + std::copy ((uint8_t*) in.data(), + ((uint8_t*) in.data()) + len, + out.fortran_vec ()); + retval(0) = octave_value (out); + } + } + } + return retval; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-04 13:16:29
|
Revision: 10816 http://octave.svn.sourceforge.net/octave/?rev=10816&view=rev Author: paramaniac Date: 2012-08-04 13:16:23 +0000 (Sat, 04 Aug 2012) Log Message: ----------- control-devel: doc fix Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/get.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/get.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/get.m 2012-08-04 13:10:26 UTC (rev 10815) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/get.m 2012-08-04 13:16:23 UTC (rev 10816) @@ -18,6 +18,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} get (@var{dat}) ## @deftypefnx {Function File} {@var{value} =} get (@var{dat}, @var{"property"}) +## @deftypefnx {Function File} {[@var{val1}, @var{val2}, @dots{}] =} get (@var{dat}, @var{"prop1"}, @var{"prop2"}, @dots{}) ## Access property values of iddata objects. ## Type @command{get(dat)} to display a list of available properties. ## @end deftypefn This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-04 13:10:32
|
Revision: 10815 http://octave.svn.sourceforge.net/octave/?rev=10815&view=rev Author: paramaniac Date: 2012-08-04 13:10:26 +0000 (Sat, 04 Aug 2012) Log Message: ----------- control-devel: finish resample method Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/resample.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/resample.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/resample.m 2012-08-04 12:18:37 UTC (rev 10814) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/resample.m 2012-08-04 13:10:26 UTC (rev 10815) @@ -18,8 +18,27 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{dat} =} resample (@var{dat}, @var{p}, @var{q}) ## @deftypefnx {Function File} {@var{dat} =} resample (@var{dat}, @var{p}, @var{q}, @var{n}) -## Return @var{k}-th difference of outputs and inputs of dataset @var{dat}. -## If @var{k} is not specified, default value 1 is taken. +## @deftypefnx {Function File} {@var{dat} =} resample (@var{dat}, @var{p}, @var{q}, @var{h}) +## Change the sample rate of the output and input signals in dataset @var{dat} +## by a factor of @code{p/q}. This is performed using a polyphase algorithm. +## The anti-aliasing @acronym{FIR} filter can be specified as follows: +## Either by order @var{n} (scalar) with default value 0. The band edges +## are then chosen automatically. Or by impulse response @var{h} (vector). +## Requires the signal package to be installed. +## +## @strong{Algorithm}@* +## Uses commands @command{fir1} and @command{resample} +## from the signal package. +## +## @strong{References}@* +## [1] J. G. Proakis and D. G. Manolakis, +## Digital Signal Processing: Principles, Algorithms, and Applications, +## 4th ed., Prentice Hall, 2007. Chap. 6 +## +## [2] A. V. Oppenheim, R. W. Schafer and J. R. Buck, +## Discrete-time signal processing, Signal processing series, +## Prentice-Hall, 1999 +## ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> @@ -31,11 +50,22 @@ if (nargin < 3 || nargin > 4) print_usage (); endif - + ## requires signal package - - h = fir1 (n, 1/q); + try + pkg load signal; + catch + error ("iddata: resample: please install signal package to proceed"); + end_try_catch + if (is_real_scalar (n)) # fourth scalar argument n is the order of the anti-aliasing filter + h = fir1 (n, 1/q); + elseif (is_real_vector (n)) # fourth vector argument is the (impulse response of the) anti-aliasing filter + h = n; + else + error ("iddata: resample: fourth argument invalid"); + endif + dat.y = cellfun (@(y) resample (y, p, q, h), dat.y, "uniformoutput", false); dat.u = cellfun (@(u) resample (u, p, q, h), dat.u, "uniformoutput", false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-04 12:18:43
|
Revision: 10814 http://octave.svn.sourceforge.net/octave/?rev=10814&view=rev Author: paramaniac Date: 2012-08-04 12:18:37 +0000 (Sat, 04 Aug 2012) Log Message: ----------- control-devel: touch up plot command Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m 2012-08-04 10:59:11 UTC (rev 10813) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m 2012-08-04 12:18:37 UTC (rev 10814) @@ -17,7 +17,13 @@ ## -*- texinfo -*- ## @deftypefn {Function File} plot (@var{dat}) -## Plot iddata sets. +## Plot signals of iddata identification datasets on the screen. +## The signals are plotted experiment-wise, either in time- or +## frequency-domain. For multi-experiment datasets, +## press any key to switch to the next experiment. +## If the plot of a single experiment should be saved by the +## @command{print} command, use @code{plot(dat(:,:,:,exp))}, +## where @var{exp} denotes the desired experiment. ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> @@ -38,7 +44,8 @@ plot (dat.y{k}) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) - % hold on + xlabel ("Time") + ylabel ("Output Signal") endfor else # inputs present for k = 1 : e @@ -49,11 +56,12 @@ plot (dat.y{k}) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) - % hold on + ylabel ("Output Signal") subplot (2, 1, 2) stairs (dat.u{k}) legend (__labels__ (dat.inname, "u"){:}) - % hold on + xlabel ("Time") + ylabel ("Input Signal") endfor endif else # frequency domain @@ -66,6 +74,8 @@ xlim ([dat.w{k}(1), dat.w{k}(end)]) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) + xlabel ("Frequency") + ylabel ("Output Magnitude [dB]") endfor else # inputs present for k = 1 : e @@ -77,16 +87,17 @@ xlim ([dat.w{k}(1), dat.w{k}(end)]) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) + ylabel ("Output Magnitude [dB]") subplot (2, 1, 2) bar (dat.w{k}, 20*log10(abs (dat.u{k}))) xlim ([dat.w{k}(1), dat.w{k}(end)]) legend (__labels__ (dat.inname, "u"){:}) + xlabel ("Frequency") + ylabel ("Input Magnitude [dB]") endfor endif endif ## TODO: think about the 20*log10 and the bars in general - % hold off - endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-04 10:59:17
|
Revision: 10813 http://octave.svn.sourceforge.net/octave/?rev=10813&view=rev Author: paramaniac Date: 2012-08-04 10:59:11 +0000 (Sat, 04 Aug 2012) Log Message: ----------- control-devel: finish filter function, except for test Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-03 21:58:21 UTC (rev 10812) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-04 10:59:11 UTC (rev 10813) @@ -18,17 +18,18 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{dat} =} filter (@var{dat}, @var{sys}) ## @deftypefnx {Function File} {@var{dat} =} filter (@var{dat}, @var{b}, @var{a}) -## Detrend outputs and inputs of dataset @var{dat} by -## removing the best fit of a polynomial of order @var{ord}. -## If @var{ord} is not specified, default value 0 is taken. -## This corresponds to removing a constant. +## Filter output and input signals of dataset @var{dat}. +## The filter is specified either by @acronym{LTI} system @var{sys} +## or by transfer function polynomials @var{b} and @var{a} as described +## in the help text of the built-in filter command. Type @code{help filter} +## for more information. ## ## @strong{Inputs} ## @table @var ## @item dat ## iddata identification dataset containing signals in time-domain. ## @item sys -## LTI object containing the discrete-time filter. +## @acronym{LTI} object containing the discrete-time filter. ## @item b ## Numerator polynomial of the discrete-time filter. ## Must be a row vector containing the coefficients @@ -42,13 +43,8 @@ ## @strong{Outputs} ## @table @var ## @item dat -## iddata identification dataset in frequency-domain. -## In order to preserve signal power and noise level, -## the FFTs are normalized by dividing each transform -## by the square root of the signal length. -## The frequency values are distributed equally from 0 -## to the Nyquist frequency. The Nyquist frequency is -## only included for even signal lengths. +## iddata identification dataset with filtered +## output and input signals. ## @end table ## ## @end deftypefn @@ -63,7 +59,7 @@ print_usage (); endif - if (! isa (dat, "iddata")) # there's at least one iddata set, but not as the first argument + if (! isa (dat, "iddata")) # there's at least one iddata set, but not as the first argument error ("iddata: filter: first argument must be an iddata set"); endif @@ -71,22 +67,24 @@ error ("iddata: filter: require iddata set in time-domain"); endif - if (isa (b, "lti")) # filter (dat, sys) - if (nargin > 3) + if (isa (b, "lti")) # filter (dat, sys) + if (nargin > 3) # filter (dat, sys, si) has at most 3 inputs print_usage (); endif if (! issiso (b)) error ("iddata: filter: second argument must be a SISO LTI system"); endif - si = a; # filter (dat, sys, si) - if (isct (b)) # sys is continuous-time - b = c2d (b, dat.tsam{1}); # does this discretization/tsam make sense? + si = a; # filter (dat, sys, si) + if (isct (b)) # sys is continuous-time + b = c2d (b, dat.tsam{1}); # does this discretization/tsam make sense? endif - [b, a] = filtdata (b, "vector"); + [b, a] = filtdata (b, "vector"); # convert LTI system to transfer function elseif (nargin < 3) print_usage (); endif + ## use Octave's filter function for each experiment + ## the fifth argument '1' specifies the dimension in case of datasets with only 1 sample dat.y = cellfun (@(y) filter (b, a, y, si, 1), dat.y, "uniformoutput", false); dat.u = cellfun (@(u) filter (b, a, u, si, 1), dat.u, "uniformoutput", false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-08-03 21:58:27
|
Revision: 10812 http://octave.svn.sourceforge.net/octave/?rev=10812&view=rev Author: carandraug Date: 2012-08-03 21:58:21 +0000 (Fri, 03 Aug 2012) Log Message: ----------- general: bump version for new release Modified Paths: -------------- trunk/octave-forge/main/general/DESCRIPTION Modified: trunk/octave-forge/main/general/DESCRIPTION =================================================================== --- trunk/octave-forge/main/general/DESCRIPTION 2012-08-03 21:57:37 UTC (rev 10811) +++ trunk/octave-forge/main/general/DESCRIPTION 2012-08-03 21:58:21 UTC (rev 10812) @@ -1,6 +1,6 @@ Name: general -Version: 1.3.1 -Date: 2012-05-14 +Version: 1.3.2 +Date: 2012-08-03 Author: various authors Maintainer: Octave-Forge community <oct...@li...> Title: General This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-08-03 21:57:43
|
Revision: 10811 http://octave.svn.sourceforge.net/octave/?rev=10811&view=rev Author: carandraug Date: 2012-08-03 21:57:37 +0000 (Fri, 03 Aug 2012) Log Message: ----------- general: @group examples on TexInfo Modified Paths: -------------- trunk/octave-forge/main/general/inst/@dict/dict.m trunk/octave-forge/main/general/src/packfields.cc trunk/octave-forge/main/general/src/unpackfields.cc Modified: trunk/octave-forge/main/general/inst/@dict/dict.m =================================================================== --- trunk/octave-forge/main/general/inst/@dict/dict.m 2012-08-03 21:51:03 UTC (rev 10810) +++ trunk/octave-forge/main/general/inst/@dict/dict.m 2012-08-03 21:57:37 UTC (rev 10811) @@ -31,9 +31,11 @@ ## strings, like this: ## ## @example +## @group ## d = dict (keys, values); ## d(str) # result is a single value ## d(cellstr) # result is a cell array +## @end group ## @end example ## ## In the first case, the stored value is returned directly; in the second case, @@ -42,10 +44,12 @@ ## Similarly, indexed assignment works like this: ## ## @example +## @group ## d = dict (keys, values); ## d(str) = val; # store a single value ## d(cellstr) = vals; # store a cell array ## d(cellstr) = []; # delete a range of keys +## @end group ## @end example ## ## Any keys that are not present in the dictionary are added. The values of Modified: trunk/octave-forge/main/general/src/packfields.cc =================================================================== --- trunk/octave-forge/main/general/src/packfields.cc 2012-08-03 21:51:03 UTC (rev 10810) +++ trunk/octave-forge/main/general/src/packfields.cc 2012-08-03 21:57:37 UTC (rev 10811) @@ -25,9 +25,11 @@ @var{struct} can be a scalar structure or user class.\n\ This is equivalent to the code:\n\ @example\n\ +@group\n\ struct.var1 = var1;\n\ struct.var2 = var2;\n\ : \n\ +@end group\n\ @end example\n\ but more efficient and more concise.\n\ @seealso{unpackfields, struct}\n\ Modified: trunk/octave-forge/main/general/src/unpackfields.cc =================================================================== --- trunk/octave-forge/main/general/src/unpackfields.cc 2012-08-03 21:51:03 UTC (rev 10810) +++ trunk/octave-forge/main/general/src/unpackfields.cc 2012-08-03 21:57:37 UTC (rev 10811) @@ -25,9 +25,11 @@ @var{struct} can be a scalar structure or user class.\n\ This is equivalent to the code:\n\ @example\n\ +@group\n\ var1 = struct.var1;\n\ var2 = struct.var2;\n\ : \n\ +@end group\n\ @end example\n\ but more efficient and more concise.\n\ @seealso{packfields, struct}\n\ @@ -111,4 +113,3 @@ return octave_value_list (); } - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-08-03 21:51:10
|
Revision: 10810 http://octave.svn.sourceforge.net/octave/?rev=10810&view=rev Author: carandraug Date: 2012-08-03 21:51:03 +0000 (Fri, 03 Aug 2012) Log Message: ----------- tablify: add author e-mail address Modified Paths: -------------- trunk/octave-forge/main/general/inst/tablify.m Modified: trunk/octave-forge/main/general/inst/tablify.m =================================================================== --- trunk/octave-forge/main/general/inst/tablify.m 2012-08-03 21:46:00 UTC (rev 10809) +++ trunk/octave-forge/main/general/inst/tablify.m 2012-08-03 21:51:03 UTC (rev 10810) @@ -1,4 +1,4 @@ -## Copyright (C) 2012 Robert T. Short +## Copyright (C) 2012 Robert T. Short <oc...@ph...> ## ## This is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-08-03 21:46:06
|
Revision: 10809 http://octave.svn.sourceforge.net/octave/?rev=10809&view=rev Author: carandraug Date: 2012-08-03 21:46:00 +0000 (Fri, 03 Aug 2012) Log Message: ----------- mark_for_deletion: package is now dependent on 3.4, no need to have code copyed around Modified Paths: -------------- trunk/octave-forge/main/general/src/mark_for_deletion.cc Modified: trunk/octave-forge/main/general/src/mark_for_deletion.cc =================================================================== --- trunk/octave-forge/main/general/src/mark_for_deletion.cc 2012-08-03 20:30:42 UTC (rev 10808) +++ trunk/octave-forge/main/general/src/mark_for_deletion.cc 2012-08-03 21:46:00 UTC (rev 10809) @@ -14,15 +14,7 @@ // this program; if not, see <http://www.gnu.org/licenses/>. #include <octave/oct.h> - -#if 0 #include <octave/file-io.h> -#else -// The following declaration moved from pt-plot.h to file-io.h -// We duplicate it here so that octave-forge can support earlier -// versions of octave. This is cruft that needs to be removed. -extern void mark_for_deletion (const std::string&); -#endif DEFUN_DLD (mark_for_deletion, args,, "mark_for_deletion ( filename1, filename2, ... );\n\ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-03 20:30:48
|
Revision: 10808 http://octave.svn.sourceforge.net/octave/?rev=10808&view=rev Author: paramaniac Date: 2012-08-03 20:30:42 +0000 (Fri, 03 Aug 2012) Log Message: ----------- control-devel: save work in progress Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-03 19:49:11 UTC (rev 10807) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-03 20:30:42 UTC (rev 10808) @@ -22,6 +22,35 @@ ## removing the best fit of a polynomial of order @var{ord}. ## If @var{ord} is not specified, default value 0 is taken. ## This corresponds to removing a constant. +## +## @strong{Inputs} +## @table @var +## @item dat +## iddata identification dataset containing signals in time-domain. +## @item sys +## LTI object containing the discrete-time filter. +## @item b +## Numerator polynomial of the discrete-time filter. +## Must be a row vector containing the coefficients +## of the polynomial in ascending powers of z^-1. +## @item a +## Denominator polynomial of the discrete-time filter. +## Must be a row vector containing the coefficients +## of the polynomial in ascending powers of z^-1. +## @end table +## +## @strong{Outputs} +## @table @var +## @item dat +## iddata identification dataset in frequency-domain. +## In order to preserve signal power and noise level, +## the FFTs are normalized by dividing each transform +## by the square root of the signal length. +## The frequency values are distributed equally from 0 +## to the Nyquist frequency. The Nyquist frequency is +## only included for even signal lengths. +## @end table +## ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> @@ -38,6 +67,10 @@ error ("iddata: filter: first argument must be an iddata set"); endif + if (! dat.timedomain) + error ("iddata: filter: require iddata set in time-domain"); + endif + if (isa (b, "lti")) # filter (dat, sys) if (nargin > 3) print_usage (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sch...@us...> - 2012-08-03 19:49:18
|
Revision: 10807 http://octave.svn.sourceforge.net/octave/?rev=10807&view=rev Author: schloegl Date: 2012-08-03 19:49:11 +0000 (Fri, 03 Aug 2012) Log Message: ----------- fix message on missing mexext Modified Paths: -------------- trunk/octave-forge/extra/NaN/src/Makefile trunk/octave-forge/extra/tsa/src/Makefile Modified: trunk/octave-forge/extra/NaN/src/Makefile =================================================================== --- trunk/octave-forge/extra/NaN/src/Makefile 2012-08-03 15:56:49 UTC (rev 10806) +++ trunk/octave-forge/extra/NaN/src/Makefile 2012-08-03 19:49:11 UTC (rev 10807) @@ -41,7 +41,7 @@ mex4o octave: $(PROGS) -ifneq ( , $(ls -1 $(MATLABDIR) ) ) +ifneq (,$(ls -1 $(MATLABDIR))) MEX_EXT = $(shell $(MATLABDIR)/bin/mexext) mex4m matlab: $(patsubst %.mex, %.$(MEX_EXT), $(PROGS)) endif @@ -52,7 +52,7 @@ clean: -$(RM) *.o *.obj *.o64 core octave-core *.oct *~ *.mex* -$(PROGS): Makefile +#$(PROGS): Makefile ######################################################### # Octave, MATLAB on Linux Modified: trunk/octave-forge/extra/tsa/src/Makefile =================================================================== --- trunk/octave-forge/extra/tsa/src/Makefile 2012-08-03 15:56:49 UTC (rev 10806) +++ trunk/octave-forge/extra/tsa/src/Makefile 2012-08-03 19:49:11 UTC (rev 10807) @@ -51,10 +51,11 @@ mex4o octave: $(PROGS) -ifneq ( , $(ls -1 $(MATLABDIR) ) ) +ifneq (,$(ls -1 $(MATLABDIR))) MEX_EXT = $(shell $(MATLABDIR)/bin/mexext) mex4m matlab: $(patsubst %.mex, %.$(MEX_EXT), $(PROGS)) endif + mexw32 win32: $(patsubst %.mex, %.mexw32, $(PROGS)) mexw64 win64: $(patsubst %.mex, %.mexw64, $(PROGS)) all: octave win32 win64 mex4m This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-03 15:56:55
|
Revision: 10806 http://octave.svn.sourceforge.net/octave/?rev=10806&view=rev Author: paramaniac Date: 2012-08-03 15:56:49 +0000 (Fri, 03 Aug 2012) Log Message: ----------- control-devel: work on filter Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-03 15:38:45 UTC (rev 10805) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-03 15:56:49 UTC (rev 10806) @@ -25,22 +25,33 @@ ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> -## Created: April 2012 +## Created: August 2012 ## Version: 0.1 function dat = filter (dat, b, a = [], si = []) - if (nargin < 2 || nargin > 4 || ! isa (dat, "iddata")) + if (nargin < 2 || nargin > 4) print_usage (); endif + + if (! isa (dat, "iddata")) # there's at least one iddata set, but not as the first argument + error ("iddata: filter: first argument must be an iddata set"); + endif - if (isa (b, "lti") && issiso (b)) - si = a; - if (isct (b)) - tsam = dat.tsam; - b = c2d (b, tsam{1}); # does this make sense? + if (isa (b, "lti")) # filter (dat, sys) + if (nargin > 3) + print_usage (); endif + if (! issiso (b)) + error ("iddata: filter: second argument must be a SISO LTI system"); + endif + si = a; # filter (dat, sys, si) + if (isct (b)) # sys is continuous-time + b = c2d (b, dat.tsam{1}); # does this discretization/tsam make sense? + endif [b, a] = filtdata (b, "vector"); + elseif (nargin < 3) + print_usage (); endif dat.y = cellfun (@(y) filter (b, a, y, si, 1), dat.y, "uniformoutput", false); @@ -49,6 +60,7 @@ endfunction +## TODO: adapt test %!shared DATD, Z %! DAT = iddata ({[(1:10).', (1:2:20).'], [(10:-1:1).', (20:-2:1).']}, {[(41:50).', (46:55).'], [(61:70).', (-66:-1:-75).']}); %! DATD = detrend (DAT, "linear"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-03 15:38:55
|
Revision: 10805 http://octave.svn.sourceforge.net/octave/?rev=10805&view=rev Author: paramaniac Date: 2012-08-03 15:38:45 +0000 (Fri, 03 Aug 2012) Log Message: ----------- control-devel: add filter method Modified Paths: -------------- trunk/octave-forge/extra/control-devel/INDEX Added Paths: ----------- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m Modified: trunk/octave-forge/extra/control-devel/INDEX =================================================================== --- trunk/octave-forge/extra/control-devel/INDEX 2012-08-03 15:19:41 UTC (rev 10804) +++ trunk/octave-forge/extra/control-devel/INDEX 2012-08-03 15:38:45 UTC (rev 10805) @@ -6,6 +6,7 @@ @iddata/detrend @iddata/diff @iddata/fft + @iddata/filter @iddata/get @iddata/ifft @iddata/merge Added: trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m (rev 0) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/filter.m 2012-08-03 15:38:45 UTC (rev 10805) @@ -0,0 +1,59 @@ +## Copyright (C) 2012 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{dat} =} filter (@var{dat}, @var{sys}) +## @deftypefnx {Function File} {@var{dat} =} filter (@var{dat}, @var{b}, @var{a}) +## Detrend outputs and inputs of dataset @var{dat} by +## removing the best fit of a polynomial of order @var{ord}. +## If @var{ord} is not specified, default value 0 is taken. +## This corresponds to removing a constant. +## @end deftypefn + +## Author: Lukas Reichlin <luk...@gm...> +## Created: April 2012 +## Version: 0.1 + +function dat = filter (dat, b, a = [], si = []) + + if (nargin < 2 || nargin > 4 || ! isa (dat, "iddata")) + print_usage (); + endif + + if (isa (b, "lti") && issiso (b)) + si = a; + if (isct (b)) + tsam = dat.tsam; + b = c2d (b, tsam{1}); # does this make sense? + endif + [b, a] = filtdata (b, "vector"); + endif + + dat.y = cellfun (@(y) filter (b, a, y, si, 1), dat.y, "uniformoutput", false); + dat.u = cellfun (@(u) filter (b, a, u, si, 1), dat.u, "uniformoutput", false); + +endfunction + + +%!shared DATD, Z +%! DAT = iddata ({[(1:10).', (1:2:20).'], [(10:-1:1).', (20:-2:1).']}, {[(41:50).', (46:55).'], [(61:70).', (-66:-1:-75).']}); +%! DATD = detrend (DAT, "linear"); +%! Z = zeros (10, 2); +%!assert (DATD.y{1}, Z, 1e-10); +%!assert (DATD.y{2}, Z, 1e-10); +%!assert (DATD.u{1}, Z, 1e-10); +%!assert (DATD.u{2}, Z, 1e-10); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-08-03 15:19:47
|
Revision: 10804 http://octave.svn.sourceforge.net/octave/?rev=10804&view=rev Author: benjf5 Date: 2012-08-03 15:19:41 +0000 (Fri, 03 Aug 2012) Log Message: ----------- Tests, having been rewritten to match the manual, still broken. Modified Paths: -------------- trunk/octave-forge/extra/lssa/inst/lombcoeff.m trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m trunk/octave-forge/extra/lssa/inst/lscomplex.m trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m trunk/octave-forge/extra/lssa/inst/lsreal.m trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m Modified: trunk/octave-forge/extra/lssa/inst/lombcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lombcoeff.m 2012-08-03 12:22:15 UTC (rev 10803) +++ trunk/octave-forge/extra/lssa/inst/lombcoeff.m 2012-08-03 15:19:41 UTC (rev 10804) @@ -23,14 +23,14 @@ ## @end deftypefn %!test -%! shared t, x, o, maxfreq +%!shared t, x, o, maxfreq; %! maxfreq = 4 / ( 2 * pi ); -%! t = linspace(0,8); x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t) -%! - 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) -%! + cos((1/4)*maxfreq.*t)); o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; -%!assert( lombcoeff(t,x,o(1)),10788.9848389923,5e-10 ); -%!assert( lombcoeff(t,x,o(2)),12352.6413413457,5e-10 ); -%!assert( lombcoeff(t,x,o(3)),13673.4098969780,5e-10 ); +%! t = linspace(0,8); +%! x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t) - 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) + cos((1/4)*maxfreq.*t)); +%! o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; +%!assert( lombcoeff(t,x,maxfreq),10788.9848389923,5e-10 ); +%!assert( lombcoeff(t,x,3/4*maxfreq),12352.6413413457,5e-10 ); +%!assert( lombcoeff(t,x,1/4*maxfreq),13673.4098969780,5e-10 ); function coeff = lombcoeff(T, X, o) Modified: trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m 2012-08-03 12:22:15 UTC (rev 10803) +++ trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m 2012-08-03 15:19:41 UTC (rev 10804) @@ -22,6 +22,17 @@ ## ## @end deftypefn +%!test +%!shared t, x, o, maxfreq; +%! maxfreq = 4 / ( 2 * pi ); +%! t = linspace(0,8); +%! x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t) - 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) + cos((1/4)*maxfreq.*t)); +%! o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; +%!assert( lombnormcoeff(t,x,o(1)),63.3294946603949,5e-10 ); +%!assert( lombnormcoeff(t,x,o(2)),73.2601360674868,5e-10 ); +%!assert( lombnormcoeff(t,x,o(3)),53.0799752083903,5e-10 ); + + function coeff = lombnormcoeff(T,X,omega) tau = atan2( sum( sin( 2.*omega.*T)), sum(cos(2.*omega.*T))) / 2; coeff = ( ( sum ( X .* cos( omega .* T - tau ) ) .^ 2 ./ sum ( cos ( omega .* T - tau ) .^ 2 ) Modified: trunk/octave-forge/extra/lssa/inst/lscomplex.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscomplex.m 2012-08-03 12:22:15 UTC (rev 10803) +++ trunk/octave-forge/extra/lssa/inst/lscomplex.m 2012-08-03 15:19:41 UTC (rev 10804) @@ -24,9 +24,12 @@ ## @end deftypefn %!test -%! shared t, x, o, maxfreq -%! maxfreq = 4 / ( 2 * pi ); t = [0:0.008:8]; x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t)- 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) + cos((1/4)*maxfreq.*t)); o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; -%! assert( lscomplex(t,x,maxfreq,2,2), [-0.400754376933531 - 2.366871097665244i, 1.226663545950135 - 2.243899314661490i, 1.936433327880238 - 1.515538553198501i, 2.125045509991203 - 0.954100898917708i ], 6e-14 ); +%!shared t, x, o, maxfreq +%! maxfreq = 4 / ( 2 * pi ); +%! t = [0:0.008:8]; +%! x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t)- 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) + cos((1/4)*maxfreq.*t)); +%! o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; +%!assert( lscomplex(t,x,maxfreq,2,2), [-0.400754376933531 - 2.366871097665244i, 1.226663545950135 - 2.243899314661490i, 1.936433327880238 - 1.515538553198501i, 2.125045509991203 - 0.954100898917708i ], 6e-14 ); Modified: trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m 2012-08-03 12:22:15 UTC (rev 10803) +++ trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m 2012-08-03 15:19:41 UTC (rev 10804) @@ -50,7 +50,6 @@ endif ## The first solution that comes to mind is admittedly slightly ugly and has a data footprint of O(2n) ## but it is vectorised. - mask = ; mask = find( ( abs( x1 - t ) * so ) < wgtrad ); rx1 = x1(mask); ## I've kept the variable names from the R function here ry1 = y1(mask); ## Needs to have a noisy error if length(y1) != length(x1) -- add this! @@ -62,8 +61,7 @@ ## in particular to maintain an exact duplicate of the R function. s = sum( wgt( ( rx1 - t ) .* so ) ) * sum( wgt( ( rx2 - t ) .* so ) ); if s != 0 - coeff = sum( wgt((rx1-t).*so).*exp(i*o.*rx1).*ry1) * - sum(wgt((rx2-t).*so).*exp(i*o.*rx2).*conj(ry2)) / s; + coeff = sum( wgt((rx1-t).*so).*exp(i*o.*rx1).*ry1) * sum(wgt((rx2-t).*so).*exp(i*o.*rx2).*conj(ry2)) / s; else coeff = 0; endif Modified: trunk/octave-forge/extra/lssa/inst/lsreal.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lsreal.m 2012-08-03 12:22:15 UTC (rev 10803) +++ trunk/octave-forge/extra/lssa/inst/lsreal.m 2012-08-03 15:19:41 UTC (rev 10804) @@ -29,7 +29,7 @@ %! maxfreq = 4 / ( 2 * pi ); %! t = linspace(0,8); %! x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t) - 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) + cos((1/4)*maxfreq.*t)); -%! assert(lsreal(t,x,maxfreq,2,2),[-1.68275915310663 + 4.70126183846743i, 1.93821553170889 + 4.95660209883437i, 4.38145452686697 + 2.14403733658600i, 5.27425332281147 - 0.73933440226597i],6e-14) +%!assert(lsreal(t,x,maxfreq,2,2),[-1.68275915310663 + 4.70126183846743i, 1.93821553170889 + 4.95660209883437i, 4.38145452686697 + 2.14403733658600i, 5.27425332281147 - 0.73933440226597i],6e-14) %! #In the assert here, I've got an error bound large enough to catch individual system errors which would present no real issue. function transform = lsreal( t, x, omegamax, ncoeff, noctave) Modified: trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m 2012-08-03 12:22:15 UTC (rev 10803) +++ trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m 2012-08-03 15:19:41 UTC (rev 10804) @@ -14,7 +14,7 @@ ## this program; if not, see <http://www.gnu.org/licenses/>. ##-*- texinfo -*- -## @deffun {Function File} {t =} lsrealwavelet( @var{time}, @var{mag}, +## @deftypefn {Function File} {t =} lsrealwavelet( @var{time}, @var{mag}, ## @var{maxfreq}, @var{coefficients}, @var{octaves}, @var{time_min}, ## @var{time_max}, @var{min_window_count} ) ## @@ -26,7 +26,7 @@ ## ## @seealso lscomplexwavelet lswaveletcoeff lscorrcoeff ## -## @end deffun +## @end deftypefn function transform = lsrealwavelet(T, X, maxfreq, ncoeff, noctave, t_min, t_max, minimum_window_number ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-03 12:22:26
|
Revision: 10803 http://octave.svn.sourceforge.net/octave/?rev=10803&view=rev Author: paramaniac Date: 2012-08-03 12:22:15 +0000 (Fri, 03 Aug 2012) Log Message: ----------- control-devel: add append option, improve help text Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/nkshift.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/nkshift.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/nkshift.m 2012-08-03 10:57:33 UTC (rev 10802) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/nkshift.m 2012-08-03 12:22:15 UTC (rev 10803) @@ -17,11 +17,14 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{dat} =} nkshift (@var{dat}, @var{nk}) -## @deftypefnx {Function File} {@var{dat} =} detrend (@var{dat}, @var{nk} @var{'append'}) -## Detrend outputs and inputs of dataset @var{dat} by -## removing the best fit of a polynomial of order @var{ord}. -## If @var{ord} is not specified, default value 0 is taken. -## This corresponds to removing a constant. +## @deftypefnx {Function File} {@var{dat} =} nkshift (@var{dat}, @var{nk}, @var{'append'}) +## Shift input channels of dataset @var{dat} according to integer @var{nk}. +## A positive value of @var{nk} means that the input channels are delayed +## @var{nk} samples. By default, both input and output signals are shortened +## by @var{nk} samples. +## If a third argument @var{'append'} is passed, the output signals are left +## untouched while @var{nk} zeros are appended to the (shortened) input signals +## such that the number of samples in @var{dat} remains constant. ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> @@ -30,26 +33,35 @@ function dat = nkshift (dat, nk = 0) - if (nargin != 2) + if (nargin > 3) print_usage (); endif if (! is_real_scalar (nk)) - error ("iddata: nkshift: "); + error ("iddata: nkshift: 'nk' must be a scalar integer"); endif ## TODO: - nk per inputs - ## - padding with zeros + ## - frequency-domain data snk = sign (nk); nk = abs (nk); - if (snk >= 0) - dat.y = cellfun (@(y) y(nk+1:end, :), dat.y, "uniformoutput", false); - dat.u = cellfun (@(u) u(1:end-nk, :), dat.u, "uniformoutput", false); - else - dat.y = cellfun (@(y) y(1:end-nk, :), dat.y, "uniformoutput", false); - dat.u = cellfun (@(u) u(nk+1:end, :), dat.u, "uniformoutput", false); + if (nargin == 2) # default: shortening y and u by nk + if (snk >= 0) + dat.y = cellfun (@(y) y(nk+1:end, :), dat.y, "uniformoutput", false); + dat.u = cellfun (@(u) u(1:end-nk, :), dat.u, "uniformoutput", false); + else + dat.y = cellfun (@(y) y(1:end-nk, :), dat.y, "uniformoutput", false); + dat.u = cellfun (@(u) u(nk+1:end, :), dat.u, "uniformoutput", false); + endif + else # append: keep y, padding u with nk zeros + [~, ~, m] = size (dat); + if (snk >= 0) + dat.u = cellfun (@(u) [zeros(nk, m), u(1:end-nk, :)], dat.u, "uniformoutput", false); + else + dat.u = cellfun (@(u) [u(nk+1:end, :), zeros(nk, m)], dat.u, "uniformoutput", false); + endif endif endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-08-03 10:57:40
|
Revision: 10802 http://octave.svn.sourceforge.net/octave/?rev=10802&view=rev Author: jpicarbajal Date: 2012-08-03 10:57:33 +0000 (Fri, 03 Aug 2012) Log Message: ----------- geometry: DrawArrow returns handle to graphic objects. Demo added Modified Paths: -------------- trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m Modified: trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m =================================================================== --- trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m 2012-08-03 08:32:46 UTC (rev 10801) +++ trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m 2012-08-03 10:57:33 UTC (rev 10802) @@ -1,6 +1,6 @@ %% Copyright (c) 2011, INRA %% 2004-2011, David Legland <dav...@gr...> -%% 2011 Adapted to Octave by Juan Pablo Carbajal <car...@if...> +%% 2011-2012 Modified and adapted to GNU Octave by Juan Pablo Carbajal <car...@if...> %% %% All rights reserved. %% (simplified BSD License) @@ -121,22 +121,48 @@ ya3 = y2 - l.*sin(theta).*h; % draw main edge - line([x1'; x2'], [y1'; y2'], 'color', [0 0 1]); + tmp = line([x1'; x2'], [y1'; y2'], 'color', [0 0 1]); + handle.body = tmp; % draw only 2 wings ind = find(h==0); - line([xa1(ind)'; x2(ind)'], [ya1(ind)'; y2(ind)'], 'color', [0 0 1]); - line([xa2(ind)'; x2(ind)'], [ya2(ind)'; y2(ind)'], 'color', [0 0 1]); + if !isempty (ind) + tmp = line([xa1(ind)'; x2(ind)'], [ya1(ind)'; y2(ind)'], 'color', [0 0 1]); + handle.wing(:,1) = tmp; + tmp = line([xa2(ind)'; x2(ind)'], [ya2(ind)'; y2(ind)'], 'color', [0 0 1]); + handle.wing(:,2) = tmp; + end + + % draw a full arrow ind = find(h~=0); - patch([x2(ind) xa1(ind) xa3(ind) xa2(ind) x2(ind)]', ... - [y2(ind) ya1(ind) ya3(ind) ya2(ind) y2(ind)]', [0 0 1]); + if !isempty (ind) + tmp = patch([x2(ind) xa1(ind) xa3(ind) xa2(ind) x2(ind)]', ... + [y2(ind) ya1(ind) ya3(ind) ya2(ind) y2(ind)]', [0 0 1]); + handle.head = tmp; + end - if nargout>0 - varargout{1}=h; + varargout{1} = handle; end endfunction +%!demo +%! # Orthogonal projection respect to vector b +%! dim = 2; +%! b = 2*rand(dim,1); +%! P = eye(dim) - (b*b')/(b'*b); +%! v = 2*rand(dim,1)-1; +%! Pv = P*v; +%! +%! # Draw the vectors +%! clf; +%! h = drawArrow ([zeros(3,dim) [b'; v'; Pv']],0.1,0.1); +%! +%! # Color them +%! arrayfun(@(x,y)set(x,'color',y), [h.body; h.wing(:)],repmat(['rgb']',3,1)); +%! # Name them +%! legend (h.body, {'b','v','Pv'},'location','northoutside','orientation','horizontal'); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-08-03 08:32:52
|
Revision: 10801 http://octave.svn.sourceforge.net/octave/?rev=10801&view=rev Author: jpicarbajal Date: 2012-08-03 08:32:46 +0000 (Fri, 03 Aug 2012) Log Message: ----------- geometry: NEWs update Modified Paths: -------------- trunk/octave-forge/main/geometry/NEWS Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-08-03 08:31:19 UTC (rev 10800) +++ trunk/octave-forge/main/geometry/NEWS 2012-08-03 08:32:46 UTC (rev 10801) @@ -1,5 +1,11 @@ Summary of important user-visible changes for releases of the geometry package +=============================================================================== +geometry-1.5.1 Release Date: 2012-xx-xx Release Manager: Juan Pablo Carbajal +=============================================================================== +* Bug Fixes: + - drawArrow.m was not working due to porting errors. + =============================================================================== geometry-1.5.0 Release Date: 2012-06-05 Release Manager: Juan Pablo Carbajal =============================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-08-03 08:31:28
|
Revision: 10800 http://octave.svn.sourceforge.net/octave/?rev=10800&view=rev Author: jpicarbajal Date: 2012-08-03 08:31:19 +0000 (Fri, 03 Aug 2012) Log Message: ----------- geometry: when porting all x1 and y1 where converted to texinfo vars. Now is corrected. Modified Paths: -------------- trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m Modified: trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m =================================================================== --- trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m 2012-08-02 17:46:05 UTC (rev 10799) +++ trunk/octave-forge/main/geometry/inst/geom2d/drawArrow.m 2012-08-03 08:31:19 UTC (rev 10800) @@ -10,8 +10,8 @@ %% %% 1. Redistributions of source code must retain the above copyright notice, this %% list of conditions and the following disclaimer. -%% -%% 2. Redistributions in binary form must reproduce the above copyright notice, +%% +%% 2. Redistributions in binary form must reproduce the above copyright notice, %% this list of conditions and the following disclaimer in the documentation %% and/or other materials provided with the distribution. %% @@ -19,9 +19,9 @@ %% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE %% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE %% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -%% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +%% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR %% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -%% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +%% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS %% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN %% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) %% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE @@ -37,7 +37,7 @@ %% @deftypefnx {Function File} {@var{h} = } drawArrow (@dots{}, @var{L}, @var{W}) %% @deftypefnx {Function File} {@var{h} = } drawArrow (@dots{}, @var{L}, @var{W},@var{TYPE}) %% Draw an arrow on the current axis. -%% +%% %% draw an arrow between the points (@var{x1} @var{y1}) and (@var{x2} @var{y2}). %% The points can be given as a single array. @var{L}, @var{W} specify length %% and width of the arrow. @@ -46,7 +46,7 @@ %% 0: draw only two strokes %% 1: fill a triangle %% .5: draw a half arrow (try it to see ...) -%% +%% %% Arguments can be single values or array of size [N*1]. In this case, %% the function draws multiple arrows. %% @@ -61,14 +61,14 @@ % parse arrow coordinate var = varargin{1}; if size(var, 2)==4 - @var{x1} = var(:,1); - @var{y1} = var(:,2); + x1 = var(:,1); + y1 = var(:,2); x2 = var(:,3); y2 = var(:,4); varargin = varargin(2:end); elseif length(varargin)>3 - @var{x1} = varargin{1}; - @var{y1} = varargin{2}; + x1 = varargin{1}; + y1 = varargin{2}; x2 = varargin{3}; y2 = varargin{4}; varargin = varargin(5:end); @@ -76,31 +76,31 @@ error('wrong number of arguments, please read the doc'); end - l = 10*size(size( @var{x1})); - w = 5*ones(size( @var{x1})); - h = zeros(size( @var{x1})); + l = 10*size(size(x1)); + w = 5*ones(size(x1)); + h = zeros(size(x1)); % exctract length of arrow if ~isempty(varargin) l = varargin{1}; - if length( @var{x1})>length(l) - l = l(1)*ones(size( @var{x1})); + if length(x1)>length(l) + l = l(1)*ones(size(x1)); end end % extract width of arrow if length(varargin)>1 w = varargin{2}; - if length( @var{x1})>length(w) - w = w(1)*ones(size( @var{x1})); + if length(x1)>length(w) + w = w(1)*ones(size(x1)); end end % extract 'ratio' of arrow if length(varargin)>2 h = varargin{3}; - if length( @var{x1})>length(h) - h = h(1)*ones(size( @var{x1})); + if length(x1)>length(h) + h = h(1)*ones(size(x1)); end end @@ -108,7 +108,7 @@ axis equal; % angle of the edge - theta = atan2(y2- @var{y1}, x2- @var{x1}); + theta = atan2(y2-y1, x2-x1); % point on the 'left' xa1 = x2 - l.*cos(theta) - w.*sin(theta)/2; @@ -121,7 +121,7 @@ ya3 = y2 - l.*sin(theta).*h; % draw main edge - line([ @var{x1}'; x2'], [ @var{y1}'; y2'], 'color', [0 0 1]); + line([x1'; x2'], [y1'; y2'], 'color', [0 0 1]); % draw only 2 wings ind = find(h==0); @@ -132,8 +132,8 @@ ind = find(h~=0); patch([x2(ind) xa1(ind) xa3(ind) xa2(ind) x2(ind)]', ... [y2(ind) ya1(ind) ya3(ind) ya2(ind) y2(ind)]', [0 0 1]); - + if nargout>0 varargout{1}=h; end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-08-02 17:46:12
|
Revision: 10799 http://octave.svn.sourceforge.net/octave/?rev=10799&view=rev Author: paramaniac Date: 2012-08-02 17:46:05 +0000 (Thu, 02 Aug 2012) Log Message: ----------- control-devel: support algorithm option Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m trunk/octave-forge/extra/control-devel/inst/moen4.m trunk/octave-forge/extra/control-devel/inst/moesp.m trunk/octave-forge/extra/control-devel/inst/n4sid.m Modified: trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m 2012-08-01 19:44:32 UTC (rev 10798) +++ trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m 2012-08-02 17:46:05 UTC (rev 10799) @@ -72,7 +72,7 @@ conct = 1; # no connection between experiments ctrl = 1; # don't confirm order n rcond = 0.0; - tol = -1.0; + tol = 0.0; # -1.0; s = []; n = []; conf = []; @@ -94,7 +94,15 @@ endif s = val; case {"alg", "algorithm"} - error ("alg"); + if (strncmpi (val, "c", 1)) + alg = 0; # Cholesky algorithm applied to correlation matrix + elseif (strncmpi (val, "f", 1)) + alg = 1; # fast QR algorithm + elseif (strncmpi (val, "q", 1)) + alg = 2; # QR algorithm applied to block Hankel matrices + else + error ("%s: invalid algorithm", method); + endif case "tol" if (! is_real_scalar (val)) error ("%s: tolerance 'tol' must be a real scalar", method); Modified: trunk/octave-forge/extra/control-devel/inst/moen4.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/moen4.m 2012-08-01 19:44:32 UTC (rev 10798) +++ trunk/octave-forge/extra/control-devel/inst/moen4.m 2012-08-02 17:46:05 UTC (rev 10799) @@ -21,8 +21,10 @@ ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} moen4 (@var{dat}, @var{opt}, @dots{}) ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} moen4 (@var{dat}, @var{n}, @var{opt}, @dots{}) ## Estimate state-space model using combined subspace method: -## MOESP algorithm for finding the matrices A and C, -## and N4SID algorithm for finding the matrices B and D. +## @acronym{MOESP} algorithm for finding the matrices A and C, +## and @acronym{N4SID} algorithm for finding the matrices B and D. +## If no output arguments are given, the singular values are +## plotted on the screen in order to estimate the system order. ## ## @strong{Inputs} ## @table @var @@ -104,7 +106,7 @@ ## the relative machine precision. ## When @var{tol} < 0, the estimate is indicated by the ## index of the singular value that has the largest -## logarithmic gap to its successor. +## logarithmic gap to its successor. Default value is 0. ## ## @item 'rcond' ## The tolerance to be used for estimating the rank of @@ -115,7 +117,7 @@ ## be of full rank. If the user sets @var{rcond} <= 0, then an ## implicitly computed, default tolerance, defined by ## @var{rcond} = m*n*@var{eps}, is used instead, where @var{eps} is the -## relative machine precision. +## relative machine precision. Default value is 0. ## ## @item 'confirm' ## Specifies whether or not the user's confirmation of the Modified: trunk/octave-forge/extra/control-devel/inst/moesp.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/moesp.m 2012-08-01 19:44:32 UTC (rev 10798) +++ trunk/octave-forge/extra/control-devel/inst/moesp.m 2012-08-02 17:46:05 UTC (rev 10799) @@ -20,8 +20,8 @@ ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} moesp (@var{dat}, @var{n}, @dots{}) ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} moesp (@var{dat}, @var{opt}, @dots{}) ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} moesp (@var{dat}, @var{n}, @var{opt}, @dots{}) -## Estimate state-space model using MOESP algorithm. -## MOESP: Multivariable Output Error State sPace. +## Estimate state-space model using @acronym{MOESP} algorithm. +## @acronym{MOESP}: Multivariable Output Error State sPace. ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> Modified: trunk/octave-forge/extra/control-devel/inst/n4sid.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/n4sid.m 2012-08-01 19:44:32 UTC (rev 10798) +++ trunk/octave-forge/extra/control-devel/inst/n4sid.m 2012-08-02 17:46:05 UTC (rev 10799) @@ -20,8 +20,8 @@ ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} n4sid (@var{dat}, @var{n}, @dots{}) ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} n4sid (@var{dat}, @var{opt}, @dots{}) ## @deftypefnx {Function File} {[@var{sys}, @var{x0}, @var{info}] =} n4sid (@var{dat}, @var{n}, @var{opt}, @dots{}) -## Estimate state-space model using N4SID algorithm. -## N4SID: Numerical algorithm for Subspace State Space System IDentification. +## Estimate state-space model using @acronym{N4SID} algorithm. +## @acronym{N4SID}: Numerical algorithm for Subspace State Space System IDentification. ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |