Re: [Scilab-users] Influencing the automatic rotation_angles in advance
On Dec 10, 2016 6:00 PM, "Jens Simon Strom"wrote: > > Hallo Scilab experts, > During execution of plot3d, param3d, surf, etc. Scilab automatically chooses the axes property rotation_angles. Is there a way to influence this automatic? I do not mean ca=gca(); ca.rotation_angles=[ang1 ang2]. The setting should be positioned in the script before the plot command und should be valid for further plots. > > This question is in context with the thread 'untwinkle a sequence of graphics'. Without setting ca.rotation_angles=[a1 a2] after the param3d there is no twinkle. If I set the appropriate aspect - twinkling occurs again. > > I have not been able to reduce this to a a minimal example. Perhaps my enquiry suffices. > > Kind regards > Jens > > ___ > users mailing list > users@lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] image area mask for applying for filter
Hi Erhy, please find a code snipplet for extrascting an area of interest from an image. Way 1: mask is extracted from original image and stored as a new variable. original_img = rand(100,100).*256; extract_img = original_img (25:74,25:74); Way 2: make a copy of the original image // to keep the original values...just in case directly process the copy original_img = rand(100,100).*256; filtered_img = original_img;filtered_img(25:75,25:74) = 0; Matplot(filtered_img) Of course this example is more grayscale related, but you can do this as well for RGB images. original_img_R = rand(100,100).*256;original_img_G = rand(100,100).*256;original_img_B = rand(100,100).*256; original_RGB(:,:,1) = original_img_R;original_RGB(:,:,2) = original_img_G;original_RGB(:,:,3) = original_img_B; filtered_RGB = original_RGB;filtered_RGB(25:75,25:75,:)=0; ShowColorImage(filtered_RGB,''); // Note: ShowColorImage is part of the IPD toolbox. HTH Philipp 2016-12-10 21:34 GMT+01:00 Erhy: > Hello! > My interest ist to image processing. > Are there tools to mask an area of an image, > that a filter is only applied for the masked area? > > Thank you for tips > Erhy > > > > -- > View this message in context: http://mailinglists.scilab. > org/image-area-mask-for-applying-for-filter-tp4035216.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive > at Nabble.com. > ___ > users mailing list > users@lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -- In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda. There we have the salad. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Influencing the automatic rotation_angles setting in advance
Le 10/12/2016 21:34, Samuel Gougeon a écrit : Le 10/12/2016 21:00, Jens Simon Strom a écrit : Hallo Scilab experts, During execution of plot3d, param3d, surf, etc. Scilab *automatically* chooses the axes property *rotation_angles*. Is there a way to influence this automatic? I do not mean ca=gca(); ca.rotation_angles=[ang1 ang2]. The setting should be positioned in the script***before* the plot command und should be valid for further plots. Jens, I bet that you will become expert in documentation reading: Please see the theta and alpha plot3d() options: https://help.scilab.org/docs/6.0.0/en_US/plot3d.html Nevertheless, i agree that the present plot3d() behavior is bugged in 2 ways: 1. if the current axes has already some rotation_angles clearly set to a 3D view (= at least one of both azimuth and polar angles not being a multiple of 90), plot3d() should not reset them to some default rotation_angles values, but use the current axes without reorienting it. 2. plot3d() default rotation_angles values should be taken from gda(). It is presently not the case. There is no reason to use gda() / sda() only for 2D plots. These issues are reported there: http://bugzilla.scilab.org/14890 SG ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Influencing the automatic rotation_angles setting in advance
Le 10/12/2016 21:00, Jens Simon Strom a écrit : Hallo Scilab experts, During execution of plot3d, param3d, surf, etc. Scilab *automatically* chooses the axes property *rotation_angles*. Is there a way to influence this automatic? I do not mean ca=gca(); ca.rotation_angles=[ang1 ang2]. The setting should be positioned in the script***before* the plot command und should be valid for further plots. Jens, I bet that you will become expert in documentation reading: Please see the theta and alpha plot3d() options: https://help.scilab.org/docs/6.0.0/en_US/plot3d.html Nevertheless, i agree that the present plot3d() behavior is bugged in 2 ways: 1. if the current axes has already some rotation_angles clearly set to a 3D view (= at least one of both azimuth and polar angles not being a multiple of 90), plot3d() should not reset them to some default rotation_angles values, but use the current axes without reorienting it. 2. plot3d() default rotation_angles values should be taken from gda(). It is presently not the case. There is no reason to use gda() / sda() only for 2D plots. BR ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] image area mask for applying for filter
Hello! My interest ist to image processing. Are there tools to mask an area of an image, that a filter is only applied for the masked area? Thank you for tips Erhy -- View this message in context: http://mailinglists.scilab.org/image-area-mask-for-applying-for-filter-tp4035216.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Influencing the automatic rotation_angles setting in advance
Le 10/12/2016 à 21:00, Jens Simon Strom a écrit : Hallo Scilab experts, During execution of plot3d, param3d, surf, etc. Scilab *automatically* chooses the axes property *rotation_angles*. Is there a way to influence this automatic? I do not mean ca=gca(); ca.rotation_angles=[ang1 ang2]. The setting should be positioned in the script***before* the plot command und should be valid for further plots. This question is in context with the thread 'untwinkle a sequence of graphics'. Without setting ca.rotation_angles=[a1 a2] after the param3d there is no twinkle. If I set the appropriate aspect - twinkling occurs again. You can call drawlater() just before the sequence plot3d(...); ca.rotation_angle= this way the intermediate graphics will not be displayed and call drawnow() just after to show the final graphic I have not been able to reduce this to a a minimal example. Perhaps my enquiry suffices. Kind regards Jens ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Calling a java method in a Scilab function
Thank you Samuel. Sent via the Samsung GALAXY S® 5, an AT 4G LTE smartphone Original message From: Samuel GougeonDate: 12/10/16 9:44 AM (GMT-06:00) To: Users mailing list for Scilab Subject: Re: [Scilab-users] Calling a java method in a Scilab function Le 10/12/2016 16:03, n.gulunay a écrit : Hi, I thought I unsubscribed from this mailing list but I am still getting them. I even deleted my user name at one point but still kept getting them. Currently I appear to be unsubscribed as the system suggests I subscribe yet I am still getting many emails. I would rather sign on and look up what I need. Is there more than once place to unsubscribe or is the unsubscribe function not working? Could someone please let me know how to proceed. Nec See at the bottom of each received message: http://lists.scilab.org/mailman/listinfo/users SG ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Untwinkle a sequence of graphics
Hallo Samuel, That works perfectly. Thanks a lot! Tuning graphics is always a big challenge - consuming more time than the mathematical part. Kind regards Jens Am 10.12.2016 14:46, schrieb Samuel Gougeon: Hello Jens, Le 10/12/2016 11:55, Jens Simon Strom a écrit : Hallo Scilab experts, How would you avoid the 'twinkling' when clicking for the next image? For instance by using plot3d() options: xdel(); figure('position',[100 100 1200 800],'background',-2); xtitle('Click into figure and watch twinkling.') x = [0 1 0]; y = [0 0 1]; z = [1 1 1]; for i = 1:8 plot3d(x', y',z'*i/5,flag=[2 4 0],leg="@@") xclick() end SG ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Help with reading data (csvRead)
Hi Samuel OK, I trust it's just a matter of how the Mread matrix is displayed. /Claus On 10-12-2016 16:41, Samuel Gougeon wrote: Le 10/12/2016 16:18, Claus Futtrup a écrit : Hi Samuel Indeed it looks simpler than using csvRead, I will look into this function as well. It looks like it cuts off some of the decimals. Very unlikely. At least not a single one for the full file you sent to me: f = mgetl(filename); f(1:5) = []; s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); and(f==s) -->f = mgetl(filename); -->f(1:5) = []; -->s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); -->and(f==s) ans = T Trailing zeros are not displayed in the console. This can be misleading (and is unconvenient), but actual values are ok. Samuel ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Calling a java method in a Scilab function
Le 10/12/2016 16:03, n.gulunay a écrit : Hi, I thought I unsubscribed from this mailing list but I am still getting them. I even deleted my user name at one point but still kept getting them. Currently I appear to be unsubscribed as the system suggests I subscribe yet I am still getting many emails. I would rather sign on and look up what I need. Is there more than once place to unsubscribe or is the unsubscribe function not working? Could someone please let me know how to proceed. Nec See at the bottom of each received message: http://lists.scilab.org/mailman/listinfo/users SG ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Help with reading data (csvRead)
Le 10/12/2016 16:18, Claus Futtrup a écrit : Hi Samuel Indeed it looks simpler than using csvRead, I will look into this function as well. It looks like it cuts off some of the decimals. Very unlikely. At least not a single one for the full file you sent to me: f = mgetl(filename); f(1:5) = []; s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); and(f==s) -->f = mgetl(filename); -->f(1:5) = []; -->s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); -->and(f==s) ans = T Trailing zeros are not displayed in the console. This can be misleading (and is unconvenient), but actual values are ok. Samuel ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Help with reading data (csvRead)
Hi Samuel Indeed it looks simpler than using csvRead, I will look into this function as well. It looks like it cuts off some of the decimals. Thanks for the tip. Best regards, Claus On 10-12-2016 15:54, Samuel Gougeon wrote: Claus, You may use simply [Mread, header] = fscanfMat(filename); tested on the file sent. There may be an equivalent with csvRead(), using the substitute option. To be confirmed. Anyway it would be more complicated than using fscanfMat(). BR Samuel Le 10/12/2016 15:26, Claus Futtrup a écrit : Hi Samuel I didn't mean for the Scilab Users list to design the script for me, only hint at what to do about csvRead (or use another function). The extracted few lines should be plenty to see my challenges. Attached is a complete ZMA file. Best regards, Claus ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Calling a java method in a Scilab function
Hi, I thought I unsubscribed from this mailing list but I am still getting them. I even deleted my user name at one point but still kept getting them. Currently I appear to be unsubscribed as the system suggests I subscribe yet I am still getting many emails. I would rather sign on and look up what I need. Is there more than once place to unsubscribe or is the unsubscribe function not working? Could someone please let me know how to proceed.Nec Sent via the Samsung GALAXY S® 5, an AT 4G LTE smartphone Original message From: Samuel GougeonDate: 12/10/16 8:09 AM (GMT-06:00) To: Users mailing list for Scilab Subject: Re: [Scilab-users] Calling a java method in a Scilab function Hello Pierre, Le 07/12/2016 10:04, Pierre Vuillemin a écrit : Hi all, I have to create unique IDs for some object in Scilab. For that purpose, someone kindly guided me towards the UUID class of java, which lead me to create this function in Scilab, function id = make_id() UUID = jimport("java.util.UUID", %f) tmp = jinvoke(UUID,"randomUUID") id = jinvoke(tmp,"toString") endfunction It works fine. An a priori similar function is function id = make_id_err() UUID = jimport("java.util.UUID", %f) tmp = UUID.randomUUID() id = tmp.toString() endfunction where the methods are called without jinvoke. While the instructions of the latter function work well in the terminal, they lead to an error when trying to exec the function 'make_id_err'. I was wondering if it is a normal behaviour? No, but the bug is fixed in Scilab 6.0: In Scilab 5.5.2: -->endfunction UUID = jimport("java.util.UUID", %f) !--error 26 Récursivité trop complexe ! (Les tables de récurrence sont pleines) at line 2 of function make_id_err called by : tmp = UUID.randomUUID() at line 3 of function make_id_err called by : tmp = UUID.randomUUID() at line 3 of function make_id_err called by : ... etc In Scilab 6.0: --> getversion("scilab") ans = 6. 0. 0. 1.477D+09 --> function id = make_id_err() > UUID = jimport("java.util.UUID", %f) > tmp = UUID.randomUUID() > id = tmp.toString() > endfunction --> make_id_err() ans = 49e4f3f1-736a-435f-bc26-f7061f10de27 BR Samuel ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Help with reading data (csvRead)
Claus, You may use simply [Mread, header] = fscanfMat(filename); tested on the file sent. There may be an equivalent with csvRead(), using the substitute option. To be confirmed. Anyway it would be more complicated than using fscanfMat(). BR Samuel Le 10/12/2016 15:26, Claus Futtrup a écrit : Hi Samuel I didn't mean for the Scilab Users list to design the script for me, only hint at what to do about csvRead (or use another function). The extracted few lines should be plenty to see my challenges. Attached is a complete ZMA file. Best regards, Claus ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Help with reading data (csvRead)
Hi Rafael So I gather that the separator has to be a single character, when using csvRead. Thanks for the tip, I'll use mfscanf instead, it seems to be tolerant ... /Claus On 10-12-2016 15:31, Rafael Guerra wrote: Hi Claus, I do not know how to handle multiple spaces separators in csvRead, but you can use following code (adapted from recent post by Serge Steer): // START OF CODE: u=mopen("example.zma","r"); mgetl(u,5);// reads 5-line header r=mfscanf(-1,u,"%f %f %f\n"); mclose(u) // END OF CODE Regards, Rafael *From:*users [mailto:users-boun...@lists.scilab.org] *On Behalf Of *Claus Futtrup *Sent:* Saturday, December 10, 2016 11:23 AM *To:* International users mailing list for Scilab.*Subject:* [Scilab-users] Help with reading data (csvRead) Hi I'm trying to read a datafile with csvRead, it might be the wrong function. Please help. The file itself looks like this (only showing select lines - the file contains 391 lines): * FILE:C:\Users\claus\example.zma * INFO: Arb1 * Data: Impedance (ohms), Phase (degrees) 10.000+8.8488 +40.1693 10.199+8.9648 +40.7994 11.949 +10.0946 +46.1555 12.188 +10.2827 +46.7923 141.879+6.7485 -10.8804 144.715+6.7473 -10.3382 147.608+6.7438-9.8380 150.559+6.7377-9.3570 389.346+7.2282+9.7230 397.129+7.2456 +10.0717 987.112+8.5967 +23.3368 1006.846+8.6355 +23.7056 9807.309 +26.8760 +57.2720 10003.368 +27.2519 +57.4330 2.000 +44.3153 +62.1741 csvRead complains because the column width is changing. I execute: localdir = "C:\Users\claus\"; filename = _fullfile_(localdir,"example.zma"); Mread = csvRead(filename," ",".","double",[],[],[],5); This is the error which csvRead gives (line 10 == line 3 in above shortened dataset): >Warning: Inconsistency found in the columns. At line 10, found 12 columns while the previous had 13. > !--error 999 >csvRead: can not read file C:\Users\claus\example.zma: Error in the column structure What is the recommended way to read the ZMA file? P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. /Claus ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Calling a java method in a Scilab function
Hello Pierre, Le 07/12/2016 10:04, Pierre Vuillemin a écrit : Hi all, I have to create unique IDs for some object in Scilab. For that purpose, someone kindly guided me towards the UUID class of java, which lead me to create this function in Scilab, function id = make_id() UUID = jimport("java.util.UUID", %f) tmp = jinvoke(UUID,"randomUUID") id = jinvoke(tmp,"toString") endfunction It works fine. An a priori similar function is function id = make_id_err() UUID = jimport("java.util.UUID", %f) tmp = UUID.randomUUID() id = tmp.toString() endfunction where the methods are called without jinvoke. While the instructions of the latter function work well in the terminal, they lead to an error when trying to exec the function 'make_id_err'. I was wondering if it is a normal behaviour? No, but the bug is fixed in Scilab 6.0: In Scilab 5.5.2: -->endfunction UUID = jimport("java.util.UUID", %f) !--error 26 Récursivité trop complexe ! (Les tables de récurrence sont pleines) at line 2 of function make_id_err called by : tmp = UUID.randomUUID() at line 3 of function make_id_err called by : tmp = UUID.randomUUID() at line 3 of function make_id_err called by : ... etc In Scilab 6.0: --> getversion("scilab") ans = 6. 0. 0. 1.477D+09 --> function id = make_id_err() >UUID = jimport("java.util.UUID", %f) >tmp = UUID.randomUUID() >id = tmp.toString() > endfunction --> make_id_err() ans = 49e4f3f1-736a-435f-bc26-f7061f10de27 BR Samuel ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Untwinkle a sequence of graphics
Hello Jens, Le 10/12/2016 11:55, Jens Simon Strom a écrit : Hallo Scilab experts, How would you avoid the 'twinkling' when clicking for the next image? For instance by using plot3d() options: xdel(); figure('position',[100 100 1200 800],'background',-2); xtitle('Click into figure and watch twinkling.') x = [0 1 0]; y = [0 0 1]; z = [1 1 1]; for i = 1:8 plot3d(x',y', z'*i/5, flag=[2 4 0], leg="@@") xclick() end SG ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Help with reading data (csvRead)
Hello Claus, Could you please post a true extract of your file, as a file /in attachement/, after that you checked than the issue occurs also with this extract file? It will be easier to test the issue, and it will lead to more reliable tests than copying/pasting a part of your message in a file. Regards SG Le 10/12/2016 11:22, Claus Futtrup a écrit : Hi I'm trying to read a datafile with csvRead, it might be the wrong function. Please help. The file itself looks like this (only showing select lines - the file contains 391 lines): * FILE:C:\Users\claus\example.zma * INFO: Arb1 * Data: Impedance (ohms), Phase (degrees) 10.000+8.8488 +40.1693 10.199+8.9648 +40.7994 11.949 +10.0946 +46.1555 12.188 +10.2827 +46.7923 141.879+6.7485 -10.8804 144.715+6.7473 -10.3382 147.608+6.7438-9.8380 150.559+6.7377-9.3570 389.346+7.2282+9.7230 397.129+7.2456 +10.0717 987.112+8.5967 +23.3368 1006.846+8.6355 +23.7056 9807.309 +26.8760 +57.2720 10003.368 +27.2519 +57.4330 2.000 +44.3153 +62.1741 csvRead complains because the column width is changing. I execute: localdir = "C:\Users\claus\"; filename = fullfile(localdir,"example.zma"); Mread = csvRead(filename,"",".","double",[],[],[],5); This is the error which csvRead gives (line 10 == line 3 in above shortened dataset): >Warning: Inconsistency found in the columns. At line 10, found 12 columns while the previous had 13. > !--error 999 >csvRead: can not read file C:\Users\claus\example.zma: Error in the column structure What is the recommended way to read the ZMA file? P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. /Claus ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] Help with reading data (csvRead)
Hi I'm trying to read a datafile with csvRead, it might be the wrong function. Please help. The file itself looks like this (only showing select lines - the file contains 391 lines): * FILE:C:\Users\claus\example.zma * INFO: Arb1 * Data: Impedance (ohms), Phase (degrees) 10.000+8.8488 +40.1693 10.199+8.9648 +40.7994 11.949 +10.0946 +46.1555 12.188 +10.2827 +46.7923 141.879+6.7485 -10.8804 144.715+6.7473 -10.3382 147.608+6.7438-9.8380 150.559+6.7377-9.3570 389.346+7.2282+9.7230 397.129+7.2456 +10.0717 987.112+8.5967 +23.3368 1006.846+8.6355 +23.7056 9807.309 +26.8760 +57.2720 10003.368 +27.2519 +57.4330 2.000 +44.3153 +62.1741 csvRead complains because the column width is changing. I execute: localdir = "C:\Users\claus\"; filename = fullfile(localdir,"example.zma"); Mread = csvRead(filename,"",".","double",[],[],[],5); This is the error which csvRead gives (line 10 == line 3 in above shortened dataset): >Warning: Inconsistency found in the columns. At line 10, found 12 columns while the previous had 13. > !--error 999 >csvRead: can not read file C:\Users\claus\example.zma: Error in the column structure What is the recommended way to read the ZMA file? P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. /Claus ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users