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 件のコメント

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

回答 (0 件)

この質問は閉じられています。

質問済み:

2019 年 4 月 30 日

閉鎖済み:

2019 年 5 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by