الى خبراء الماتلاب

السلطان الكيماوي

عضو جديد
السلام عليكم أخواني..أنا ادرس في جامعة غربية هندسة كيميائية بس متورط في مادة اعملها الان تختص بالماتلاب..

ارجوكم تساعدوني في حل هذي المشكلة:

i want to create a function that takes the coordinates of two positions: the initial position and the final position.. and interpolate between them

Write a function interpolateMMPerson that takes 2 positions of MMPerson as inputs and outputs the required 11 × 2 × 20 matrix.

the inputs are:

(Pos (11x2 matrix

Pos =
0 0
0 1.0000
0.7071 1.7071
1.4142 1.0000
1.4142 0
-0.1464 2.6035
0.2071 2.9571
0.7071 2.9571
1.2071 2.9571
1.5607 2.6035
0.7071 3.4571

(newPos(another 11x2 matrix

newPos =
-0.0017 0.0023
-0.0179 1.0043
0.8145 1.7634
1.5074 1.0423
1.5369 0.0020
-0.4943 3.4348
0.1055 3.3970
0.7214 3.0607
1.0645 3.4244
0.5676 3.3684
0.4201 3.4641

i want to interpolate the position in 20 places and save the positions in an 11 × 2 × 20 matrix

so the output of the function is an 11 x 2 x 20 matrix called Positions

how can i do that ?

there is a way to do it using the linspace function but i couldnt figure how to do it