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 commentaires

dpb
dpb le 30 Avr 2019
I'd suggest to just replace the functionality with the builtin MATLAB spline tools instead...
Attilio Carapucci
Attilio Carapucci le 1 Mai 2019
Unfortunately the matlab spline toolbox doesn't allow me to do the operations I need
Adam
Adam le 1 Mai 2019
What part of it is the problem? They don't look especially complicated functions.
dpb
dpb le 1 Mai 2019
"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" ?
Attilio Carapucci
Attilio Carapucci le 2 Mai 2019
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
Attilio Carapucci
Attilio Carapucci le 2 Mai 2019
@Adam, the problem is that I know nothing of C code
Adam
Adam le 2 Mai 2019
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 ( )
Jan
Jan le 2 Mai 2019
@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.
Attilio Carapucci
Attilio Carapucci le 4 Mai 2019
Ok, I understand

Réponses (0)

Cette question est clôturée.

Clôturé :

le 4 Mai 2019

Community Treasure Hunt

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

Start Hunting!

Translated by