How to use matlab 'spline' function in simulink ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sandeep Hanwate
am 7 Apr. 2016
Kommentiert: Titus Edelhofer
am 11 Apr. 2016
Hi, I was trying to generate robot trajectory using spline function in simulink, I tried with all user function block available in simulink library but it is getting error the image is shown below. Can anybody help for this issue.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160438/image.png)
0 Kommentare
Akzeptierte Antwort
Titus Edelhofer
am 7 Apr. 2016
Hi,
the error message tells you what to do, namely "declare" spline as being used not by code generation but by MATLAB:
doc coder.extrinsic
Titus
2 Kommentare
Titus Edelhofer
am 11 Apr. 2016
Hi,
except from the typo ("ay = zeros") and the not very interesting u1 and u2 it's fine. I tried this and get nice sine approximation (as in doc spline):
function y = fcn(t)
u1= 0:10; %$DH
u2= sin(u1); %init
coder.extrinsic('spline')
y = 0;
y = spline(u1,u2,t);
Titus
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Splines finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!