function noisy_voltage

%%This function will attempt to generate a series of voltage sources for
%%Spice such that the output over a short time looks noisy

file=fopen('C:\MATLAB6p5\work\electronics\noisy_voltage.txt','w');

for i=1:1:100
    
    freq=1000*rand(1);
    Amp=rand(1);
    Phase=90*rand(1);
    number_of_cycles=1000*rand(1);
    
    fprintf(file,'V%0.0f 0 Out Sine(0 %0.4f %0.0f 0 0 %0.5f %0.0f) Rser=1\n', i,Amp,freq,Phase,number_of_cycles);
    %%Print to the file Sine(Voffset=0 Amp=random Freq=freq Td=0
    %%Theta=0 Phi=phase Ncycles=1000)
end

fclose(file);