Total members 11895 |It is currently Wed Dec 18, 2024 3:18 pm 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++
 Variable interpolation     -  
 Nearest neighbor interpolation in C++     -  
 AES -S-BOX Linear Algorithm implementation-substitution box     -  
 Build Linear Regression in Python - Supervised Learning     -  
 Array difference for associate array     -  
 compare an array with another array?     -  
 Imploding an Array     -  
 Array Passing     -  
 array unshift     -  
 Add elements to the end of an array     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com