I have the need to call the SCILAB native ode function inside a user-defined
function. But I find that this generates an error message.
For example, in the first example obtained by typing help ode, the script
fails to execute if the ode function is called inside a user-defined function.
Is there any solution to this problem
function ydot=f(t, y)
ydot=y^2-y*sin(t)+cos(t)
endfunction
y0=0;
t0=0;
t=0:0.1:%pi;
y = ode(y0, t0, t, f);
plot(t,y)
//This does not work if ode is called inside a user-defined function
function [yy]=myexample(y0, t01, t)
y = ode(y0, t0, t, f);
plot(t,y)
endfunction
[yy] = myexample(y0.t0, t);//this call list the error "Attempt to reference
field of non-structure array".
Samuel Enibe
University of Nigeria, Nsukka, Nigeria
This email and any attachments are intended solely for the use of the
individual or entity to whom it is addressed and may be confidential and/or
privileged.
If you are not one of the named recipients or have received this email in error,
(i) you should not read, disclose, or copy it,
(ii) please notify sender of your receipt by reply email and delete this email
and all attachments,
(iii) Dassault Systèmes does not accept or assume any liability or
responsibility for any use of or reliance on this email.
Please be informed that your personal data are processed according to our data
privacy policy as described on our website. Should you have any questions
related to personal data protection, please contact 3DS Data Protection Officer
https://www.3ds.com/privacy-policy/contact/
_______________________________________________
users mailing list - [email protected]
Click here to unsubscribe: <mailto:[email protected]>
https://lists.scilab.org/mailman/listinfo/users