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
function norm = norm2unity(input) | |
norm=(input-min(input))/(max(input)-min(input)) | |
end |
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
function [pks,locs,index] = PeaksIndices(Y1,X1) | |
[pks,locs] = findpeaks(Y1,X1); | |
for i=1:length(pks); | |
index(i)=find(Y1==pks(i) & X1==locs(i)); | |
end | |
end |
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
import numpy as np | |
def clipping(data): | |
temp = data | |
cond_zero = (temp <= 0.7) & (temp <= 1.5) | |
cond_one = (temp >= 0.7) & (temp >= 1.5) | |
temp[cond_zero] = 0 | |
temp[cond_one] = 1 | |
return temp |
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
import numpy as np | |
def indices(CH, time): | |
k = 0 | |
i = 0 | |
T = [] | |
while i < (len(CH) - 2): | |
if CH[i] == 0 and CH[i + 1] == 1 and CH[i + 2] == 1: | |
T.append(time[i + 1]) | |
k = k + 1 |
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
def Uaddition(Ux,Uy): | |
import numpy as np | |
return np.sqrt(Ux**2 + Uy**2) | |
def Ufraction(X,Ux,Y,Uy): | |
import numpy as np | |
return np.sqrt((Ux/Y)**2 + ((X*Uy)/(Y**2))**2) |
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
function m = Matrix(Phi,Z) | |
Limit=length(Phi); | |
M1=[1 0;0 1]; | |
for j=2:Limit | |
M{j} = [cosd(Phi(j)) (1i*sind(Phi(j)))/Z(j) ; 1i*Z(j)*sind(Phi(j)) cosd(Phi(j))]; | |
M1=M1*M{j}; | |
end | |
m=M1; | |
end |
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
//TrapozoidRule | |
#include<iostream> | |
#include<cmath> | |
#define f(x)(sin(x)) | |
using namespace std; | |
int main() | |
{ | |
float a,b,sum,n,h; | |
int i; | |
cout<<"Enter Initial Limit of x (a):"; |
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
//Simpson's1/3rule | |
#include<iostream> | |
#include<cmath> | |
#define f(x)(sin(x)) | |
using namespace std; | |
int main() | |
{ | |
float a,b,sum,n,h; | |
int i; | |
cout<<"Enter Initial Limit of x (a):"; |
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
///2x2 Matrices Multiplication | |
#include<iostream.h> | |
#include<conio.h> | |
void main() | |
{ | |
clrscr(); | |
int a[5][5],b[5][5],c[5][5],m,n,p,q,i,j,k; | |
cout<<"Enter rows and columns of first matrix:"; | |
cin>>m>>n; |
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
''' | |
File name: PhysPlot.py | |
Authors: Muhammad Shiraz Ahmad and Sabieh Anwar | |
Date created: 8/20/2019 | |
Date last modified: 1/13/2020 | |
Script Version: 1.1.3 (Stable) | |
Python Version: 3.7.3 | |
https://github.com/MShirazAhmad/PhysPlot | |
''' | |
import webbrowser |
OlderNewer