Mean and effective value of a function over one period
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Randy Marsh
 am 25 Apr. 2017
  
    
    
    
    
    Kommentiert: Star Strider
      
      
 am 25 Apr. 2017
            How to compute mean and effective value of a function s(t)=2cos(2pi*f*t) for f=5Hz over one period, with discretization step 0.001?
Code for plotting discrete function:
t=0:.001:.25; %random interval
x=2*cos(2*pi*5*t);
stem(x);
0 Kommentare
Akzeptierte Antwort
  Star Strider
      
      
 am 25 Apr. 2017
        The ‘mean’ value is just that:
mean_x = mean(x);
I don’t know what you intend by ‘effective value’. If you mean RMS, it’s the square root of the mean of the squared value of the signal:
RMS_x = sqrt(mean(x.^2));
4 Kommentare
  Star Strider
      
      
 am 25 Apr. 2017
				I don’t have the DSP System Toolbox, so if it’s necessary to use it to find out what’s wrong, I can’t.
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Time Series finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

