Unformatted text preview: %el. %Here is an example of what you might like to accomplish: %At the beginning (t=0) you want to start at az = -37 and el = 30. %After 3 seconds you want to view az = -85, el = -30. %At 8 seconds you want to be looking at az=-134, el = 50. %Finally, after 12 seconds you want to end at az = -165, el = 78. %Use spline to create the az and el vectors for swivelCamera. az and el %are functions of t. t should contain begin at the minimum time and end %at the maximum time from your structure, and your time values should be %delta t apart. %It may be necessary to sort the structure by time before interpolating. [num pos] = sort([stru.t]); %gets the numbers and positions of the values in the field t stru = stru(pos); %indexes only th random = ((stru(end).t-stru(1).t)./chngt)+1; time2 = linspace(stru(1).t,stru(end).t,random); vecaz = spline([stru.t],[stru.az],time2); vecel = spline([stru.t],[stru.el],time2); end...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.
- Spring '08