Matlab Help

Archived from the original Sajha.com — preserved as posted, replies can no longer be added here.
Start a New Discussion
Archived Post

I have to join two tables using matlab code. Table A                                                                                                          Table B Time                          BPM                                                                                    Time                     Velocity                            Acceleration          BBB 101                              78                                                                                          100                        1                                     1.2                             2 102                               46                                                                                          100.9                     2                                    1.5                              3 103                               32                                                                                           101.2                    3                                     1.6                             4 104                                43                                                                                           102.1                    4                                     1.8                              5 105                                100                                                                                          103.5                   5.5                                   2                               6 106                                102 I need to join table B with Table A with refrence to time. Since the time is not same interval, each data in table has to be interpolated to match with time of table A.  The final table is Table A with with new columns with  interpoltaed Velocity, acceleration, BBB corresponding to time in table B. Please help, hoe to do it using Matlab codes? Thanks

daurasurwal · Oct 27, 2011 8:12 PM · 15,648 views

4 Replies

 ur table messed up .. can u give me the link of the original problem?

AlterEgo · Oct 28, 2011 12:12 AM

 Format your table properly then i think i can help you ! Last edited: 28-Oct-11 01:23 AM

sukuchha · Oct 28, 2011 1:23 AM

daurasurwal · Oct 30, 2011 2:01 AM

 @Sunil  I ve assumed that time is only the independent variable and all other parameters depends solely on time.  I ve done for velocity and acceleration and you can complete BB and DD. I ve used cubic spline algorithm (it fits the cubic polynomial betn the spaced data). %% 1D Cubic Spline interpolation of tabulated data  % By Alter Ego @ 10/30/11 % Vel., Acc, BB and DD are assumed to be dependend solely on time    time = [99.9 100.5 101.8 102.7 103.9 104.8 105.6 106.1 106.5 106.8 107.3 107.9 110.2 111.5 112.8]; velocity = 2:2:30; acceleration = 3:2:31; timei = 100:112; velocityi = spline(time, velocity, timei); accelerationi = spline(time, acceleration, timei);   %% New table    bpm = [87 88 85 86 86 78 98 87 85 86 86 78 98];  newtable = [timei' bpm'  velocityi'  accelerationi'];  

AlterEgo · Oct 30, 2011 9:10 AM

This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.

Start a New Discussion

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all