##### Child pages
• z_*OBSOLETE* Calculate Rigid Body Motion in Matlab

# Page History

## Key

• This line was added.
• This line was removed.
• Formatting was changed.

...

• The .csv file contains 6 columns per bone. 3 translations and 3 rotations
• This format can be read in maya using imRg. see maya animation step 4
• You will probably get a less jittery but not perfect animation using only this smoothing step. Continue to Standard smoothing for best results.

### Standard Smoothing

under construction

In Matlab:

• Wiki Markup
import your $prefix$xyzpointsBones.csv bones file
• you will have 3 variables, colheaders, data, and textdata
• type: plot(data)
• click the Insert Legend button
• pick a data column with some cyclic curves (the legend will allow you to match the column number with the color of the line)
• type: plot(data(:,4)) %the number 4 being an example of the data column chosen)
• There is probably still a bit of high frequency noise on the curve - we'll use a butterworth filter to smooth it out a touch more
• use the following function: dataSmooth = tybutter(data,f,g) %f =  cutoff frequency and g = recording frequency
• example: dataSmooth = tybutter(data(:,4),50,250)
• type: hold on
• type: plot(dataSmooth,'r-')
• look at figure1. It should have a red curve showing the effect of the chosen filter cutoff against the original data
• generally the filter cutoff ranges between 10 and 80, you just have to try several cutoff frequencies until you find the one that appears to get rid of the high frequency jitters without changing the general shape of the curve
• Once you have a filter that you like, apply it to all of the data
• example: dataSmooth = tybutter(data,50,250)
• dataSmooth should have the same dimensions as data
• Save your new data using csvWithHeaders
• csvWithHeaders('fileName.csv', dataSmooth, colheaders)