Very simple command to best fit using gnuplot

How calculate and plot a linear best fit using gnuplot with only a subset of data-file?
to generate an output like this:


you should use a command such:
f(x) = a * x + b
fit f(x) "datafile.data" every ::15:0:30:0
plot "datafile.data" ,  f(x)

It means that gnuplot perform the best fit calculation only for data from row 15 to row 30.

May be usefull select visually the subset of data to fitting in this way:
plot "datafile.data" every ::15:0:30:0 , ""


different color help you to select the desired subsection without modify the original data-file.

How make quick histogram using gnuplot [data elaboration]

Make an histogram using gnuplot isn't very simple if you have raw data (not collected in classes).
Here we show a quick and easy way to create and draw an histogram using gnuplot starting from raw data.

This is the command you have to use:

bw = 2   #substitute what you want
bin(x,width)=width*floor(x/width)
plot 'data.dat' using (bin($2,bw)):(1.0) smooth freq with boxes

And this is the output:



file "data.dat" exemple:
1 1
2 3
4 12
5 6
.....

[Via: http://www.nabble.com/gnuplot-histograms-td15811193.html]

Risolto: Cambiare MAC address macbook unibody snow leopard

Sebbene la procedura per cambiare il MAC address della scheda AirPort sia presente su un numero elevatissimo di siti, questa non risulta funzionante per numerosi macbook (pro e non) prodotti nel 2010.

Riporto qui la variante corretta che risulta funzionante anche sui macbook 2010.
0. Aprire il terminale
1. Controllare il MAC address digitando il comando:
ifconfig en1 | grep ether
2. Mantenere la scheda Airport accesa, ma disconnessa da qualunque network wifi (cliccare l'icona Airport, “Accedi ad un'altro Network,” inserire un nome a caso, e premere "cancella" mentre avviene la ricerca del network fasullo).
4. Digitare sul terminale :
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -z


5. Ancora nel terminale, modificare il MAC address con un comando del tipo:
sudo ifconfig en1 ether  00:00:00:00:00:00
(00:00... va modificato con il MAC address che volete)
6. Verificare che il nuovo MAC address sia stato correttamente inserito:
ifconfig en1 | grep ether

Il punto 4 è quello che manca su molte guide ma che rende funzionante la procedura.
A volte è necessario riprovare più volte la procedura (non va sempre a segno).