parameter substitution for .four command is not implemented.

You may apply the following trick:

* fourier plus param test

.param f=9k Vamp=1

Vac out 0 sin(0 {Vamp} {f} {0.5/f} 0)

.tran {1/(f*100)} {6/f} 0 {1/(f*100)}

* .four {f} v(out) $ parameter substitution in .four command not implemented!

vfreq ftemp 0 {f} $ create a voltage output vector with "frequency value as voltage"

.control

run

plot v(out)

let fnew=v(ftemp) $ create a new vector with unique name

let fvec=fnew[1] $ create a vector with a single value

echo fundamental frequency: $&fvec $ print the mean of frequency value

fourier $&fvec v(out) $ use this value

.endc

.end

Regards

Holger