nested function works only with deff()

classic Classic list List threaded Threaded
1 message Options
Erhy Erhy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

nested function works only with deff()

Hello!
I tried the example in Help with Version 6.0.0
of datatipSetDisplay.
It works only after modification of the inserted nested function
with deff()

Now the code is:

function Tips= ShowTips()
x1=linspace(0,1,100)';
y1=x1.^3;
clf();
plot(x1,y1,x1,sinc(10*x1));
e=gce();
p1=e.children(1);//sinc(10*x1)
p2=e.children(2); //x1^3
t=datatipCreate(p1,50);
datatipSetOrientation(t,"lower right")
t=datatipCreate(p1,[0.8 0.5]);
t=datatipCreate(p2,[0.1,0.0]);
t=datatipCreate(p2,[0.8 0.4]);
datatipSetOrientation(t,"upper left")
deff( 'str=myfmt(h)', ..
        ['pt = h.data;'; 'str = msprintf(''sinc\n%s'',
sci2exp(round(pt*10)/10));']);
pause
datatipSetDisplay(t,"myfmt")
Tips = "anything";
endfunction



--
View this message in context: http://mailinglists.scilab.org/nested-function-works-only-with-deff-tp4036017.html
Sent from the Scilab developers - Mailing Lists Archives mailing list archive at Nabble.com.
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Loading...