|
|
determine row for ode45 data
hi,
probably a stupid question but i can't seem to find the solution
suppose if i have
--------------------------------------------------------------------------------------------------------
function dydt = dydt2DOF(Time,Y)
xddot1=(-c*(Y(2)-Y(4))-k*(Y(1)-Y(3)))/m;
xddot2=(-c*(Y(4)-Y(2))-k*(Y(3)-Y(1))+kt*(road-Y(3)))/mw;
dydt = [Y(2);xddot1;Y(4);xddot2];
--------------------------------------------------------------------------------------------------------
and the main program
[time_hist1, state_hist1] = ode45(@dydt2DOF,Time,Y0);
---------------------------------------------------------------------------------------------------------
my question is how many samples it compute ? ie the size of the data .. basically it has 2 columns (time hist and state hist) but i'm not sure how many rows there are as i need to use the number of rows to do some calculation. Is there any command to determine the size ?
Thanks a lot
|
|
0
|
|
|
|
Reply
|
Azrul
|
4/14/2010 2:00:05 PM |
|
"Azrul " <azrul.afifi@gmail.com> wrote in message
news:hq4hp5$5ec$1@fred.mathworks.com...
> hi,
> probably a stupid question but i can't seem to find the solution
>
> suppose if i have
> --------------------------------------------------------------------------------------------------------
> function dydt = dydt2DOF(Time,Y)
>
> xddot1=(-c*(Y(2)-Y(4))-k*(Y(1)-Y(3)))/m;
> xddot2=(-c*(Y(4)-Y(2))-k*(Y(3)-Y(1))+kt*(road-Y(3)))/mw;
>
> dydt = [Y(2);xddot1;Y(4);xddot2];
> --------------------------------------------------------------------------------------------------------
> and the main program
>
> [time_hist1, state_hist1] = ode45(@dydt2DOF,Time,Y0);
> ---------------------------------------------------------------------------------------------------------
>
> my question is how many samples it compute ? ie the size of the data ..
> basically it has 2 columns (time hist and state hist) but i'm not sure how
> many rows there are as i need to use the number of rows to do some
> calculation. Is there any command to determine the size ?
I don't know ... is there some way to compute the SIZE of a matrix in
MATLAB?
If you're looking to determine the number of rows in time_hist1, use
size(time_hist1, 1).
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
|
0
|
|
|
|
Reply
|
Steven
|
4/14/2010 2:26:00 PM
|
|
|
1 Replies
237 Views
(page loaded in 0.031 seconds)
Similiar Articles: How to determine shape of data from mysql Stored Procs - comp ...remove any commas/data from mysql? - comp.databases.mysql ... determine row for ode45 data - comp.soft-sys.matlab How to determine shape of data from mysql Stored Procs ... getting error during solving nonlinear differential equation by ...can some one try to find out the way to get rid of it thanks in advance.... ... differential equation by ... can some one try to find ... determine row for ode45 data - comp ... find row that contains special values - comp.soft-sys.matlab ...determine row for ode45 data - comp.soft-sys.matlab find row that contains special values - comp.soft-sys.matlab ... find row that contains special values - comp ... Find position of number in matrix - comp.soft-sys.matlab ...Given a matrix m, where m=ones(y,x). let us have a random integer, w, be generated from the interval 1 to y*x ¿How can i determine the [col row] p... Re: Simultaneous Nonlinear Data Fits - comp.soft-sys.math ...> Hello everyone, > > A small statement of my problem: I have 4 data sets consisting of > spectroscopic data (intensity vs frequency data). The d... finding values in columns and returning the rows - comp.soft-sys ...... 9 6 is there a way I can do this with out looping through the data, I am going ... finding values in columns and returning the rows - comp.soft-sys ... find row that ... Calculating mean values from data with NaN`s - comp.soft-sys ...The data matrice contains time serie in the first column and some measurment data ... NaN`s - comp.soft-sys ... remove row if contains NaN - comp.soft-sys.matlab find row ... solving 2nd order differential equations by ode45 - comp.soft-sys ...... and finding parameters ... solving 2nd order differential equations by ode45 - comp.soft-sys ... using lsqcurvefit to fit an ODE to data and finding parameters ..... find ... using lsqcurvefit to fit an ODE to data and finding parameters ...... solving a simple ODE like "y'=-k*y" and use "lsqcurvefit" to find k by fitting the ODE to some data. ... fit an ODE to data and finding parameters ... lsqcurvefit with ODE45 ... Extract data from cell using matrix of index points - comp.soft ...find row that contains special values - comp.soft-sys.matlab ... Extract data from cell using matrix of index points - comp.soft ... find row that contains special values ... ode23, ode45, ode113, ode15s, ode23s, ode23t, ode23tb - Solve ...ode23, ode45, ode113, ode15s, ode23s, ode23t, ode23tb - ... Each row in Y corresponds to the solution at a time ... parameters defined only through the set of data points ... How to: Locate a Specific Row in a DataTableMost applications that consume data need to access specific records that satisfy some kind of criteria. In order to find a particular row in a dataset, you can invoke ... 7/28/2012 9:01:07 AM
|
|
|
|
|
|
|
|
|