I am writing a program with gui . except functions that created automatic such as callbacks for objects in gui , i want to create user defined functions to use them in everywhere in this program . so i created meshing function that i write below .
function meshing(p1, p2, p3, p4, p5, p6, p7, p8)
pmb = [( ( p1(1) + p5(1) ) / 2 ) ( ( p1(2) + p4(2) ) / 2 ) p1(3) ];
pmt = [( ( p1(1) + p5(1) ) / 2 ) ( ( p1(2) + p4(2) ) / 2 ) p2(3) ];
p23 = ( p2 + p3 ) / 2;
a = get(gcf);
axes(handles.axes3d);
scatter3(pmt(1),pmt(2),pmt(3))
but when i run it , this below error is showing
Error while evaluating UIControl Callback
Undefined variable "handles" or class "handles.axes3d".
Error in SSF>meshing (line 897) axes(handles.axes3d);
but i have a axes3d in my gui . what can i do
handles. Can you show where you definemeshingto be the callback? - Suever