Total members 11663 |It is currently Thu Sep 21, 2017 9:31 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





linear interpolation array c++ similar to the linspace function of Matlab.
cpp code
std::vector<double> ClassName::linspace(double a, double b, size_t N) {
double h = (b - a) / static_cast<double>(N-1);
vector<double> xs(N);
vector<double>::iterator x;
double val;
for (x = xs.begin(), val = a; x != xs.end(); ++x, val += h)
*x = val;
return xs;
}




_________________
Sami
PHD student - SAIL - School Of Computing
Queens' University
Canada


Author:
Site Admin
User avatar Posts: 33
Have thanks: 1 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : linear interpolation array c++
 AES -S-BOX Linear Algorithm implementation-substitution box     -  
 Variable interpolation     -  
 Nearest neighbor interpolation in C++     -  
 Array difference for associate array     -  
 compare an array with another array?     -  
 Array Passing     -  
 array unshift     -  
 Add elements to the end of an array     -  
 Get array chunk     -  
 XML Document into an Array in php     -  










Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team