Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-26 Thread Chin Luh Tan
Hi Samuel, "But then, even if such a global default value exists, assigned to and reachable from what, since ~ can't be a variable name? Think we need some x-matlaber to confirm which case. Right, but case #2 looks quite improbable." --> i keep mixing up with built-in functions for this

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-26 Thread Federico Miyara
This is only speculation: Could the tilde be used in some cases where some arguments that are not the last ones are optional, and the function definition includes some way to check if the corresponding argument has or has nor been provided? I've noticed in some cases Scilab allows just to

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-26 Thread Antoine ELIAS
Hello, Or when you have to write a function following a specific prototype ( graphic events, optim, ode, ...) If I would write a function that call another, I have to specify a prototype to allow user to call my function. But in some case, the final user does not need all parameters so he

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-26 Thread Samuel Gougeon
Le 26/11/2019 à 16:15, Chin Luh Tan a écrit : 2. Tilde used to tell the function to use default value, then replacing it with % unused might cause error. But then, even if such a global default value exists, assigned to and reachable from what, since ~ can't be a variable name? Think we

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-26 Thread Chin Luh Tan
Hi Samuel,  In fact I've not been using matlab for more than 10 years, so I try to understand this as well.  The input tilde is still abit confusing for me as well, I am trying to understand its' usage as this page:  https://octave.org/doc/v4.4.1/Ignoring-Arguments.html function val =

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-26 Thread Samuel Gougeon
Hello Chin Luh, Thanks a lot for your input. Both cases -- input and output will have to be converted --, since the converter is also made to convert (sets of) functions definitions, not only scripts. About the input case: Steven's answer is still not really clear to me. Doing some tests

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-25 Thread Chin Luh Tan
Hi Samuel,  I think your assumption likely correct on the input and the output using ~ https://www.mathworks.com/matlabcentral/answers/288016-tilde-doesn-t-work-for-ignoring-my-inputs " You can use tilde to ignore input arguments when you define the function. You cannot use tilde to

Re: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-25 Thread Samuel Gougeon
Le 23/11/2019 à 15:35, Samuel Gougeon a écrit : HelloPhilipp, and to all (former ;-) matlabers, Le 16/10/2019 à 11:46, P M a écrit : Dear experts, trying to convert a matlab code to scilab I come across following line: [~,~,Minstances_hat] = unique(B(:)); How to replace the "~" symbol? B is

[Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab

2019-11-23 Thread Samuel Gougeon
HelloPhilipp, and to all (former ;-) matlabers, Le 16/10/2019 à 11:46, P M a écrit : Dear experts, trying to convert a matlab code to scilab I come across following line: [~,~,Minstances_hat] = unique(B(:)); How to replace the "~" symbol? B is the blue channel of a RGB image...hence a m x n