Convert C code to Matlab code

Hi,
I need to convert these three codes in C that i have attached to this question into a matlab script
Anyone can help me?

9 Comments

I'd suggest to just replace the functionality with the builtin MATLAB spline tools instead...
Unfortunately the matlab spline toolbox doesn't allow me to do the operations I need
What part of it is the problem? They don't look especially complicated functions.
"The matlab spline toolbox doesn't allow me to do the operations I need"
What are you trying to do that think can't? I don't know it well, but it seems pretty capable from what I do know...you sure it is "can't" and not "I'm not sure how" ?
I have to evaluate a spline as a function of the parameter u (generally of range [0 1]). So, giving the parameter u as input, I would like to obtain the x and y coordinates of the spline in the cartesian plane. The spline toolbox, on the other hand, allows you to evaluate y coordinate of the spline as a function of the x coordinate. Consequently the parametric link [x, y] = f (u) is lost.
I don't know if I have explained myself clearly
@Adam, the problem is that I know nothing of C code
It's almost entirely just maths, if statements and for loops with array assignment. Almost the only difference to Matlab is the square bracket [ ] array indexing rather than parenteses ( )
@Attilio: You do not know anything about the C code. Now you ask, if somebody converts it to Matlab. You post this in the forum, because you hope, that someone does your work for free. Usually the forum is more enthusiastic to assist persons to do their work by their own. Man contributors do not like to be treated as cheap programming service.
Ok, I understand

Answers (0)

This question is closed.

Asked:

on 30 Apr 2019

Closed:

on 4 May 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!