[Scilab-users] How to close/kill "messagebox"

classic Classic list List threaded Threaded
8 messages Options
Emmanuel Delaleau Emmanuel Delaleau
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] How to close/kill "messagebox"

Hi,


Does it exists a way to close/kill windows created by "messagebox".

"close" or "delete" do not work as messageboxes do not have a handle.

Thanks

Emmanuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Antoine Monmayrant-2 Antoine Monmayrant-2
Reply | Threaded
Open this post in threaded view
|

Re: How to close/kill "messagebox"


Hello,


Indeed, messagebox() seems to live outside the realm of figures and
other graphic entities.
It's a bit weird in my opinion.
Maybe a workaround for you would be to emulate what messagebox() is
doing by using a figure and a bunch of uicontrols and callbacks.
That way you'll be able to treat this emulated version like any othe
figure and close it using delete(winsid_of_said_figure).

Hope it helps,

Antoine



Le 11/05/2018 à 09:42, Emmanuel Delaleau a écrit :



> Hi,
>
>
> Does it exists a way to close/kill windows created by "messagebox".
>
> "close" or "delete" do not work as messageboxes do not have a handle.
>
> Thanks
>
> Emmanuel
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
>

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  BP 54200
  31031 TOULOUSE Cedex 4
  FRANCE

  Tel:+33 5 61 33 64 59
 
  email : [hidden email]
  permanent email : [hidden email]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: How to close/kill "messagebox"

Hello,

Exactly messagebox() use a semi-hardcoded Java-based GUI that totally differs from the uicontrol
code. If you want to mix messagebox() and regular figure(), you should (as Antoine suggested)
implement a popup-like by yourself (should be ~20 lines of code).

Thanks,

--
Clément

Le vendredi 11 mai 2018 à 10:26 +0200, [hidden email] a écrit :

> Hello,
>
>
> Indeed, messagebox() seems to live outside the realm of figures and
> other graphic entities.
> It's a bit weird in my opinion.
> Maybe a workaround for you would be to emulate what messagebox() is
> doing by using a figure and a bunch of uicontrols and callbacks.
> That way you'll be able to treat this emulated version like any othe
> figure and close it using delete(winsid_of_said_figure).
>
> Hope it helps,
>
> Antoine
>
>
>
> Le 11/05/2018 à 09:42, Emmanuel Delaleau a écrit :
>
>
>
> > Hi,
> >
> >
> > Does it exists a way to close/kill windows created by "messagebox".
> >
> > "close" or "delete" do not work as messageboxes do not have a handle.
> >
> > Thanks
> >
> > Emmanuel
> >
> > _______________________________________________
> > users mailing list
> > [hidden email]
> > http://lists.scilab.org/mailman/listinfo/users
> >
>
>
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Heinz Nabielek-3 Heinz Nabielek-3
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] any suggestion to make my Scilab code faster would be welcome:

Friends and colleagues:

I have already a pretty efficient Scilab code, but any suggestion to make it faster would be welcome:

I have position measurements of 20,000 objects in 3d space stored in column vectors X, Y, Z and want to explore the distribution of nearest neighbour distances. This works well like below, but an acceleration would help me a lot.

Heinz

n=length(X);
d=[];
for i=1:n;
x=X(i);y=Y(i);z=Z(i);
SqDist=(X-x)^2 + (Y-y)^2 + (Z-z)^2;
SqDist(i)=[];
d=[d; sqrt(min(SqDist))];
end;


.. and 'd' gives me the desired distribution in a column vector of n elements
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
kjubo kjubo
Reply | Threaded
Open this post in threaded view
|

Re: any suggestion to make my Scilab code faster would be welcome:

Hello,

d = zeros(n,1);
for ii=1:n;
//    SqDist   = (X-X(i))^2 + (Y-Y(i))^2 + (Z-Z(i))^2;
    SqDist   = (X-X(ii)).*(X-X(ii)) + (Y-Y(ii)).*(Y-Y(ii)) +
(Z-Z(ii)).*(Z-Z(ii));
    SqDist(ii)= [];
    d(ii)    = sqrt(min(SqDist));
end;

some comments:
* preallocate matrix
* avoid unnecessary assign of variables (this slow down scilab more than
expected)
* as seen in previous meesages here, use X*X instead of X^2

for me speed up factor is ~10

Regards.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Wozai Wozai
Reply | Threaded
Open this post in threaded view
|

Re: any suggestion to make my Scilab code faster would be welcome:

In reply to this post by Heinz Nabielek-3
Hi,

A very similar problem was discussed
here
<http://mailinglists.scilab.org/Scilab-users-need-a-more-efficient-and-faster-code-suggestions-welcome-tc4037482.html#a4037515>  
in length. You'll find there numerous hints how to make your code faster.

Cheers

Wozai



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Heinz Nabielek-3 Heinz Nabielek-3
Reply | Threaded
Open this post in threaded view
|

Re: any suggestion to make my Scilab code faster would be welcome:

In reply to this post by kjubo
Yes- factor 10. Great many thanks for all the help.
Heinz

> On 16.05.2018, at 08:40, kjubo <[hidden email]> wrote:
>
> Hello,
>
> d = zeros(n,1);
> for ii=1:n;
> //    SqDist   = (X-X(i))^2 + (Y-Y(i))^2 + (Z-Z(i))^2;
>    SqDist   = (X-X(ii)).*(X-X(ii)) + (Y-Y(ii)).*(Y-Y(ii)) +
> (Z-Z(ii)).*(Z-Z(ii));
>    SqDist(ii)= [];
>    d(ii)    = sqrt(min(SqDist));
> end;
>
> some comments:
> * preallocate matrix
> * avoid unnecessary assign of variables (this slow down scilab more than
> expected)
> * as seen in previous meesages here, use X*X instead of X^2
>
> for me speed up factor is ~10
>
> Regards.

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Heinz Nabielek-3 Heinz Nabielek-3
Reply | Threaded
Open this post in threaded view
|

Re: any suggestion to make my Scilab code faster would be welcome:

Histogram shows distribution of d and comparison with my model prediction.
Heinz


On 16.05.2018, at 19:44, Heinz Nabielek <[hidden email]> wrote:

Yes- factor 10. Great many thanks for all the help.
Heinz

On 16.05.2018, at 08:40, kjubo <[hidden email]> wrote:

Hello,

d = zeros(n,1);
for ii=1:n;
//    SqDist   = (X-X(i))^2 + (Y-Y(i))^2 + (Z-Z(i))^2;
  SqDist   = (X-X(ii)).*(X-X(ii)) + (Y-Y(ii)).*(Y-Y(ii)) +
(Z-Z(ii)).*(Z-Z(ii));
  SqDist(ii)= [];
  d(ii)    = sqrt(min(SqDist));
end; 

some comments:
* preallocate matrix
* avoid unnecessary assign of variables (this slow down scilab more than
expected)
* as seen in previous meesages here, use X*X instead of X^2

for me speed up factor is ~10

Regards.



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users