This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<sbml level="3" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core"> | |
<model extentUnits="mole" timeUnits="second"> | |
<listOfUnitDefinitions> | |
<unitDefinition id="per_second"> | |
<listOfUnits> | |
<unit kind="second" exponent="-1" scale="0" multiplier="1"/> | |
</listOfUnits> | |
</unitDefinition> | |
<unitDefinition id="litre_per_mole_second"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int main(){ | |
int n; | |
long long min_diff=10e7; | |
long long current_diff=0; | |
cin>>n; | |
vector<long long> arr(n); | |
for (int i=0;i<n;i++) | |
cin>>arr[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<sbml level="3" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core"> | |
<model extentUnits="mole" timeUnits="second"> | |
<listOfUnitDefinitions> | |
<unitDefinition id="per_second"> | |
<listOfUnits> | |
<unit kind="second" exponent="-1" scale="0" multiplier="1"/> | |
</listOfUnits> | |
</unitDefinition> | |
<unitDefinition id="litre_per_mole_second"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ios_base::sync_with_stdio(false); cin.tie(NULL);//used for fast input output | |
--scanf,printf is faster than cin,cout but we can use cin,cout and achive the same speed | |
//ios_base :: sync_with_stdio(false):It desynchronize all the C++ standard streams with their corresponding standard C streams | |
//cin.tie(NULL) :tie() is a method which simply guarantees the flushing of std::cout before std::cin accepts an input. | |
This is useful for interactive console programs which require the console to be updated constantly | |
but also slows down the program for large I/O. The NULL part just returns a NULL pointer. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%DSB-C modulation | |
Am=5; %amplitude of message signal | |
Ac=10; %amplitude of carrier wave | |
m_i=Am/Ac; %modulation index | |
fm=100; %frequency of message signal (Hz) | |
fc=1500; %frequency of carrier wave (Hz) | |
F=10000; %sampling frequency (Hz) | |
T=1/F; | |
t=0:T:0.05; %time vector | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%Hilbert function | |
F = 10000; %sampling frequency(Hz) | |
t = 0:1/F:0.05; %time vector | |
x= 5*cos(2*pi*300*t); %given signal | |
x_h=hilbert(x); % Hilbert function of x(t) | |
figure(1); | |
plot(t,real(x_h),t,imag(y)); | |
%Plot real and imaginary part of Hilbert function | |
xlabel('t(sec)'); ylabel('X_h(t)'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%FM modulation | |
Ac=10; %amplitude of carrier wave | |
fm=10; %frequency of message signal (Hz) | |
fc=1000; %carrier frequency (Hz) | |
F=10000; %sampling frequency (Hz) | |
kf=800; %frequency sensitivity | |
mi=kf/fm; % modulation index | |
T=1/F; | |
t=0:T:0.1;% time vector | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%SSB-SC modulation | |
Am=5; %amplitude of message signal | |
Ac=10; %amplitude of carrier wave | |
fm=200; % frequency of message signal (Hz) | |
fc=10*fm; %frequency of carrier wave (Hz) | |
F=10000; %sampling frequency (Hz) | |
T=1/F; | |
t=0:T:0.025; %time vector | |
%1.Message signal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%DSB-SC modulation | |
Am=5; %amplitude of message signal | |
Ac=5; %amplitude of carrier wave | |
fm=100; %frequency of message signal(Hz) | |
fc=1500; %frequency of carrier wave (Hz) | |
F=10000; %sampling frequency (Hz) | |
T=1/F; | |
t=0:T:0.1; %time vector | |
%1.Message signal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Interfacing Arduino with DHT11 humidity and temperature sensor | |
// include LCD library code | |
#include <LiquidCrystal.h> | |
// include DHT library code | |
#include "DHT.h" | |
#define DHTPIN 8 // DHT11 data pin is connected to Arduino pin 8 | |
// LCD module connections (RS, E, D4, D5, D6, D7) | |
LiquidCrystal lcd(7, 6, 5, 4, 3, 2); | |
#define DHTTYPE DHT11 // DHT11 sensor is used | |
DHT dht(DHTPIN, DHTTYPE); // Initialize DHT library |
NewerOlder