text
stringlengths
8
6.12M
%build dB limits lim01=[Low_Limits(1), Low_Limits(1)+Ranges(1)]; lim02=[Low_Limits(2), Low_Limits(2)+Ranges(2)]; lim03=[Low_Limits(3), Low_Limits(1)+Ranges(3)]; %Initialise popup menu to first frequency (Red) Frequ_work=1; depth=depth_surface(1,1:id_maxD); Ping_index=[1:1:length(sv01(:,1))]; %call RGB_gui function ...
function [fl] = EstimateRP_part(fl) b_num = fl.b_num; a_num = fl.a_num; g_num = fl.g_num; z_num = fl.z_num; r_num = fl.r_num; b_grid = fl.b_grid; a_grid = fl.a_grid; g_grid = fl.g_grid; z_grid = fl.z_grid; mu_1 = geomean(fl.mu_1); mu_2 = geomean(fl.mu_2); dis...
clc clear close all load 510x1020PEG.mat H=A; P=sparse(H); Enc = comm.LDPCEncoder(P); Dec = comm.LDPCDecoder(P,'MaximumIterationCount',100,'DecisionMethod','Hard decision'); KK=[-1.0801 -0.7715 -0.4629 -0.1543 0.1543 0.4629 0.7715 1.0801]; delta=0; beta_skew=0; zel=[-1.0801 -0.7715 -0.4...
function nodes = steinerPolygon(points) %STEINERPOLYGON Create a Steiner polygon from a set of vectors. % % NODES = steinerPolygon(VECTORS); % Builds the (convex) polygon which contains an edge for each one of the % vectors given by VECTORS. % % Example % n = steinerPolygon([1 0;0 1;1 1]); % drawPolygon(n);...
clc; clear; close all; video=VideoReader('xylophone.mp4'); numFrames=ceil(video.FrameRate*video.Duration); h=axes; str='.jpg'; for i=1:numFrames Frame=read(video,i); Frame=imresize(Frame,[350 320]); filename=strcat(num2str(i),str); imwrite(Frame,filename); image(Frame,'parent',h); pause(1/video.Fr...
function out = wrapper_nuclear_l21(in,sigma) out = nuclear_l21(in,sigma); end
% [bo] = make_point_bins(dx, B) % % Returns a binning object. % % Makes a series of points that will indicate bin centers. The first and % last points will indicate sticky bins. No "bin edges" are made-- the edge % between two bins is always implicity at the halfway point between their % corresponding centers. The cent...
function v=market_game(P,Q,n,slc) % MARKET_GAME(P,Q,n) generates a producer and buyer game. % % Usage: v=market_game(P,Q,n) % % Define variables: % output: % v -- A Tu-Game v of length 2^n-1. % % input: % P -- An integer to specify the set of producers. % Q -- An integer to specify the set o...
clear ; close all; clc myPath= '/home/lord/data/'; a=dir(fullfile(myPath,'*.tif')); fileNames={a.name}; I_flat = [] radon_flat = [] for count = 1:length(fileNames) % fileName = strcat(myPath,fileNames(count)); img = imread(fileName{1}); img1 = imresize(img,[64,64]); img_gray = rgb2gray(img1); BW1 = edge(img_gra...
function obj = enrich(obj,bCirc) %ENRICH Enriching a parsed road % Enrich the road with points of lanes to plot if they are within % bCirc % Special Cases: isempty(bCirc) --> Fullmap % %---------------------------------------------------------------------- % BSD 3-Clause Lice...
function [pass,maxerr] = test(opt) % Test a distance-domain fit of a wormchain model t = linspace(0,5,300); r = linspace(1,6,300); parIn = [4 4.5]; P = dd_wormchain(r,[2.7,20]); K = dipolarkernel(t,r); S = K*P; [~,Pfit] = fitparamodel(S,@dd_wormchain,r,K,'Solver','lsqnonlin'); %Pass 1: distance distribution is wel...
clear; clf; x=0.001:0.01:2; plot (x,x.^(1).*log(x)); khorcat=rot90([x.^(1).*log(x);x],-1); kkk=fopen("figEulerCauchyA.txt","w"); fdisp(kkk,khorcat) fclose(kkk); khorcat=rot90([x.^(0.5).*log(x);x],-1); kkk=fopen("figEulerCauchyB.txt","w"); fdisp(kkk,khorcat) fclose(kkk); khorcat=rot90([x.^(-0.5).*log(x);x],-1); ...
clear clf preproc n = 12 K = zeros(n) K = assemble(K, EE) K = assemble(K, R1) K = assemble(K, R2) K = assemble(K, R3) K = assemble(K, TI) det(K) BC = [10, 0; 11, 0; 12, 0; 9, 0;] B = zeros(n,1) B(1) = 1000 u = solvep(K, B, BC) amp = 100000 draw_def(EE,u, amp) draw_def(R1,u, amp) draw_def(R2,u...
clear,clc %三种方法进行分水岭分割 %读入图像 filename='Fig1021(a)(small-blobs).tif'; f=imread(filename); Info=imfinfo(filename); if Info.BitDepth>8 f=rgb2gray(f); end figure,mesh(double(f));%显示图像,类似集水盆地 %方法1:一般分水岭分割,从结果可以看出存在过分割问题 b=im2bw(f,graythresh(f));%二值化,注意应保证集水盆地的值较低(为0),否则就要对b取反 d=bwdist(b); %...
%%Model A = [0 0 0; 0 0 1; 0.1 -0.79 1.78]; B = [1 0 0.1]'; C = [0 0 1]; B_length = [1, 1, 2, 4, 8, 14]; %Lengths of input %Objectives Q = [0 0 0; 0 0 0; 0 0 2]; R = 2; %Start condition x0 = [0 0 1]'; %% Generate over time horizon N N = 30; nx = size(A,2); mu = size(B,2); %Bounds x_bounds = [Inf(N...
function recon_arc_asset_slow(pfilePath, calibrationPfile, outputDir) if ~ exist('outputDir','var') || isempty(outputDir) outputDir = pwd; end % % mac % cd '/Users/hongfusun/DATA/p-files/oct7/raw/' % pfilePath='/Users/hongfusun/DATA/p-files/oct7/raw/P31232.7'; % calibrationPfile='/Users...
function y_traj = testing_trajectory(t,P) if(t <= P.takeoff_time) pn = 0; pe = 0; pd = P.height/P.takeoff_time*t; %P.height; pn_vel = 0; pe_vel = 0; pd_vel = P.height/P.takeoff_time; %0; pn_acc = 0; pe_acc = 0; pd_acc = 0; psi = 0; psi_vel = 0; psi_acc = 0; else pn =...
% % % File author(s): <Julian Andres Garcia Grajales>, (C) 2014 % % Copyright: this software is licenced under the terms stipulated in the license.txt file located in its root directory % % clear all; close all; % This is the input for this file tree = load('neuron_cut_from_neuromorpho.swc'); % Output of this file ...
function [result] = juntar(R, G, B) result(:,:,1) = R; result(:,:,2) = G; result(:,:,3) = B; endfunction
function [Y] = TripleDecoder(X) index = 0;%zlicza przejscia pierwszej petli for Y = zeros(1,length(X)/3);%do tej tabeli wpisywany bedzie ostatecznie odkodowany ciag znakow %petla ktora przeskakuje o 3 pola zatrzymujac sie na pierwszym bicie z %kazdej trojki for i=1:3:length(X) upCounter = ...
%% clear all the previous data and record clear; clc; syms z % input file name [a,Fs] = audioread('sample.wav'); % or you can generate a white=wgn(length(a),1,0); filename = 'newwhitenoise.wav'; % audiowrite(filename,test2,Fs); audiowrite(filename,white,Fs); [x,Fs]=audioread('newwhitenoise.wav'); system...
function [p4, signk3, k123, pb] = trilateration( p, l ) % trilateration(p,l) Performs trilateration between 3 points. % TRILATERATION(P,L) Performs trilateration between 3 points P1, P2 and % P3 to find a fourth P4 point lying in the intersection of 3 spheres % with centers at the three mentioned point...
function pd = read_REX_NEV(nevFile) % function pd = read_REX_NEV(nevFile) % %nevFile = '/aphid2/array/bucky/bucky_v4l_20100427_004.nev'; nev = readNEV(nevFile); include_0_255 = 0; id0 = nev(:,1) == 0 & nev(:,2) ~= 0; findId0 = find(id0); nevCnd = nev(id0,:); %cndInd = find(nevCnd(1:end-1,2) ~= 15 & nevCnd(2:end,2)...
function [ afValues, ... afHours ] = ... GetSamplesInformationFromSignal( ... tSignal, ... iNumberOfSamplesPerDay, ... bIsSignalPiecewiseConstant ) % % get some useful information iNumberOfDays = tSignal.GetNumberOfFullDays(); aiMidnightsIndexes = tSignal.FindMidnights();...
function [id_parent, id_child, next, both_root] = find_best_nodes_to_merge( obj ) % hardcoded use of nodes_lklhd_diff and score threshold % TODO: include as graph properties nodes_all = obj.nodes_parent ~= 0; % eligible are all pairs that: % - come from different trees % - both are real nodes % - either two ro...
clc; str1='lge_'; str2='.png'; str3='mask_lge_'; new3d=[;;]; %3D myocardium volume new_3d=[;;]; %Open myocardium for r=0:8 temp=strcat(str1,int2str(r),str2); %input image address temp2=strcat(str3,int2str(r),str2); %mask input address ROI=imre...
function [M,Rot] = GetTransformMatrix(info1, info2) % This function calculates the 4x4 transform and 3x3 rotation matrix % between two image coordinate system. % M=Tipp*R*S*T0; % Tipp:translation % R:rotation % S:pixel spacing % T0:translate to center(0,0,0) if necessary % info1: dicominfo of 1st coordinate system % ...
% SolvePoiseuille clear all close all clc addpath('div_free'); myFlow = MyFlowSystem(); myFlow.InitializeProblem; myVisualize = Visualize; myVisualize.Initialize(); myVisualize.PlotVelocity(myFlow); for iter=0:1:151 % myFlow.ResetPressure(); if (mod(iter,25) == 1) myVisualize.CompareVel(myFlow, (iter-...
function [RGB ,out_bin] = imageTransformation( original_im, ... colour_thres,color, c_thres, perf) %Two options of thresholding %This first one is used when the target color is not well defined or unique if nargin < 3 %Get rgb values r = original_im(:, :, 1); g = original_im(:, :, 2); b = original_...
clear; NNN = [10 50 100 170]; L = length(NNN); for jjj = 1:L %Here we will compute some general statistics for the general clique. %Number of agents in clique N = NNN(jjj); %Initializing the length of time for which the simulation will run l = 1000; t = 0:l; %Initializing parameters %We allow jumps of unit "info...
function A = ListAllCombination(m,n) if m == 1 A = 1:n; A = A'; return end B = ListAllCombination(m-1,n); [RowL,ColumbL] = size(B); cursor = 1; A = []; for i = 1 : RowL for j = 1 : n if ismember(j,B(i,:)) == 0 && j > B(i,1) A(cursor, 1) = j; A(cursor, 2 : m) = B(i,:...
function [t,v,head] = isfread(filename) % This function loads the binary data from a Tektronix ".ISF" % file. The ISF file format is used by newer Tektronix % TDS-series oscilloscopes. % % Syntax: % [t,v] = isfread(filename); % [t,v,head] = isfread(filename); % % Input: % filename - name of Tektroni...
clear all; close all; addpath_recurse('./tensor_toolbox'); load('./botp-attr-resfilter.K9.mat'); nzind = find(data.Y); nzval = log(1 + data.Y(nzind) ); testind = data.test_ind; testvals = log(1 + data.test_vals); data.Y = sptensor(nzind, nzval, size(data.Y)); data.test_vals = testvals; save('./botp-attr-resfilter.K9...
function varargout=AnalyticLineFit(x,y,dy) if isscalar(dy) dy=repmat(dy,size(x)); end w=1./dy.^2; Delta=sum(w)*sum(w.*x.^2)-(sum(w.*x))^2; A=(sum(w.*x.^2)*sum(w.*y)-sum(w.*x)*sum(w.*x.*y))/Delta; B=(sum(w)*sum(w.*x.*y)-sum(w.*x)*sum(w.*y))/Delta; dA=sqrt(sum(w.*x.^2)/Delta); dB=sqrt(sum(w)/Delta); % manage out...
function cropped_line_img = lineSegmentFinder(orig_img, hough_img, hough_threshold) % edge_img = im2double(edge(orig_img, 'sobel', .06)); if hough_threshold == 60 edge_thresh = 0.135; else edge_thresh = 0.1; end edge_img = im2double(edge(orig_img, 'canny', edge_thresh)); % imshow...
function v = thermal_noise (r, t, df) % % function v = thermal_noise (r, t, df) % % Return the voltage variance on a resistor due to the thermal (Johnson % - Nyquist) noise. Take the root square of the result to have a V value. % % - r is the resistor value in Ohm (1 per default); % - t is the temperature in °C...
clear all close all clc %% Our Data % Flow1 = pa_dtfanalysis('MW-BS-2010-07-14-0004.hrtf'); age1 = 65; % Flow2 = dtfanalysis('MW-XX-2010-07-15-0004.hrtf'); age2 = 80; % Flow3 = dtfanalysis('MW-X2-2010-07-15-0004.hrtf'); age3 = 76; % Flow4 = dtfanalysis('MA-DE-2010-07-19-0001.hrtf'); age4 = 65; % Flow5 = dtfanalysis('M...
X = load("test.txt"); X = X(:,[1,2]); d = []; for i = 1:length(X) if(X(i,2) > 114.6 || X(i,2) < 112.6 || X(i,1) > 23.8 || X(i,1) < 22.4) d = [d,i]; end end X(d,:) = []; opts = statset('Display','final'); [Idx,Ctrs,SumD,D] = kmeans(X,3,'Replicates',2,'Options',opts); figure hold on plot(X(Idx == 1,2),X(I...
% Proj02_03 % Autor: Washington Pinto Lisboa % Redução das dimensões da imagem através da eliminação de linhas e colunas clc; clear all; close all; % Caminho do arquivo que deverá ser modificado path = '/Users/wlisboa/Documents/Documentos VBox /Mestrado/PDI/Trabalhos/Proj02-03/imagens/Fig0220(a).tif'; I = imread(pat...
function varargout = GUI(varargin) %GUI M-file for GUI.fig % GUI, by itself, creates a new GUI or raises the existing % singleton*. % % H = GUI returns the handle to a new GUI or the handle to % the existing singleton*. % % GUI('Property','Value',...) creates a new GUI using the % given pr...
function [ windField] = createWindField( ) %UNTITLED2 Create a 2D wind energy distribution % Returns wind energy as a function of (x,y) % Calling sequence: % norm2D(mu, R, W) % Create individual thermals nd1 = norm2D([-0.2 -.3], 0.8, 0.1); nd2 = norm2D([1.6 0.8], 0.8, 0.1); nd3 = norm2D([-0.5 0.8], 0.3, 0.1); % Su...
function [] = run_demo(v, FT, FTCPU, x,y,N, demoTitlePrefix) %% Forward and adjoint transform tic test = FT*(v); timeFT = toc; disp(['Time forward: ', num2str(timeFT), ' s']); tic img_comb = (FT'*(test)); timeFTH = toc; disp(['Time adjoint: ', num2str(timeFTH), ' s']); %% Forward and adjoint transform NUFFT tic test2 ...
clc clear all clf close all %Unitless Constants rho=1; eta=.1; % .03-.18 nu=.1; c=1; %Domain R_IN=100; R_OUT=102; Z_DOWN=100; Z_UP=101; %Spatial Step Sizes dr=.1; dz=.1; dt=.0001 ; tic tf = 2; % Dimensions r1=R_IN; r2=R_OUT; z1=Z_DOWN; z2=Z_UP; r=r1:dr:r2; z=z1:dz:z2; t=0:dt:tf; % I...
function [Out_mvDE, npdf]=mvDE_NCDF_ms(X,m,c,mu,sigma,stau) % This function calculates multivariate dispersion entropy (mvMDE) using normal cumulative distribution function (NCDF) with defined mean (mu) and standard deviation (sigma) values. % % mvDE deals with the shortcomings of mvDE_I, mvDE_II, and mvDE_III although...
function clusterParameters = determineClusteringParameters(handles) minPts = str2num(get(handles.minPtsEdit,'String')); clusterParameters.minPts = minPts; isManualSelection = get(handles.manualSelectEpsRadio,'Value'); isRunSimulation = get(handles.runRSimulationForEpsRadio,'Value'); isLoadSimulation = get(handles.lo...
% This program has the user input mass and velocity as arguments % a function processes these arguments to output kinetic energy in J % % % all the processing is done by the MV2KE function % % % note: only one decimal place can be used for the mass and velocity % % % the user has to enter the mass [in kilogra...
% %which file i=4; j=13; l1 = dir('/Users/Lidija/Documents/MATLAB/SoilMoisture/cpc/*.csv'); l2 = dir('/Users/Lidija/Documents/MATLAB/SoilMoisture/abi/*.csv'); %select section lx = 951; rx = 1500; ly = 201; hy = 700; % i l1(i).name tmp1 = csvread(['/Users/Lidija/Documents/MATLAB/SoilMoisture/cpc/' l1(i).name]); c = t...
clc; clear all; close all; kp=1; ki=1; kd=0; k2=1.1; xi=0; chs=1; if chs==1 r=1; n1=0; n2=0.1; end if chs==2 r=0; n1=0.1; n2=0; end if chs==3 r=0; n1=0; n2=0.1; end y=0; st=400; dt=0.1; lp=st/dt; Y=zeros(lp,1); e=r; e0=0; e1=0; y1=0; u=0; for i...
function tsdA = AddEvents(tsd,ISI) % tsd is the original data; ISI is the CS-US interval from the Phase field LVto = diff(tsd(:,1))>5; % Logical vector flagging 1st spike in each trial, % but displaced one event too early because of differencing LVtoff = [LVto;true]; % logical vector flagging last spike in % each trial...
clear K = 2*200; kperp = linspace(0,2*pi,K); kpar = 0; LAMBDA = zeros(K,2); t = 1; k2 = kpar; r = 0; %% armchair V0 = -t*[0 1;1 0]; for k1 = kperp r = r+1; A = -t*[0 exp(-1i*k1);exp(1i*(-k1+k2)) 0]; H = V0 + A + A'; LAMBDA(r,:) = eig(H); Percent = round(100*r/K); disp(P...
% L1CTLproc.m - Switch for L1CTL messages from higher layers % % Copyright (C) 2013 Integrated System Laboratory ETHZ (SharperEDGE Team) % % 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 ...
function TestPoly(n) X = -1:0.001:1; Y = f(X); %Calculate x and y for chebyshev polynomial theta = zeros(1,n+1); for i = 0:n theta(i+1) = ((2*i+1)/(2*n+2))*pi; end x = cos(theta); y = f(x); L = LegPolyApprox(X,n); C = Pn(X,x,y); figure; plot(X,Y,'r...
function [data]=readArff(file) %READARFF reads the data in an ARFF file and put in a matlab matrix, only can be used in unix (egrep command needed) data = []; cmd = sprintf('egrep -v "(^(@|%%)|^\\s*$)" %s > temp', file); [s,r] = system(cmd); data = csvread('temp');
function ugray0 = universal_color_to_gray_converter(u, method_flag, method_name) % This function provides different methods to convert a color images to a gray-value image. % % April 15th, 2010, By Reza Farrahi Moghaddam, Synchromedia Lab, ETS, Montreal, Canada % % The implemented methods are: % 'normal', 'stan...
clc; clear; %imagefiles= dir('C:\Users\hadi\Desktop\arborgreens\*.jpg'); % for i=1:1000 % cd('C:\Users\hadi\Desktop\arborgreens'); %going to dataset folder for read images % currentfilename = imagefiles(i).name; % image = imread(currentfilename); % cd('C:\Users\hadi\Desktop\steganography...
%function learn_UGM_SSVM() clear close all addpath(genpath(pwd)); load ./data_hog.mat % ------------------------------------------------------------------------- % Run SVM struct % ------------------------------------------------------------------------- % config [nRows,nCols,nNodeFeatures] = size(featureMatrices{1...
function [tform,valid_pair_num,error] = getRigidTransform(new_pointcloud, ref_pointcloud, ref_normals) %==== Initialize parameters ==== iter_num = 6; d_th = 0.05; m = size(new_pointcloud.Location, 1); n = size(new_pointcloud.Location, 2); tform = affine3d(eye(4)); G=zeros(3,6); N=zeros(m*n,3); %==== Main iteration loo...
function varargout = DPARSF_FieldMap(varargin) % DPARSF_FIELDMAP MATLAB code for DPARSF_FieldMap.fig % DPARSF_FIELDMAP, by itself, creates a new DPARSF_FIELDMAP or raises the existing % singleton*. % % H = DPARSF_FIELDMAP returns the handle to a new DPARSF_FIELDMAP or the handle to % the existing si...
function TheMonoalphabeticAdditiveCipher2 figure('MenuBar','None', ... % - создание графического окна без картинки и кнопок(они были бы, если был просто figure()) 'Name','TheMonoalphabeticAdditiveCipher', ... % - изменяем название на наше 'NumberTitle','off', ... % - убираем название перед нашим !!! '...
clearvars; %read from file and initiate test and training data************************ training_file = fopen('optdigits.tra'); tline = fgetl(training_file); c=strsplit(tline, ','); str = char(c); lline=zeros(1,65); for a=1:65 lline(a) =str2num(char(c(a))); end training=lline; tline = fgetl(training_file); while is...
function [flux] = rxnFlux(model,reactionID,varargin) if nargin == 4 soln = varargin{1}; v1 = varargin{2}{1}; v2 = varargin{2}{2}; elseif nargin == 2 soln = optimizeCbModel(model,[],'one'); [v1 v2] = fluxVariability(model); end id = strmatch(reactionID,model.rxns,'exact'); flux = printR...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright 2012 Analog Devices, Inc. % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % http:/...
close all clear all clc % Fs = 50000; % dur = 10; % nfft = 2^10; % Fs = nfft/dur; % x = linspace(0,10,nfft); % y = 4*sin(2*pi*x); % plot(x,y); % % figure % pa_getpower(y,Fs,'display',1); x= linspace(0,4,7); freq = pa_oct2bw(700,x); % freq = freq/1000; subplot(221) plot(freq/1000,'o-') pa_horline(4...
function f = myFunction2Diff(x) % f = - x * y + 4 * x / y; % f = sin(x) - y; y = (x^2 - x - 1)/(x - 1); endfunction
tic; % close all; clear; samePlot = true; %do you want all points on the same plot? % addpath('CollectedData/'); % addpath('Functions/'); load('Data/cap_har.mat'); % this data was calculated using functions from paper2 load('Data/eve.mat'); %save off the part of the array that is needed for calculations cap_har = cap_...
function wsSmp = movSmp(src, wsVdo, parSmp, varargin) % Sampling the video. % % Input % src - src % video - video % parSmp - sampling parameter % alg - algorithm, 'uni' % fps - frame rate, {30} % ran - range, {[1 0]} % varargin % save option % % Output % wsSmp - sampling ...
%% Script de test de la fonction effectuant la methode du Lagrangien % augmenté % Definition des constantes de depart conformément au sujet alpha = 0.1; beta = 0.9; eta = 0.1; eta_chap = 0.1258925; mu = (eta_chap/eta)^(1/alpha); tau = 1.4; lambda = 0; delta = 1; % Definition des points de depart x0_11 = [0;1;1]; x...
% boundedlineting averages close all clear all clc net_num=1; num_samples=5; str2 = {'A0C_','A10C_','A25C_','A50C_','A100C_'}; str3 = {'pE_pC_','pE_npC_','npE_pC_'}; subfldrs = {'Shear','Overload','Overload_Shear','Underload'}; plot_sub = 1; for n=2:2 for w=1:5 q=w; for p =1:num_samples ...
function [features] = SCPooling(blocks, dict, pyramid, SC_opts, LDS_opts) %================================================ % % Usage: % Compute the linear spatial-temporal pyramid feature using sparse coding. % % Inputss: % blocks -structure defining the feature set of an image % ...
function adjustedPVals = frmrHolmBonferoni(pVals) %See http://en.wikipedia.org/wiki/Holm-Bonferroni_method %Holm, S. (1979). %"A simple sequentially rejective multiple test procedure". %Scandinavian Journal of Statistics 6 (2): 65-70. JSTOR 4615733 adjustedPVals = nan(size(pVals)); [pVals, sortIndex] = sort(pVals(...
function [fluid,environ,iF,iE] = hex_set(fluid,indF,environ,indE,Tset,eff,ploss) % Import fluid.state and fluid.stage state = fluid.state(indF(1),indF(2)); stage = fluid.stage(indF(1),indF(2)); % Extract initial conditions T_st = state.T; p_st = state.p; h_st = state.h; s_st = state.s; T0 = environ.T...
function Build_Figs5ABC_Enolase_Plos1_CompBio_July2021 Script_DTWPathFigs_Build_AddCaption_Plos1_CompBio_July2021('5ABC'); figHandle = figure(1); text(-150, -100, sprintf('\\fontsize{20}%s', 'A)- 5')); legend('DBA CONSENSUS', 'SSG CONSENSUS', 'MM CONSENSUS', 'Location', 'best'); figHandle.Name = '_F_Fig...
function [newSpecSeq,deletedNos] = deleteoutlier(specSeq,stableTime,ROI,outlierThresh,plotOrNot) % Detele spectra whose counts in ROI are outliers % % Inputs: % specSeq: normalized spectra sequence£¬each column is a nmlized spectrum % stableTime£ºFrom which spectrum the flux was stable % ROI£ºRegion of interest, a str...
values = []; myspects = []; c1 = 0; c2 = 0; data = load('data.mat'); lambda = linspace(400, 800, 401)'; omega = 2*pi./lambda; eps_silver = interp1(data.omega_silver,data.epsilon_silver,omega); eps_gold = interp1(data.omega_gold,data.epsilon_gold,omega); eps_silver = interp1(data.omega_silver,data.epsilon_silver,omeg...
%% Quantization clear, clc, close all addpath('C:\Users\Joe\Dropbox\research\codes\f\') addpath('C:\Users\Joe\Dropbox\research\codes\ofdm\') Ofdm = ofdm(64, 56, 16, 100e9, 'DSB', 'none'); Ofdm.set_cyclic_prefix(0, 0); x = Ofdm.signal(100); Nbits = 3; xmax = max(abs(x)); xmin = -xmax; dx = (xmax-xmin)/(2^Nbits-1); c...
%Whale Group at MTBI %This function corresponds to the paired females %for the Whale Group (also know as the Whale Watchers :P ) %mux = probability of surviving the single female cycle %muy = probability of surviving the single male cycle %x = single females %y = single males function pf = px_fosc( epsilon, mu...
function d = DistanceTraveled(cfg_in,pos,iv_in) % function d = DistanceTraveled(cfg_in,pos,iv_in) % % returns distance traveled in pos during interval iv_in % (sum of absolute diffs), in units of pos % % MvdM 2016-10-25 cfg_def = []; cfg = ProcessConfig2(cfg_def,cfg_in); nDim = length(pos.label); % first, construct...
function krirto = ratio_kri(wvchar_angle, bottom_angle) % krirto = RATIO_KRI(wvchar_angle, bottom_angle) % % inputs % - wvchar_angle: angle (in radians) of the wave % characteristic with the horizontal. % - bottom_angle: angle (in radians) of the linearly % slop...
% Correction orbite mesur�e 18 BPM 18 corr % nux = 5.95 clear beta_bpmx phi_bpmx s_bpmx clear beta_corrx phi_corrx s_corrx clear beta_defx phi_defx clear Cc K X Xr ncell=44; betax=10.5; b1 =10.5; b2 =2.; nux=5.95*2*pi; dnux=nux/ncell; ds=3.5595; ncorrx=22; nbpmx=22; % table BPM loc(1) =01;loc(2) =04;loc(3) =05;...
% loiter input parameter % W = W - W_cargo; LoiterTime = 3600/2; % Loiter time (s) eo = 0.7; % Oswald efficiency factor K = 1 / (pi * eo * AR); % Whole airplane K (Quadratic drag coefficient) % end loiter input parameter % You can find the fuel used in (optimal) loiter by plugging LoiterTime % into the appropriate end...
%Drill Tip Calibration Robustness Test %CISC 330 - Computer Integrated Surgery %Assignment 3 %Grace Pigeau 10187678 % %Purpose: Test the robustness of the drill tip calibration function function DrillTipCalibrationRobustness_test(truth) %initialize a matrix to hold the Emax values and the error they creat...
function [err,estLabels,A] = EKSS(X,K,d,trueLabels,B,q,T,heur,sc,base) % The Ensemble K-Subspaces algorithm for subspace clustering % [trueErr,l2Err,estLabels] = EKSS(X,K,d,trueLabels,B,q,heur,sc,base) % Input: % X: ambient dimension by number of data points % K: number of subspaces % d: dimension of subspaces ...
for qq=SingleAngleIdxs dir_to_look_name = dir([WorkingP 'Relaxometry' filesep 'Set_Num_' num2str(qq) filesep 'Core*.nii']); TmpFN=[WorkingP 'Relaxometry' filesep 'Set_Num_' num2str(qq) filesep dir_to_look_name(1).name]; FullVol=loadniidata(TmpFN); FullVol4D(:,:,:,qq)=FullVol; Tmp=DCEVolToT1(FA3D,DCE...
function [ metric ] = vd2metric( vd, distance ) %VD2METRIC Converts view angle to physical distance % Input parameters: % vd visual degrees % distance physical distance from observer to stimulus % % Returns: % Physical size of the stimulus metric = 2*distance*tand(vd/2); end
%Assignment 1 a, b, c %Deepak Gopinath - 903014581 function [ output_args ] = Assignment1abc( file, windowSize, hopSize ) %Function to calculate blockbased autocorrelation using matlab's xcorr %function and then plot the original waveform, spectrogram and correlation %function. [samples, sr2] = audioread(file); % ...
% This m-file gets additional data about speakers to be saved in a database. % Saves database in a table in a .mat file ('_addData_corpusName.mat). First % column contains a cell array of files names (full names, e.g. 'file_id.wav'). % Next columns are gender (cell array of strings: 'x', 'f' or 'm'), age (vector % o...
function [stage2, stage1, bsalt, bsalb, bsall, bsalr] = ManifoldRanking(adjcMatrix, idxImg, bdIds, colDistM) % The core function for Manifold Ranking Saliency: % C. Yang, L. Zhang, H. Lu, X. Ruan, and M.-H. Yang. Saliency % detection via graph-based manifold ranking. In CVPR, 2013. % Code Author: Wangjiang Zhu ...
% ***************** EE POSITION IS ONLY PUBLISHING AT 11HZ ******************** close all; clear all; clc dt = 1/1000; ftd = dlmread('Datasets/Control_Stem/test3.txt'); %% Extract Data t = ftd(:,1) - ftd(1,1); Fx = ftd(:,2) - ftd(1,2); Fy = ftd(:,3) - ftd(1,3); Fz = -(ftd(:,4) - ftd(1,4)); Tx = ftd(:,5)...
clear; close all; clc; %% Анализ свойств многолучевости навигационных сигналов % Блок ввода входных параметров: f = 4*1.023; % Мгц, тактовая частота кода перспективного сигнала ГЛОНАСС N = [-1 1 -1 -1 -1 -1 1 1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 1 1 -1 1]; % ПСП последовательность d = 10e2/f; % длитель...
function f = d2d(m,n) %D2D Differential filter km = 1:m; fm = (1-2*mod(m:-1:0,2)) .* [1 cumprod((m-km+1)./km)]; fm = interweave(fm,zeros([1 m])); kn = 1:n; fn = (1-2*mod(n:-1:0,2)) .* [1 cumprod((n-kn+1)./kn)]; fn = interweave(fn,zeros([1 n])); f = fn' * fm;
%% nh3_v4.mat TEST SCRIPT (Tsat) INDEPENDENT VARIABLE % % Franco N. Ferrucci % ferruccifranco@gmail.com % Oct 2018 %% Cleanup clearvars -except nh3_v4 c clc %% f(T,P), independent variables set Tsat = 300; %% Load parameters/variables load nh3_v4.mat c = conversion_factors(); fluid = 'Ammonia'; %%...
function H = hulk(v) H = [(v)' ((v).^2)' ((v).^3)']; end
It = load('TestX4.txt'); [X_fism,Y_fism] = sort(M_FISM, 2, 'descend'); [X_cb,Y_cb] = sort(M_CB,2,'descend'); % [X_demo,Y_demo] = sort(M_Demo,2,'descend'); n = 5; hit_fism = HitRate_N(Y_fism,It,n); hit_cb = HitRate_N(Y_cb,It,n); % hit_demo = HitRate_N(Y_demo,It,n); [hit,ahit] = HR_ARHR_N(Y_item,It,n);
function [ medianShapeIndexWCells,averageShapeIndexWCells,medianShapeIndexNeighsWCells,averageShapeIndexNeighsWCells,mutantCells,neighMutantCells] = calculateShapeIndexVoronoiWeighted( photoPath ) %get shape index of weighted cells and neighbours dataPath=strrep(photoPath,'\images\','\data\'); dataPat...
%For the time series deltaT=0.005; Time_vertical=(0:deltaT:0.995)'; Time_circle=(1:deltaT:4.995)'; %For the Flying to 1m Z_vertical=-(linspace(0,1,200))'; X_vertical=zeros(200,1); Y_vertical=zeros(200,1); xd_vertical=[X_vertical,Y_vertical,Z_vertical]; % Vx_vertical=zeros(200,1); % Vy_vertical=zeros(200,1...
clear comm_type_num = 2; comm_rep_num = 50; rp = 20; fp0_all = zeros(rp, comm_type_num*comm_rep_num); fp0_sel = zeros(rp, comm_type_num); P_all = zeros(rp, comm_type_num*comm_rep_num); M0_frac_all = zeros(rp, comm_type_num*comm_rep_num); M0_frac_sel = zeros(rp, comm_type_num); for j = 1:rp folder_name = ['R' num2st...
function circles = FuncIncisionAndMarksPointDetect(img, matching_points, template_circle, is_debug, incision_index, img_type) if(incision_index == 1) x_incision_start = 1; x_incision_stop = matching_points(4, 2, incision_index) + overlap_pixel; elseif(incision_index == size(matching_points, 3)) ...
function [train_image_paths, test_image_paths, train_labels, test_labels] = ... get_image_paths(data_path, categories, num_train_per_cat, num_test_per_cat) num_categories = length(categories); %number of scene categories %paths for training and test image train_image_paths = cell(num_categories * num_train_per_c...
function Q = RieszAnalysis(A, config) % RIESZANALYSIS perform the Riesz tranform of high order % % -------------------------------------------------------------------------- % Input arguments: % % A image to analyze % % CONFIG RieszConfig2D object that specifies the Riesz-wavelet % transform. % % ----------------------...
function [aucList,handle] = aucList_v1(bkgd,smpl,whichPlace,sampleName,combinedCh,timeCombined,plotOrNot) % 作图,横轴为合并道数,纵轴为AUC,线的数量为smpl的元胞数 % % INPUTS: % bkgd: 无毒品能谱,数值矩阵 % smpl:不同元素为数值矩阵,行数一致且与bkgd相同,元胞数组 % whichPlace: 画哪个位置的识别效果AUC曲线簇,1*2数值矩阵 % sampleName: 图例的标题,单列元胞数组 % combinedCh:图中横轴为多少道合为一道,列向量 % timeCombined: 每个...