问题描述:

I have a function file with my differential equations, I am performing a ode23s on the function in the standard form i.e

[t,m]=ode23s('DE_function',tspan,[mA pA mB pB mC pC mD],optionsDE,p)

I obtain about 150 values/results/output for each mA and so on. My ode23s is working fine.

I have experimental dataset for the same mA and so on which i have to use to calculate the least squared error.. i am trying to do this:

a = m(:,1) - A(:,2); and so on. Here in my experimental data, I have just 20 values/results/outputs etc according to 20 time points. I have defined the same time points for the tspan as well. But since my matrices do not match in dimension, i am unable to proceed with my calculations. Is there a way to receive exactly 20 values according to the 20 time points such as 1, 2, etc in the ode23s as well, or may be a way to get and store them only.

I have been trying to find a solution for this error but unable to find anything suitable. Many thanks for any kind of suggestions and hits.

The Matlab documentation has all you need. When you call ode23 you can specify the time locations in tspan.

"Interval of integration, specified as a vector. At minimum, tspan must be a two element vector [t0 tf] specifying the initial and final times. To obtain solutions at specific times between t0 and tf, use a longer vector of the form [t0,t1,t2,...,tf]. The elements in tspan must be all increasing or all decreasing."

您可能感兴趣的文章：

- vb.net - ListBox mnemonic default behaviour
- sql server - SQL get values for only a few hours in given time period?
- html - Link click form submit and go to link together
- rcpp - Current Working Directory for Header Files C++
- javascript - Changing the class of the next() element is changing the class of the last sibling using jQuery
- php - Reading a specific line from a text file
- clr - Any implementation of an Unrolled Linked List in C#?
- Finding Hudson Log Files
- Forward to a payment-gateway together with POST data using cURL (or any other PHP server side solution)
- WCF in Winforms app - is it always single-threaded?

随机阅读：

**推荐内容**-

**热点内容**