does PHP have a function like matlab's linspace? -


i want execute following code in php

linspace(1,7,4); 

i want have linear array list output.

function linspace($i,$f,$n){     $step = ($f-$i)/($n-1);     return range ($i,$f,$step); }  $test = linspace(0,3.14159,8);  print_r($test); 

i have written own in minutes. please test out.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -