text
stringlengths
8
6.12M
function nomenclature = nomenclature(knowledge_instance) % NOMENCLATURE - Theoretic table of instrument families, folders, and % symbols. It may contains instruments that are NOT in the current % database, in order to help the user when adding new instrument (hopefully % avoiding errors when naming file and folders). ...
clear; close all; A = imread('coins.png'); imshow(A) [m,n]=size(A) % Find all the circles with radius r pixels in the range [15, 30]. [centers, radii, metric] = imfindcircles(A,[15 30]); [centers, radii, metric] % [CENTERS, RADII, METRIC] = imfindcircles(A, RADIUS_RANGE) finds circles with % radii (in pixels...
function [vecXi, vecE] = fun_IPF(der,x0,iteraciones) dx = der(x0); ea(1) = 100; vecXi = nan(iteraciones,1); vecE = nan(iteraciones,1); for i=1:iteraciones xi = dx; ea(i) = (abs(xi-x0)/xi)*100; vecXi(i) = xi; vecE(i) = ea(i); x0 = xi; dx = der(x0); end
% Detect People function [I] = Detect_People(I) %[FileName,PathName] = uigetfile('*.jpg;*.png;*.bmp','Pick a Rainy Image'); %if isequal(FileName,0)||isequal(PathName,0) % warndlg('User Pressed Cancel'); %else % I = imread([PathName,FileName]); % I = imresize(I,[256,380]); %end peopleDetector = vision.P...
clear all ; close all; clc; Te=2E-3; % période d'échantillonnage de la commande Delta=10; %% écart initial entre les loco au démarrage %% Initialisation du générateur de trajectoire % Génère des consignes de position et de vitesse cohérentes selon le profil % de vitesse suivant % % Vitesse % ...
%Andrew Brown Homework 9 Problem 1 clc clear %Compute the total mass (g) of the rocket compononets shown in the given %table using a dot product. %Given vlues from the table density=[0.7,6.8,2.9,4.5]; %g/cm^3 volume=[700,150,300,50]; %cm^3 %Take the dot product of the 2 matrices made and print the result dotProduct...
function [IS, omeMeta, ImSize]=imreadLif2(liffile,idx) reader=bfGetReader(liffile); %create a reader using the .lif file name as input glob=reader.getGlobalMetadata(); ser=reader.getSeriesMetadata(); javaMethod('merge', 'loci.formats.MetadataTools', ... glob, ser, 'Global '); omeMeta=reader.getMetadataStore(); n...
%The activity of each cell in the field are shown in plots and excel if exist(fullfile([folder_name_wr,'average_Image_ROIdata.mat'])) load (fullfile([folder_name_wr,'average_Image_ROIdata.mat'])); else load (fullfile([folder_name_wr,'average_selected_Image_ROIdata.mat'])); end Interval=2; Pixels=Paramete...
function sample = nevMsec2nsxSample(msec,dataFs,timeStamps,clockFs) %function to convert time of events in nev file in milliseconds to the %corresponding data sample number in an nsx file, taking into account %potential pauses. NB: this may have funny output if there is the incorrect %early samples (i.e., the nev t...
function [ u2h ] = RESTR(uh,Nc) %RESTR Summary of this function goes here % Detailed explanation goes here %I_h2H = zeros(Nc-1, 3+2*(Nc-1-1)); I_h2H = zeros(Nc-1, 2*Nc); for i=1:Nc-1 I_h2H(i,1+2*(i-1):3+2*(i-1)) = [1 2 1]; end I_h2H = I_h2H/4; u2h = I_h2H * uh; end
figure(1) clf plot(out.thetaHat_GRAD.Data(:,1),out.thetaHat_GRAD.Data(:,2)) hold on grid on plot(out.thetaHat_DREM.Data(:,1),out.thetaHat_DREM.Data(:,2)) plot(b,a,'.c','MarkerSize',30) legend("Grad","Drem","Obj"); xlabel('Theta1 / b') ylabel('Theta2 / a')
%% log-log plot for summing the series $\frac{1}{N}$ % We want to calculate the term: % % $$d = \frac{|S_{UP} - |S_{DOWN}|}{|S_{UP}| + |s_{DOWN}|}$$ % % And then plot $d$ for varying $N$ %% % First, set up a vector of $N$ ranging from $10^3$ to $10^7$ N = round(logspace(3, 4, 100)); %% % Next, we know we'll have _as...
function [q_next, qp_next, qpp_next, M_bar] = R_dynamics (q, qp, qpp, PARAMS) % Multibody solve with R_dynamics + trapezoidal integrator % Prediction z = q(5); zp = qp(5); zpp = qpp(5); dt = PARAMS.dt; %--------------------------------- % Integracion por Forward-Euler z_next = z + z...
clear all close all fclose all %% All data 0-9 data = zeros(28^2, 1000, 10); size_data = 100; for n = 1:10 filename = ['data' num2str(n-1)]; fid=fopen(filename, 'r'); % open the file corresponding to digit 8 for i = 1:size_data data(:, i, n) = reshape(fread(fid, [28 28], 'uchar'), 28^2, 1); end en...
function result = f_utm2deg(xx,yy,utmzone) % - convert vectors of UTM coordinates into Lat/Lon vectors (WGS84) % % USAGE: result = f_utm2deg(x,y,utmzone); % % Inputs: % x, y , utmzone. % % result = structure with the following fields: % .lon = Longitude vector. Degrees. +ddd.ddddd WGS84 % .lat = Latitude vecto...
% Examples for cell to sparse matrix catenation. % Copyright 2008-2009 Levente Hunyadi function example_sparse aa = speye(10,15); ab = speye(20,15); ac = speye(30,15); ba = speye(10,25); bb = speye(20,25); bc = speye(30,25); c = { aa, ba ; ab, bb ; ac, bc }; s = cell2sparse(c); spy(s);
function out = dv_map(in) out = bwdist((in),'chessboard'); %figure, imshow(uint8(out)); end
% Social Signal Processing from hand images to predict human social behavior % Written by Soumajyoti Sarkar as part of the % Final year BE project under Dr. Jaya Sil % at Indian Institute of Engineering Science and Technology, Shibpur clc clear all %Parameters for PHOG descriptor bin = 8; angle = 360; L=3; num_ge...
function [b]=polreduc(bb) % usage: function b=polreduc(bb) % % polclr justerer ordenen af polynomiet bb og placerer % resten (med justeret orden) i b % % Programmed 1994 by Niels K. Poulsen % Department of Mathematical Modelling, % Technical University of Denmark % small=1.0e-7; m=length(bb); % --...
% largely drawn from run_readlsl of BCILAB function lslin(handles) % find stream result = lsl_resolve_bypred(handles.lsllib, ['name=''' handles.streamName '''']); % open inlet inlet = lsl_inlet(result{1}); % info = inlet.info(); % create online stream data structure in base workspace (using appropriate meta-data) on...
%Dönem Sonu Projesi 2 clear all; pkg load image; A1 = imread ('C:\Users\HP\Desktop\GoruntuIsleme\yesiltop7.jpg'); figure 1,imshow(A1); title('İlk Hali'); A2 = rgb2hsv(A1); sat=size(A2)(1); sut=size(A2)(2); A=uint8(255*A2(:,:,1)); esik=48; A3=0; for i=1:sat for j=1:sut if A(i,j)>esik A3(i,j)=1; else A3...
function [translations] = findTranslations(frames) NUM_FRAMES = size(frames, 4); translations = zeros(NUM_FRAMES-1, 2); % Each Frame: for i = 1:NUM_FRAMES - 1 % Obtain Homography: [H ~] = getHomography(frames(:, :, :, i), frames(:, :, :, i+1)); ...
function [Fs,Vs]=subtri(F,V,n,uniqueOpt) % function [Fs,Vs]=subtri(F,V,n) % ------------------------------------------------------------------------ % Sub-triangulates the triangles defined by the patch format data F (faces) % and V (vertices). Creates n addition points on the edges of the initial % triangles, t...
function u = LapDeval_panels(tpan,span,dens,paninfo) % LAPDEVAL_PANELS evaluate Laplace DLP from surface in R3, incl on-surface % % u = LapDeval_panels(t,s,dens,paninfo) % % Called with no arguments does a self-test (see bottom of code for usage) % % s,t are src and targ panel cell arrays. t doesn't need valid t.inds ...
function [] = q6(theta1,theta2,model) close all; data = load('2015Assign1_1.txt'); t = data(:,1); y = data(:,2); n=400; ind = 20; l_s = pi*5; H = shaw(n); %% case 1 Nugget Effect R = theta2*eye(n); Q = theta1*eye(n); X = ones(n,1); [s1,V1,lamda1,mu1] = GenLinInv(y,H,R,X,Q); % plotresult(t,s,s_true,61); %% case 2 Lin...
clear all; load ECGdata2.txt; s = ECGdata2(:,1); input = s(1:15000); %rate = s(100); sig = input; lensig = length(sig); figure(1); plot(sig); title('signal2'); [C2,L2] = wavedec(sig,8 ,'bior3.5'); CA8 = appcoef(C2,L2,'bior3.5',8); CD1 = detcoef(C2,L2,1); CD2 = detcoef(C2,L2,2); CD3 = detcoef(C2,L2,3); ...
cd('C:\shared\badger\Test Nicolas 2015-09-23\nic') ; close all ; clear all ; ls mongs = dir('*vhdr') ; for i=1:length(mongs) ; EEG = pop_loadbv('.',mongs(i).name) ; EEG = pop_chanedit(EEG,'lookup','C:\eeglab10_0_0_0b\plugins\dipfit2.2\standard_BESA\standard-10-5-cap385.elp') ; EEG = denoise_grad(EEG...
format compact clc str = 'This is a string'; fprintf('Length: %d\n',length(str)); fprintf('Char at 2: %c\n', str(2)); fprintf('String from 11 to 16: %s\n', str(11:16)); % fucntion used to concat strings str = strcat(str, ' concat'); fprintf('New String after strcat: %s\n', str); % function used to find all index th...
% CtrlSim_SASense_fit_func_vectorized function fError = CtrlSim_FASense_fit_func_vectorized(x) % Fitness function for calculating the RMS error of individual in % population compared to reference signal (x over time) % Vectorized version of function % For non vectorized, use: CtrlSim_HFOV_fit_func(...
function r = rossd3fdx2dp(t,fd_cell,p) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % rossd3fdx2dp % % The third derivative of the Rossler equations with respect to % x (twice) and p (once) at times t. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %r = zeros(...
%二阶有自衡对象辨识 clc; clear all; close all; load soutj2; Y1=Y; [lp,m]=size(Y1); if m>lp lp=m; end % [v1,v2,v3,v4,v5,v6,v7]=value(Y1,dt); % ys=v6; ys=0; for i=lp-50:lp ys=ys+Y1(i); end ys=ys/50; k=ys; da=zeros(lp,1); for i=2:lp da(i)=(Y1(i)-Y1(i-1))/dt; end da(1)=da(2); [d,pp]=max(da...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %PREDICTTESTING Predict the out of testing data % PREDICTTESTING(X) returns the output of a testing data. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [predict] = predictTesting(testing, mu,...
function predict_label = noise_classification(sfr) %% feature extraction for noise classification [wpt,N] = pwpdsub(sfr); t = 1; for i=1:length(N) coef = abs(wpcoef(wpt,N(i))); fe(t) = mean(coef); t = t+1; fe(t) = std(coef); t = t+1; fe(t) = entropy(coef); t = t+1; en...
function [ verr,dw ] = CG_weight1( w,v0,vtarget ) %UNTITLED2 Summary of this function goes here % Detailed explanation goes here N = size(v0,1); vout=cell(size(w,1)+1,1); vout{1,1}=v0; for wi=1:size(w) vout{wi+1,1} =[vout{wi,1},ones(N,1)]*w{wi,1}; end verr = sum(sum((vtarget-vout{end,1}).^2 ))/N; dw=cell(size(w,1...
% 簇心数目k K = 6; % 准备数据,假设是2维的,80条数据,从data.txt中读取 %data = zeros(100, 2); load 'data.txt'; % 直接存储到data变量中 x = data(:,1); y = data(:,2); % 绘制数据,2维散点图 % x,y: 要绘制的数据点 20:散点大小相同,均为20 'blue':散点颜色为蓝色 s = scatter(x, y, 20, 'blue'); title('原始数据:蓝圈;初始簇心:红点'); % 初始化簇心 sample_num = size(data, 1); % 样本数量 ...
function [ A ] = build_matrix_2D( u ) %builds the sparse matrix based on u at time n %for 1D is a 5 banded matrix %in first edit, we will use 'if' statements to make matrix even though it's %slow. global Ca M Cg dt dx dx2 dx4 L Nx Ny dy dy2 dy4 NN=(Nx-1)*Ny; %length of the matrix (number of unknowns) nn=Nx-1; %dim ...
function [Xtrain, ytrain, Xval, yval, Xtest, ytest] = partitionFeatures(X, y, labels) % We really want to base our sample selection off of labels. Keep tallys, % and partition X according to desired proportions. % Desired proportions for the Xtrain, Xval, and Xtest sets % respectively according to X: 60...
classdef RungeKutta properties grid; A; b; s; N; d; x0; solx; soly; solp; solkhi; end methods function obj = RungeKutta(grid, A, b, s, x0, N, d) obj.g...
function plot_monthly_ts(yn) plot(1:12, yn) % legend('Num'); set(gca,'xtick',(1:1:12)); set(gca,'XTickLabel',{'Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec'}) xlim([1 12]) %title('Number Time series'); xlabel('Time(mon)'); % ylabel('Number of MCS'); grid on set(gca, 'GridLineStyle' ,'--') %...
function cond_front=ffront(ya,yb) % Functie care determina conditiile de frontiera la o % ecuatie diferentiala ordinara % Initializarea vectorului cond_front in vederea % formarii unui vector coloana cond_front=zeros(2,1); % Implementarea conditiilor de frontier...
clear all clc % import the data of normal ECG %temp = fopen('nsr180_data.csv'); temp = fopen('C:\Users\User\Documents\GitHub\ECG_classification\final_version_data\data_nsr180.csv'); normalRaw = textscan(temp, '%s', 'Delimiter',','); % fix some formatting issue temp = normalRaw{1,1}{1}; %temp = temp(3:end); temp = temp...
%% Inverter Numeric State-Space Model % ######################################################################## % Calculate numeric state matrix of an inverter % Input: % - [obj] inverter parameter % - [obj] control parameter % - [obj] grid parameter % Output: % - [obj] state-space model % E...
% % Author: Tiago Mendes; % University of Aveiro - September 2019 % clear all; close all; clc; Ta = 1/25; % Tempo de amostragem em segundos x1 = [-5:Ta:5]'; x2 = [-5:Ta:5]'; t = [0:Ta:5]'; r = zeros(length(x1), length(x2)); for n = 1:length(t) tic; for i = 1:length(x1) r(i, :) = 2*sin(2*pi*(sqrt(x1(i)^2 + x...
clear all; close all; clc ig = imread('hanoi_01_01.png'); roda = imrotate(ig,-33); ##figure, imshow(roda) rect = [278 355 445 200]; rodaCrop = imcrop(roda, rect); ##figure, imshow(rodaCrop) rectP1 = [59 10 20 110]; Pino1 = imcrop(rodaCrop, rectP1); ##figure, imshow(Pino1) rectP2 = [204 78 20 120]; Pino2 = ...
function [F] = Faces() % This function returns an array filled in by the user. Every row of the array % contains the vertices of a face. % % Copyright Julian Lopez-Uricoechea & Kenny Breuer, Brown University 2019 % % assign number values stored as the names of the points so that they can % be easily referenc...
function [F] = make_animation(kspan,span,fig,base_fig,output,FileName,FH) % animation 表示用 % kspan : 描画する離散時間配列 % span : 描画対象とするagentのインデックス配列 % fig : 各時刻の描画を行う関数 % fig(k,span) % k : 時刻 % base_fig : 背景描画を行う関数 arguments kspan (:,:) double span {mustBeInteger} fig base_fig output = 0 ...
clc close all hidden; clear all hidden; sd = [4 3.8 2.8]; p = [10 30 50]; g = [0.8 0.95 1]; for ii = 1:3 x = -60:0.1:60; y = p(ii)*2*(rand(size(x))-0.5); sbox(ii) = std(y); indx = min(x):max(x); N = hist(y,indx); N = N./sum(N)/1; y = normpdf(x,0,sbox(ii)); r = g(ii)*30+sd(ii)*randn(...
function [ y ] = Lsolve( L, b ) n = length(b); for i = 1:n y(i) = b(i); for j = 1:i-1 y(i) = y(i) - L(i,j)*y(j); end end y = y'; end
function V = bridge(R,Vs) if nargin < 2 Vs = 2; end if nargin < 1 R = [1000, 1000, 1000, 1000, 1000]; end if(size(R) ~= 5) error('R incorrect size!'); end A = [1/R(1) + 1/R(3) + 1/R(4) -1/R(3) -1/R(3) 1/R(2) + 1/R(3) + 1/R(5)] b = [Vs/R(1); ...
%Varies parameters of stress_2d_ode, and plots time strain graphs in a %subplot. clear all forcevec = logspace(-1.5,-1 ,3); %Tvec = [0 20 100]; T = 0; etavec = logspace(-2,0,17); alphavec = logspace(-2,0,17); tend = 200000; f = length(forcevec);g = length(etavec);a = length(alphavec); L = f*g*a; straincell = cell(1,L)...
function DrawEllipse(x, y, xR, yR) t=-pi:0.01:pi; x=x+xR*cos(t); y=y+yR*sin(t); plot(x,y, 'MarkerFaceColor', 'r');
function [yerror] = kernel_linear_estimate_error(y,ypred) yerror = (norm(y-ypred'))^2/length(y); end
function [vStart, vEnd, wStart, wEnd, mol_for_fit,mol_for_spec] = ... F_define_windows(target_gas,windowID) % This function outputs parameters for different fitting windows % mol_for_fit is name of mol included in the fitting, % should include isotope like 'HDO' % mol_for_spec is cell of strings of mol for spectro...
function [stiff,mass,A1,B1,A2,B2] = saldoGalerkin(metric,Dx,x0,xq,wq,jac,g11,g12,g22) % Stiffness matrix from Laplacian given a metric % Assumes oversampled coefficients % Also returns nearest Kronecker product approximation m=size(Dx,1); vol=diag(wq)*( metric.*jac)*diag(wq); C11=diag(wq)*( metric.*g22./jac)*diag(wq)...
function ArduinoGame % Arkanoid like game implemented with Arduino® Board. % Copyright 2012 The MathWorks, Inc. % Arduino Init % Create connection with Arduino conn = arduino('COM7'); %Input conn.pinMode(11,'output') %GUI fh = figure('Name','Arduino Game'); ah = axes('Units','normalized','Position',...
clear all ; close all ; cd c:/shared/UTE ; ls s = load_untouch_nii('res_lin.nii.gz') ; simg = double(s.img) ; gs = double(simg-imfilter(simg,fspecial('gaussian',65,300))) ; gs2 = double(simg-imfilter(simg,fspecial('gaussian',10,5))) ; % k means on every slice individually for i=1:150 ; [~,ksz(:,:,i)] = k...
%% Convert NGSIM into Multilane Spatiotemporal Data %Highway Traffic Dynamics: Data-Driven Analysis and Forecast %Allan M. Avila & Dr. Igor Mezic 2019 %University of California Santa Barbara function [Bins]=Convert_NGSIM_MultiLane(Name,DelX,DelT) tic if strcmp(Name,'101') disp('Loading NGSIM US 101 Trajectories') Data...
function X = fmp (xi, pX , N) Fx = cumsum(pX); X = zeros(1,N); for k=1:N U = rand(1,1); i = 1 + sum( U>Fx ); X(k) = xi(i); endfor end
clear all; clc % Init state variables syms alpha1 beta1 real; syms alpha1dot beta1dot real; syms L real; % Define state vector and derivative vector q = [alpha1; beta1]; qdot = [alpha1dot; beta1dot]; % Transformation function, its derivative and convective acceleration. Ti = rotx(alpha1)*roty(beta1) * [0; 0; -L]...
function AdamBashdorth_Solve % block (initial conditions) h = 0.01; Dt = 80; n = 3; A = [ 0 1 0; 0 0 1; -1/4 -3/4 -27/4 ]; Y = [0; 0; 0]; m = floor (Dt/h); t = 0; B = [0; 0; 10/4]; eig (A) % endblock (initial conditions) % block (AdamsBashforth 3rd)...
genuine_scores = rand(1,5); impostor_scores = rand(1,5); FAR_val_per = 10; pas0 = 10000; [EER confInterEER OP confInterOP] = EER_DET_conf(genuine_scores,impostor_scores,FAR_val_per,pas0,false); EER f = figure; t = uitable(f); t.ColumnName = {'Type','LMS','RLMS','IF','BPD','GD','MGD','AVG'}; t.ColumnEditable = true; d...
function saveplotlycredentials(username, api_key) % Save plotly authentication credentials. % Plotly credentials are saved as JSON strings % in ~/.plotly/.credentials % Create the .plotly folder userhome = getuserdir(); plotly_credentials_folder = [userhome '/.plotly']; [status, mess, messi...
function coords = compute_point_of_leaflet(X_flat, leaflet) % % Computes the intersection of the rays which have coordinates j,k % Works for diagonal fibers only % % Input: % X_flat 2d surface including valve ring % j,k Indices to fill % filter_params paramters for the filter %...
function [lowB, lowDGxx, lowDGxy] = getLowFieldData(handles) % Extract the conductance tensor for the low magnetic field measurements % Also return the low magnetic field values as a vector "lowB" [lowB, lowRxx, lowRxy] = selectLowFieldData(handles); [lowGxx, lowGxy] = calculateConductance(lowRxx, lowRxy); [lowDGxx, lo...
%circular convolution of a sequence close all; clear all; clc; %length of linear conv. is gn+hn-1 % a) g=[3, 4, -2, 0, 1, -4]; h=[1, -3, 0, 4, -2, 3]; % gfft=fft(g); % hfft=fft(h); %Conv=gfft.*hfft %time convolution linearA = conv(g, h); %linear convolution circularA = ifft(fft(g).*fft(h)); %circu...
function result = V2(time) %V2 %Inputs: %time: The vector which contains the time-points of the simulation. % %return: %result: The given function * here 1 * evaluates at the % time-points, specified at vector time % result = ones(length(time),1);
function [ found_food, last_pos,d ] = exhaustiveSearchInSeg( seg_indx,squirrel1,last_pos,d ) global visual_run seg cache found_food = 0; %%squirrel Moved to interested seg; seg_indx = squirrel1.getCurrSeg(); pos_w=seg(seg_indx).generateExhaustiveSearch(squirrel1,10,d); %this returns n vertices in pos_w (ignoring segm...
%% % inverse kinematics of the hybrid parallel-cartesian robot %% function robot = invk_5brobot(position) %initializing robot robot = init_5brobot(); %points Px = position(1); Py = position(2); Pz = position(3); %fixed pivots for i = 1: 2 A(i,:) = [robot.R...
clc; clear all; close all; % Name of the company: Think Soft Research; % Project Name:Straight line; % Date: Feb 8, 2019 % Time: 1:30PM x=-10:1:10; % x=input('enter the inputs'); m=input('enter the value of m='); c=input('enter the value of c='); Y=(m*x+c); disp('straight line of y='); disp(Y); % subplot(2,1,1); plo...
function [num,den] = shelf1low(G,wc) %shelf1low.m % first order low-frequency shelving filter derived in the review article: % V. Valimaki and J. D. Reiss, "All About Audio Equalization: Solutions % and Frontiers", Applied Sciences, 2016 % % INPUTS % OUTPUTS % G = Gain at low frequencies (linear, not dB) % wc...
clear clc xmin = 130; xDistance = 360; ymin = 64; yDistance = 326; %Get the video feed % vid = videoinput('winvideo', 1, 'RGB24_640x480'); % vid.ROIPosition = [xmin ymin xDistance yDistance]; % src = getselectedsource(vid); % src.FrameRate = '30.0000'; % %Now set the video input parameters. % %These values were det...
%-------------Calcule fonction transfert du systeme desiré----------------- amortissement = 0.7;% coef connue pour sa marche bien f = 50; % frequence d'echantillonnage W0 = 2*pi*f; Wn = 1/10*W0% calcule pulsation naturelle HDesire = tf(Wn*Wn,[1 2*amortissement*Wn Wn*Wn])% calcule la fonction de transfert desirée %---...
function pop = DetermineDomination( obj, pop ) npop=numel(pop); for i=1:npop pop(i).IsDominated=false; for j=1:i-1 if ~pop(j).IsDominated if obj.Dominates(pop(i),pop(j)) pop(j).IsDominated=true; elseif obj.Dominates(po...
function [quadrantStruct]=quadrant_Prepare_main(refInfo, commonData) %compute quadrant emissions %domain dimensions and other variables quadrantStruct.geomFactor=4; %quadrantStruct.radius=commonData.radius; %quadrantStruct.radius=4; DSuperSet = struct('DSet', {}); for h=1:3, DSetHorizon = struct('D', {}, 'd',...
% Contour two Gaussian D with means m1 m2 % and same covariance C = C1 = C2. numGrid = 50; m1 = [0 2]'; m2 = [1.7 2.5]'; C1 = [2,1;1,2]'; C2 = C1; xRange = linspace(-6,6,numGrid); yRange = linspace(-6,6,numGrid); P1 = zeros(numGrid,numGrid); P2 = P1; for i = 1:numGrid for j = 1:numGrid x = [yRange...
gabor_size = 400; % in pixels [gabor_ID, ~] = CreateProceduralGabor(main_window, gabor_size, gabor_size); % dunno gabor_angles1 = [95 265 95 265 90 270 90 270]; % angled & flat gabor_angles2 = [95 265 95 265 95 265 95 265]; % both angled colours = [RGB('blue'); RGB('grey'); RGB('red'); RGB('green')]; % none of...
function [Loss, gradient] = CostFuncReg(X, y, w, lambda) Loss = 0; samples = size(y,1); gradient = zeros(size(w)); % K = (X*w)./max(X*w).*5; K = 5*mapminmax(X*w); h = sigmoid(K); R = lambda/(2*samples)*sum(w(2:end).^2); Loss = (-1/samples) * sum(y .* log(h) + (1-y).* log(1-h)) + R; for i=1:1:samples gradient = gra...
function main() disp('Algorithm for Determining Grid Basis Vectors and Intensity Distribution'); close all clear all addpath('.\utils'); addpath('.\utils\base_vec_refinement'); addpath('.\utils\clustering'); addpath('.\utils\diff_vec_analysis'); addpath('.\utils\hkl_lattice'); addpath('.\utils\io_utils'); a...
% demo_grouping.m % % Demo script for the grouping algorithms, % applied to the binary interactions between odorants and receptors. % Copyright 2018 Ji Hyun Bak %% initialize clear all; clc; addpath(genpath('Code')); % add path to custom code %% load pairwise interaction data % input directory mydir = 'Data/da...
function [dgE,dgP,la_out,fi_out,la,fi] = mGlobe_Global(lonD,latD,hranice,rozlisenie,tabulka,r,treshold) %MGLOBE_GLOBAL calculate global correction % Function calculate the gravity response (loading and newton) to 1 mm % of water for given grid using spherical approximation and equation % provided by: Farrell, W....
function conc = obtain_conc(tname, sd, Ts); [T, DATA] = obtain_profile(tname, sd, 0); conc = interp1(T, DATA, Ts); end
function [FID_out,traj_out] = discard_traj_pts(FID_mat,traj) %Function to shape trajectories for Jim Pipe's Recon: %Actually, already in the correct shape, just need to make sure values are %between +/- 0.5 rad = squeeze(sqrt(traj(1,:,:).^2+traj(2,:,:).^2+traj(3,:,:).^2)); toobig = rad>0.5; %I need to keep everythi...
% Figure 3.25c Feedback Control of Dynamic Systems, 5e % Franklin, Powell, Emami % clf; zeta=.7; k=1/zeta; den=[1 2*zeta 1]; t=0:.1:10; a=10; num=[k/a 1]; y1=step(num,den,t); a=4; num=[k/a 1]; y2=step(num,den,t); a=2; num=[k/a 1]; y3=step(num,den,t); a=1; num=[k/...
function [nodes, edges] = gcontour2d(img) %GCONTOUR2D Creates contour graph of a 2D binary image. % % deprecated: use imageBoundaryGraph instead % % See also % imageBoundaryGraph % ------ % Author: David Legland % E-mail: david.legland@inrae.fr % Created: 2004-06-25 % Copyright 2004-2023 INRA - TPV URPOI - B...
% modRDecayA.m % RADIOACTIVRE DECAY % Using ode45 to solve the ODE for radioactive decay % DOING PHYSICS WITH MATLAB: % https://d-arora.github.io/Doing-Physics-With-Matlab/ % Documentation % http://www.physics.usyd.edu.au/teach_res/mp/doc/modRDecay.htm % Download Scripts % http://www.physics.usyd.edu.au/te...
function destruir pos=get(gca,'UserData'); if ~isempty(pos.objeto) handles=pos.objeto.h delete(handles(1)) delete(handles(2)) delete(handles(3)) pos.objeto=[]; set(gca,'UserData',pos) end datos=get(gcf,'UserData') rob=datos{2}; if ~isempty(rob.objeto) rob.objeto=[]; datos{2...
clc; clear all; close all; x1=input('enter your first input sequence'); x3=input('enter your second input sequence'); x2=fliplr(x3); N1=length(x1); N2=length(x2); N=N1+N2-1; X1=[x1 zeros(1,N-N1)]; X2=[x2 zeros(1,N-N2)]; for m=1:N y(m)=0; for n=1:N i=m-n+1 if(i<=0) i=N...
function X = randStepWaveform( cohsteps, totalsteps ) %X = randStepWaveform( cohsteps, totalsteps ) % Generate a random wave form which switches between values of +/- 1. % The initial value is equally likely to be either. Thereafter, the time % to next switching is an exponential distribution with characteristic...
function[mag,fas,offset] = daisyExtractSine(y, n, WkT) % [mag,fas,offset]=extract_sinusoids(y,n,WkT) % % Uses a least squares fit to find the amplitudes, phases, % and offsets of a sum of sinusoids of known frequencies WkT % y(n) is the measured data and n is the time index. % The phases are extracted with reference ...
function a = apply(n,param) %ELLIOT2SIG.APPLY Apply transfer function to inputs % Copyright 2012-2015 The MathWorks, Inc. n2 = n.*n; a = sign(n).*n2 ./ (1 + n2); end
function [] = createNetwork(numberOfNodes) %UNTITLED2 Summary of this function goes here % Detailed explanation goes here outgoingTable = zeros(numberOfNodes, 8); incomingTable = zeros(numberOfNodes, 117); for i = 1:numberOfNodes currentRow = outgoingTable(i,:); for j = 1:8 connectingNode = ...
function plotSpecAvgOutput(filename,outputFileName,chanName,effTBase,deltaFTicks,taveFlag,effTBaseFull,thresholdSNR,coinDF,pulsar,referenceFile) % % fileName -- the name of the file with data to input; this file is the output from spec_avg. % outputFileName -- base name of the output spectrogram files; will appen...
function [ flag ] = isKinectDataset( settings ) %ISKINECTDATASET Return true if we are runninng tests on a Kinect dataset % Detailed explanation goes here if strcmp(settings.dataset, 'test_data') ... || strcmp(settings.dataset, 'ZED') ... || strcmp(settings.dataset, 'pwlinear_nbCorners=10') ... f...
%% SYS800 - Reconnaissance de formes et inspection % M'Hand Kedjar - December 2016 % Course Project on Age and Gender Classification function [model_hog , features_train] = hogsvm(list_images , train_idx , trainLabels) % Getting the train data files trainData=cell(1,numel(train_idx)); for ii=1:numel(train_idx)...
function varargout=xyz2xyz(varargin) %XYZ2XYZ Adapt XYZ to another illuminant/observer. % AXYZ=XYZ2XYZ(XYZ,CWFSRC,CWFDST) with size(XYZ)=[M N ... P 3] returns % matrix AXYZ with same size. % % AXYZ=XYZ2XYZ(X,Y,Z,CWFSRC,CWFDST) with size(X,Y,Z)=[M N ... P] returns % matrix AXYZ with size [M N ... P 3]. % ...
function [x] = integrationukf(x,xp) global deltat global time tempx = x; k1 = deltat*xp; x = tempx+0.5*k1; time = time+0.5*deltat; xp = mathematicalmodelukf(x); k2 = deltat*xp; x = tempx+0.5*k2; xp = mathematicalmodelukf(x); k3 = deltat*xp; x = tempx+k3; time = time+0.5*deltat; xp ...
## Copyright (C) 2021 Robertson ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This program is dist...
function handles = osc_dbmake(osc_message,handles) % OSC_DBMAKE - Create an internal instrument knowledge object from % a set of XML description files % % Usage: handles = osc_dbmake(osc_message,handles) % % Check that no orchestration session is currently opened if ~isempty(handles.session) error('orchidee:osc:o...
%Created on June 2016. %@author: Soroosh Tayebi Arasteh <soroosh.arasteh@fau.de> %https://github.com/tayebiarasteh %% clear all clc close all %% Digital Filter Specifications wp = 0.5*pi; % digital Passband freq in Hz ws = 0.65*pi; % digital Stopband freq in Hz Rp = 1.1103; % P...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright 2021, Diogo Costa, diogo.pinhodacosta@canada.ca % This file is part of WebCrawler tool. % This program, WebCrawler tool, is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public Licens...