text
stringlengths
8
6.12M
clear % close all; % % DESK addpath(genpath('C:\Users\bastien\Documents\internship\biosig4octmat-3.1.0\biosig\t200_FileAccess')) addpath(genpath('C:\Users\bastien\Documents\internship\Miw')) processFolder= 'C:\Users\bastien\Documents\internship\Miw\gtec16'; outputPath = 'C:\Users\bastien\Documents\internship\data_ONLI...
% multi box show track boxes vid_i = 1; chunk_name = '00001_00343'; box_i = 1; seq_name = sprintf('self%05d',vid_i); imDir = sprintf('/home/is/Occlusion Video Data/self shot/%s', seq_name); imageList = dir(fullfile(imDir, '*.jpg')); imFiles = {imageList.name}; clear imageList; %% for only one box given by box_i % tr...
function [answer] = eigenvectors(A) for j=1:size(A,3) for i=1:10000 if i==10000 error('Matrix A has been squared 10000 times, and has not converged') end if i==1 A(:,:,j) = A(:,:,j)^2; B(:,:,j) = sum(A(:,:,j)'); C(:,:,j) = sum(B(:,:,j)); E(:,:,i,j) = B(:,:,j)/C(:,:,j); ...
function easyBarIndivError(M,E,varargin) %% IMPORTANT: they changed properties of bar graphs at around Matlab R2017 %% So this could fail in older versions of matlab (runs fine in 2019b) % Plot bar graphs with individual data points, with error bras around each % data point. if iscell(M) Mnew = nan(max(cellfun(@l...
function [ hfig ] = plot_optprice_r( pricer , r ) %PLOT_OPTPRICE_R 画期权价格对R的图 % ---------------------------------- % 沈杰,20160124 % 吴云峰,20160129,增加了obj.sigma长度大于1的情况 % 吴云峰,20160129,增加了不改变原有值的方法 % 吴云峰,20160301,使用Copy的结果进行作图 %% 预处理 % TODO:检查各个变量是否都有值 % 将旧的变量进行保存 copy = pricer.getCopy(); %% 画图,画px~r的图 if ~exist( 'r' ,...
function [Uaccept, Yaccept, LSF, Yexeval, mcmcopts] = uq_subsetsim_accept(mcmcopts, U, Y, Uprop) % [X, Y] = UQ_SUBSETSIM_ACCEPT(MCMCOPTS, X, Y, XPROP) defines the % acceptance criterion in subset simulation and applies it to the % candidate samples Xprop %% ALGORITHM % basic checks a = size(U); b = size(Up...
clear noise = load('../matnoise/raytomo.mat'); xnode = noise.xnode; ynode = noise.ynode; selectperiods = 3 ip=selectperiods; tomo(1).phV = noise.raytomo(ip).GV; tomo(1).period = noise.raytomo(ip).period; tomo(1).avgphV = nanmean(tomo(1).phV(:)); tomo(1).noise = true; selectperiods = 1 eqdata = load('data/eikonal_sta...
% Filename : trailingCharacterUpper.m % Date : 31.01.2017 % Author : Manuel C. Kohl function output = trailingCharacterUpper(input) output = input; output(1) = upper(output(1)); end
function [this, outp, V, Delta, Pe, SCov] = filter(varargin) % filter Kalman smoother and estimator of out-of-likelihood parameters. % % % Syntax % ======= % % Input arguments marked with a `~` sign may be omitted. % % [M, Outp, V, Delta, PE, SCov] = filter(M, Inp, Range, ~J, ...) % % % Input arguments % =========...
% Computes homogenized matrix by minimizing variational term in unit cell. % Functions are discretized via finite differences; the hole in the unit % cell is defined by the function chi.m % Input: % * r = radius of hole, % * N = number of grid points, % * xi = 2-vector that determines homogenized matrix, % * plotti...
clear all; syms a c er ep x y ; c=100; ep= 1: 1: 100; er= ep:1:100; [x,y]= meshgrid(er, ep); for ep= 1:100 for er=ep:100 temp1=simplify (x+ep)^3 - c*(x+ep)/4 + c*ep/4; temp=solve ('temp1=0','x' ); temp=temp(imag(temp)==0); if er >= ((c/32)^(1/2)) && ep >= ((c/32)^(1/2))...
function [ bitStream ] = LDPC_decoder_hard_lite( bitStream_enc, H ) %LDPC_decoder_lite Lite version of the LDPC hard decoder. % The hard version for the LDPC decoder. [M_H,N_H] = size(H); bitStream_enc_blocks = reshape(bitStream_enc,N_H,numel(bitStream_enc)/N_H)'; % Reshape bitstream back to blocks...
function test_plot(X,Y) figure ; hold on; ln = size(X,1); for i=1:ln, if Y(i,1) == 0, plot(X(i,1), X(i,2),'ko'); elseif Y(i,1) == 1, plot(X(i,1), X(i,2), 'b+'); end end hold off; end
% script for figure 2 if ispresent('fig2data.mat','file') load fig2data else load jonscellsdata % set some constants ncells = 36; totalFrames = 27550; nocolor = 1; % column numbers cellC = 1; nframesC = 2; fanoC = 3; mscC = 4; varC = 5; trestd10C = 6; trestd5C = 7; trestd3C = 8; trestd2C = 9; tresco...
%parameters to fill up dz=6; z1=16; [FileName,PathName] = uigetfile('*.nii','Select the Nifti file','/home/sophie/Desktop/'); file=strcat(PathName,FileName) D=MRIread(file); Data=D.vol; S=size(Data); Z0=1:size(Data,3); Zinit=((Z0-z1)*dz+dz/2); z_psf=abs(Zinit)*0.239+5.46; % Average the stack layers when the sampli...
%IGAMM Gamma correction % % OUT = IGAMM(IM, GAMMA) is a gamma corrected version of the image IM. All % pixels are raised to the power GAMMA. Gamma encoding can be performed with % GAMMA > 1 and decoding with GAMMA < 1. % % OUT = IGAMM(IM, 'sRGB') is a gamma decoded version of IM using the sRGB % decoding function ...
function out = nma_ls(A, B0, opt) % % NNMA_LS : Lee&Seung's least squares NMF algorithm. % function out = nma_ls(A, B0, opt) % % On output, % out.B and out.C are non-negative factors, out.obj is objective value % % On input, % A is the target matrix % B0 is the initial B. % % OPTIONS -- This structure contains impor...
function [Uddx2]=ddx2(U,dx) % computes the second partial derivative of the variable U wrt x % x is the first index of the array % dx is constant, uniform grid % for 2D % using higher order central difference formula % need to improve on the x boundary Uddx2=U; %to copy the array size Uddx2(3:end-2,:)=(-U...
%Clear everything close all clear clc % Setup the arduino a = arduino('COM11', 'Uno', 'Libraries', 'Adafruit/NeoPixel'); %Declare and setup the lights %We use the RGB lights, not the GRB lights, and the strip is 24 LED lights %long. lights = addon(a, 'Adafruit/NeoPixel', 'D6', 24, 'NeoPixelType', 'RGB'); %Set the de...
function [ OUTPUT,NN ] = GroupPM( INPUT ,PATCH_W) % Calculate the NN field by PatchMatch %test github if(nargin~=2) PATCH_W=7; end addpath('../patchmatch-2.1/'); T=size(INPUT,3); NN=zeros(T,T-1,size(INPUT,1),size(INPUT,2),PATCH_W*PATCH_W,2); OUTPUT=zeros([size(INPUT),T]); for i=1:T OUTPUT(:,:,i,1)=INPUT(:,:,i...
%% Set up constants END_COLOR = 2; %Green: 3, Blue: 2, Red: 5% COLOR_PORT = 3; ULTRASONIC_PORT = 2; TOUCH_PORT = 1; SPEED = 60; %% Set up sensors brick.SetColorMode(COLOR_PORT, 2); %Maybe change to Color RGB: 4 instead of Color Code: 2 to get more accurate reading %% Just get going DriveForward; %% Keep going until ...
function d = sqDistance(p,q,pSOS,qSOS) % Compute the squared Euclidean distances between every d-dimensional point in p to % every d-dimensional point in q. Both p and q are npoints-by-ndimensions. % d(i,j) = sum((p(i,:)-q(i,:)).^2) % % pSOS = sum(p.^2,2) and is calculated if not specified % qSOS = sum(q.^2,2) an...
clear;close all;clc; img = imread('Project4_Defect.jpg'); imc = imcrop (img,[16,18,size(img,2)-35,size(img,1)-35]); gray = rgb2gray(imc); thresh = mean(img(:)); thresh_img = (gray>thresh); filter1= fspecial('average',10); filtered = imfilter(thresh_img,filter1); sobeled = edge(filtered,'prewitt'); ...
%{ # -> olf.RespiRaw -> olf.RespiOpt --- peaks : mediumblob # frames per second of the recording troughs : mediumblob # frames per second of the recording peak_times : mediumblob # total frames recorded trough_times : mediumblob ...
function StiffMatrix = matAssembleConservativeGlobalSparseStiffMatrix(obj, fphys) %> @brief Function to assemble the global stiff matrix %> @details %> Function to assemble the global sparse stiff matrix %> @param[in] UpdatedPNPX The first order derivative of Nonhydrostatic pressure with regard to x %> @param[in] Updat...
% % EXERCISE: DSP lab 12 % % Record Your Voice at home while turn any motor of your house ON. % % Design a filter using FDA Tool. % % Remove sound of motor from recorded signal. % % Listen the output signal. % close all; % clear; % clc; % % file names % originalSignalFilename = "bm44.wav"; % filteredSignalFilename = ...
function [ResidualSignal, FaultySamples, FaultyDetector] = NSA_DetectionPhase(Sample_Data, Detector_Center, Detector_Radius, Self_Radius) % This function works in accordance with 'Vdetector_NDim.m' % This function implements the Detection (Monitoring) Phase of the Negative Selection % Algorithm. format long epsilon...
function LoadFullFish(hfig,i_fish,isFullData,hdf5_dir,mat_dir) M_fish_set = getappdata(hfig,'M_fish_set'); fishset = M_fish_set(i_fish); setappdata(hfig,'fishset',fishset); %% load data from file disp(['loading fish ' num2str(i_fish) '...']); loadStart = tic; isLoadTS = 1; if ~exist('hdf5_dir','var') || ~exist('mat_di...
function [ Ysamp_regular , Ysamp_ACS , acceleration_factor_y ] = check_options_for_parallel_imaging( ex ) %UNTITLED7 Summary of this function goes here % Detailed explanation goes here %% get some info with readable name [ nX, nY, nZ ] = get_dimensions( ex ); [ nX_acq, nY_acq, nZ_acq ] = get_dimensions_acq( ex );...
function routeByBroadcastMessageReceived(address, message) global MAG_TRACKING nodeID = getLocation(message.get_originAddress)+1; if length(nodeID)<2 disp('GOT A BAD PACKET') message else MAG_TRACKING.magReadings(nodeID(1), nodeID(2))=message.get_mag; MAG_TRACKING.magTimes(nodeID(1), nodeID(2)) = cputime; ...
% %Software to make an LED on the Arduino board blink %{ Creating a MatLab Arduino control GUI, following now Nick did it. Uses the figure options instead of uifigure. Version 2d introduces an interrupt in the form of a Hi/Lo voltage on a specific pin. %} function arduinoBlink %% Initializing the Arduino ob...
function output = stability(varargin) output = feval(varargin{:}); function output = init global rsc output = -1; tablename = rsc.tablename; type_filter = statistic('type_filter'); orig_bytes = statistic('byte_offset', 'realSource'); parent_changes_bytes = statistic('byte_offset', 'parentChange'); %% first...
function callbackImportButton(obj, handles, eventdata) % CALLBACKIMPORTBUTTON % % DESCRIPTION: % % % SYNTAX: % % % INPUTS: % % % OUTPUTS: % % % COMMENTS: % % %@ % Copyright 2016 The Johns Hopkins University Applied Physics Laboratory % % Permission is hereby granted, free of charge, to any person obtaining a c...
function x = parabolic_dist(N,sig); % x = parabolic_dist(N,sig); % % Function to generate a very smooth parabolic distribution: % % f(x) = 3/4/sqrt(5)/sig*(1-1/5*(x/sig).^2), -sqrt(5)*sig < x < sqrt(5)*sig % % INPUTS: N: Number of particles % sig: The standard deviation around the mean (rms) % OUTPUT...
function [res, filename] = Analyze(fun, varnames, cached, path2data, debug, poolcores, varargin) % ANALYZE Executes specified fun in parallel on the whole database (all .mat files) % % ANALYZE(FUN, VARNAMES) FUN should a string with the name of one of % the following sub-functions: % ...
%% Windows Compile CUDA mex OpenCLMexWrapper.cpp OpenCLWrapper.cpp -I'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include' -L'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\lib\x64' -lOpenCL -g %% Windows Compile Intel mex OpenCLMexWrapper.cpp OpenCLWrapper.cpp -DCL_USE_DEPRECATED_OPENCL_1_1_A...
function slr_view_data(t, x, dim, w) % View the distribution of data in feature space with projection of two % dimensional plane specified by 'dim'. % % -- Example % > slr_view_data(t, x) % View features value of first two dimension of "x". % > slr_view_data(t, x, dim) % View features value of two dimension of "x" p...
function xx = NMI_binData (x, numVx, ncellx) minx=min(x); maxx=max(x); deltax=(maxx-minx)/(numVx); lowerx=minx-deltax/2; upperx=maxx+deltax/2; xx=round( (x-lowerx)/(upperx-lowerx)*ncellx + 1/2 );
global MPI_COMM_WORLD; load 'MatMPI/MPI_COMM_WORLD.mat'; MPI_COMM_WORLD.rank = 102; Alluxio_Row_mv_version3;
function [ a, b, c ] = stpParabola(x1, y1, x2, y2, x3, y3) % 计算抛物线的系数 sx1 = x1 - x2; sx2 = x2 - x3; sx3 = x3 - x1; sy1 = y1 - y2; sy2 = y2 - y3; sy3 = y3 - y1; temp = sx1 * sx2 * sx3; a = (sy1 * -sx3 + sy3 * sx1) / -temp; b = (sy1 * (x1*x1 - x3*x3) + sy3 * (x1*x1 - x2*...
clear close all clc load('/Users/anweshachaudhury/Desktop/Anwesha research/Data files/Troponindata/tropdata.mat') distinfo = xlsread('/Users/anweshachaudhury/Desktop/Anwesha research/Data files/Analyzers/ChangiCompareWBC.xlsx','CompareChangiDist'); distinfo(1,:)=[]; Safe_pat_xls = [12 13 18 22 23 29 31 33 37 40 41 54 ...
i=imread('C:\Users\hp\Desktop\project on watermarking\database\standard_test_images\house.tif'); %i=rgb2gray(i); i=im2double(i); meani=mean(i); i=i-5; [coeff,score]=pca(i,'Algorithm','eig','Rows','Complete'); t = score*coeff'+repmat(meani,512,1) ; imshow(t); figure;imshow(i); figure;imshow(score); figure;imsh...
%This contain the extraction of data from the NYUv2 dataset from its %original site work = load('nyu_depth_v2_labeled.mat'); [rows, cols ,channels, num] = size(work.images); % for i = 1:num % temp = work.depths(:,:,i)/max(max(work.depths(:,:,i))); % s = strcat('depth_images/',int2str(i), '_depth.jpg'); % ...
classdef Feature properties Name StrFunc CompFeatures Values SymFunc end methods function ff = Feature(name, str, vars, values) ff.Name = name; % ff.StrFunc = str; ff.CompFeatures = vars; eval(['syms ' cat_spaces(vars...
function [m, var] = fixrbf1(units, dmin, dmax) % Initialises a set of RBFs to be equidistantly positioned over the ONE % DIMENSIONAL space with fixed sized variances. % A correction has been made in the line below. The actual number of units % was one more than specified by units. dist = ((dmax - dmin)/(units - 1)); %m...
function [the,re] = fproptdlr(the,re,BL1,BL2,ww,nl,nc,nr) % segments th12nc = mean(the(1:BL2,nc)); th1nl = mean(the(1:BL1,nl)); th2nlr = mean([the(BL1+1:BL2,nl) ; the(BL1+1:BL2,nr)]); th1nr = mean(the(1:BL1,nr)); r12nc = mean(re(1:BL2,nc)); r1nl ...
function klasse = classifyML(x, k) lik = zeros(size(x,1),size(x,2)); for n = 1:length(k) lik(n,:) = likelihood(x, k(n).theta); end klasse = lik(1,:) > lik(2,:); end
close all; clear; clc; % Parameters nb_symb = 1000; nbps = 1; % Number of bits per symbol constel = 'pam'; nb_bits = nb_symb*nbps; M = 100; f_symb = 1e6; % symbols freq fs = M*f_symb; % sampling freq beta = 0.3; T_symb = 1/f_symb; nb_taps = 20*M+1; deltaF = [0, 2e9*1e-5, 2e9*5e-5]; t_shift = 30; ratio_EbN0_db = 10; ...
% CLASSIFYLSVM Classify data with linear support vector machine. % OUT = CLASSIFLYSVM(X,MODEL) classifies the data in X (N samples-by-D % features) by using a linear support vector machine (SVM), where % MODEL is a structure with the SVM parameters. OUT is a structure % with both the scores and the class labe...
function [ zd, Q, kara ] = BFGS(zd, tau, param, rho, opts) % algorytm BFGS z wbudowanym poszukiwaniem na kierunku % --- Krok 1 ------------------------------------ var = obliczenia(param.h0, tau); lzd = length(zd); lu = (lzd - 2)/2; urend = lu + 2; phistart = urend + 1; % epK = opts.epK0; % matlab twierdzi ze linia ni...
close all; clear all; clc; %%bramka AND net = newp([0 1; 0 1], 1, 'hardlim'); %generowanie nowego neutronu dane_in = [0 0 1 1; 0 1 0 1]; dane_out = [0 1 1 1]; %dane_in, dane_out - wzorce uczenia plotpv(dane_in, dane_out) %wyświetlanie wykresu danych wejściowych i wyjściowych net.trainParam.epochs ...
function [level_grid,level_color,level_contour,azi_interp,... elev_interp] = iso_ph(magn,direction_matrix,n_directions,min_level, max_level,level) % function [level_grid,level_color,level_contour,azi_interp,... % elev_interp] = iso_ph(magn,direction_matrix,n_directions,min_level, max_level) % ...
function i = phase_get(n, job, a, b) if nargin == 2 i = ctmethods(30,n,job); elseif nargin == 3 i = ctmethods(30,n,job,a); else i = ctmethods(30, n, job, a, b); end
%% Task 1 disp('Load Data') load('WMP_WEnMet_data.mat'); fino1_v90 = Fino1.ws90; fino1_d90 = Fino1.wd90; fino2_v92 = Fino2.ws92; fino2_d91 = Fino2.wd91; % Plot WindRose(fino1_d90,fino1_v90,'AngleNorth',0,'AngleEast',90,'freqlabelangle',45,'MaxFrequency',6); saveas(gcf,'figures/WindRose_Fino1.png') WindRose(fino2_d91,...
clear; clc; %% parameter setting D = 2; % decimation factor I = 2; % interpolation factor L = 17; % filter length h_LP = fir1(L-1,1/2); %% input signal fs = 1000; freq = 50; N = 100; n = 0:N-1; x = sin(2*pi*n*(freq/fs)); %% decimation and interpolation x_D = x(1:D:end); % decimation x_I = zeros(1...
%finitepearson is designed to show correlation between splits, conditions AND %SUBJECTS. Unlike pearson2 it uses every split,sub,and cond as indvl point. function reliability=lk_finitepearson(reliability,cfg,ireg,iwndw,iTI) reliability.pearson_finite= []; reliability.ttest =[]; PearsonAUC = reliability.ampauc(:,:,:,:...
function [] = level4() clear, clc; score=0; close all; %static band ang=input('Enter the angle in degrees: \n'); xdir=input('Enter the direction of launch i.e... enter 1 for right or enter -1 for left: \n'); dx=input('Enter the change in x between 0.1 and 1: \n'); hold on x1=18:22; y1=70; plot(x1,y1,'bs-','markerfacec...
% sum over the absolut difference at each vairable function score = l1_compare(imghist1, imghist2) vec1 = imghist1(:); vec2 = imghist2(:); score = sum(abs(vec1./sum(vec1) - vec2./sum(vec2)))./2; end
clc, clear, close all; % clear all; Volume3.trace_rays_compile(); DEMO_ID = 4; switch DEMO_ID case 1 % Different angles on 2D slice for ang = 0.9:0.2:(pi/2) clf; %--- Create ray for current angle o = [.3 .3 0]; d = [cos(ang) sin(ang) 0]; %--- I...
fid=fopen('/Users/rushikeshsane/Documents/Thesis/datasets/j1/j1.txt'); s=textscan(fid,'%d %d'); fclose(fid); x=s{1}; y=s{2}; array = zeros(numel(x),2); for i=1:numel(x) array(i,1) = x(i); array(i,2) = y(i); plot(array(i,1),array(i,2),'.-','color',[0,0,0]+0.5); hold on; end %{Centroids File}% ...
function A = createNetworkPresentationDataStructure(V, E) % 创建网络表示方法数据结构 % 输入参数: % V -- 节点集合 % E -- 分支集合(记录分支真实编号、始末节点) % 输出参数: % A -- 邻接表(出边和入边邻的双向邻接表) m = length(V); n = size(E,1); % 构造邻接表A A=cell(m, 2); for u=1:m for e=1:n if u == E(e, 2) A{u,1} = [A{u,1} e]; % 记录出边分支 end ...
a=[1 5 2 9] b=[3 3 4 10] c=conv(a,b) d=length(c) x=0:d-1 stem(x,c)
function y=lowPass(Fs,x,wcut) n=0:1/Fs:1; N=2^nextpow2(length(x)); m=(-N/2):(N/2)-1; w=2*pi*m*fs/N; thefilter=w/(2*pi)>-wcut & w/(2*pi)<wcut; yall=(1/N)*(x.*thefilter)*exp(1i*w'*n); y=real(yall); %plot(w/(2*pi), thefilter) %xlim([-A A]) %plot(n,y)
%{ Comparing multiple users bandspace maps %} A = importdata('Data/Ziyu_020817.txt',' ',0); B = importdata('Data/Zheng_020317_47E2.txt',' ',0); C = importdata('Data/Yanan_020517.txt',' ',0); D = importdata('Data/Qinyao_020517.txt',' ',0); E = importdata('Data/Mercedes_020817_5EAE.txt',' ',0); i0= 6000 i1=9000; A = A...
function result = ellipse_lsq(parms, xdata, ydata) x0 = parms(1); y0 = parms(2); a = parms(3); b = parms(4); doFig=1; if nargin > 2 % if we are fitting the data with an ellipse, we use the % x coordinates provided by the users ydata = reshape(ydata,length(ydata),1); xdata = reshape(xdata, length(xdata),1); ...
function [e11,e12,e13,e21,e22,e23,e31,e32,e33]= esZB(etax,etay,etaz) eta=sqrt(etax.^2+etay.^2+etaz.^2); load XQD.mat; [aM,C11,C12,C44] =MaterialParameters('AlN','ZB'); [aQD,C11,C12,C44]=MaterialParameters('GaN','ZB'); ea=(aM-aQD)/aQD; Can=C11-C12-2*C44; xx=(etax.^2)./(eta.^2); yy=(etay.^2)./(eta.^2); ...
start_vy_series = {[0, 0.2, 0.4, 0.6, 0.8] [0, -0.2, -0.4, -0.6, -0.8] 0 0}; % start_vy = [0, -0.2, -0.4, -0.6, -0.8]; target_vy = [0.0]; start_vx_series = {0 0 [0,0.1,0.2,0.3,0.4] [0,-0.1,-0.2,-0.3,-0.4]}; target_vx = [0.0]; T = 0.4; subfolder_name = 'library5'; if ~exist(fullfile('local', subf...
%EAN13 Barcode Reader clear all close all clc %% Recuperation de l'image addpath(genpath('barcode images')); [im,map]=imread('BA.png'); size(im); size(map); barcode=retourne(im); figure, imshow(barcode); %% Redimensionnement imcrop(image,[Xmin Ymin Width Height]) nbLignes = size(im,1); nbColonnes = size(im,2); barcod...
% make_multixwav.m % % script to run write_hrp2xwavs over many hrp files to make xwavs cflag = 0; % which files to process? hrp_dir = uigetdir(pwd, 'Select HRP file directory'); files = cellstr(ls(horzcat(hrp_dir, '\*hrp'))); if hrp_dir == 0 % if cancel button pushed disp_msg('Cancel button pushed') cflag = 1...
function [a_lms, gamma] = recover_vol_coeffs_from_moments_projs_trispect_4tensor... (m4_micro, m3_micro, m2_micro, m1_micro, maxL, L, r_cut, a_init, Rots) % Function to recover volume expansion coefficients and average fraction of % micrograph pixels occupied by signal, from the first three % autoco...
function [ OP2D ] = COP2D( JPR,I,JPT,Z,RTS,ON,O2N,N2N,NE,TPROD2,OP2P,HEPLUS,N4S,NNO,PSEC ) %COP2D COP2D %:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: % SUBROUTINE COP2D(JPR,I,JPT,Z,RTS,ON,O2N,N2N,NE,OP2D,TPROD2,OP2P % > ,HEPLUS,N4S,NNO,PSEC) %.......o+(2d) % IMPLICIT REAL (A-H,L...
%% ACC Diaganol Analysis d = [-1 0 1]; diag1 = spdiags(predictedAvg, d); diag1_lin = diag1(1:end-1, 1); diag3_lin = diag1(2:end, 3); diag_lin = [diag1(:, 2); diag1_lin; diag3_lin]; avg_diag_lin = mean(diag_lin); block1 = 4; block2 = 9; block3 = 4; test = diag1(1:4,:); test = nonzeros(test); test_mean...
clear; flag_save = 1; %% parameter setting Lp = 6; %多径数 D_MS = 4.7; %假设x、y维度相同 D_BS = 4.7; %假设x、y维度相同 ele_max_MS = pi; azi_max_MS = pi; ele_max_BS = pi; azi_max_BS = pi; N_MS = MY_number_of_antennas_FDLens(D_MS, ele_max_MS, azi_max_MS); %49 N_BS = MY_number_of_antennas_FDLens(D_BS, ele_max_BS, azi_max_BS); %81 N_RF...
%% Stelling 5 % % Bij het maken van een eigen functie kan je doorgaans % zelf kiezen hoe je de output variabelen noemt. % Antwoord = 1;
%% Automatisierter Optimierer % Christopher Sauer, 2014 %% RapidMiner rapidminered = input('RM Modell generiert? (j/n): ','s'); if strcmp(rapidminered, 'n') pathToRapidminer = input('Wo befindet sich RapidMiner? ','s'); pathToProcess = input('Wo befindet sich der Prozess? ', 's'); processName = input('Wie ...
function IWi = get_BEC_IWi(N, design_epsilon) IWi = zeros(N,1); IWi(1) = 1 - design_epsilon; I_tmp = zeros(N,1); m = 1; while(m <= N/2) for k = 1 : m I_tmp(k) = IWi(k) * IWi(k); I_tmp(k+m) = 2 * IWi(k) - IWi(k) * IWi(k); end IWi = I_tmp; m = m * 2; end end
function F = fuzzysysfcn(inmf, outmf, vrange, op) % Creates a fuzzy system function F corresponding to a set of rules and % output membership function. % INMF is an M-by-N matrix of input membership function handles % M is the number of rules and N is the number of fuzzy system inputs % OUTMF is a cell array containi...
% The program should be started after clearing the workspace and exporting % the Test source time average file as 'xyz' and changing 'sub' %% Given sub = 6; info.res_path_coh = '/home/username/research/results/perception/Coherence/'; keywd = 'Coh(120by3s)'; %% Locate and list .mat files fmatF = dir([info.res_path_coh...
a = imread('C:\Users\user\Desktop\MATLAB\Image_Processing\Images\xyz.jpg'); b = imread('C:\Users\user\Desktop\MATLAB\Image_Processing\Images\abc.jpg'); n = a; disp(' '); disp('##########################################################'); disp(' '); [rp1 cp1 pp1] = size(a); [rp2 cp2 pp2] = size(b); if((rp1 + cp1 ...
function [similarity] = gen_sift_simi(old_patchs,new_patchs) run '/home/aya/codes/vlfeat-0.9.20/toolbox/vl_setup.m'; old_bbs_num = length(old_patchs); bbs_num = length(new_patchs); tmp_simi = zeros(old_bbs_num,bbs_num); old_tmp = {}; new_tmp = {}; for si = 1:old_bbs_num for sj = 1:bbs_num im1 = old_patchs{s...
%%%%%%%%%%%%%%%%%%%%%%%%%% % read_angles_passive % Marie Moltubakk + REB + M 25.5.2015 % % used by passiveUS to import pre-generated angle data across subjects % (generated in create_angles_passive) % %%%%%%%%%%%%%%%%%%%%%%%%%% function read_angles_passive(file) % global ang_subjectno % global ang_...
clear; close all; function [xk, iter] = falsePosition (a, b, tol, f) %{ Metodo de la Falsa Posicion @param a - limite inferior del intervalo @param b - limite superior del intervalo @param tol - tolerencia del algoritmo @param f - funcion a la cual se le aplicara el algoritmo @return xk -...
function [] = showRoseHistogram(data) rose(data); end
function obj=spikeDetection(obj) %Detect spikes in raw data and save waveforms %Todo: %Add detection of multiple spikes %determine quantization obj.detectionInt2uV=obj.detectionMaxSpikeAmp/2^(obj.detectionNQuantizationBits-1); obj=obj.getHighpassFilter; %start spike detection fprintf('\nRunning spike detection on %s...
% UQ_LISTANALYSES return all the ANALYSIS objects available in the UQLab session % UQ_LISTANALYSES returns a list a ANALYSIS objects that have been created by % the uq_createAnalysis command. % % The ANALYSIS that is currently selected (used by default in several UQLab % commands like <a href="matlab:help ...
clc; clear all; mfld = fileparts(mfilename('fullpath')); cd(mfld); % add variable variate lib: addpath([mfld filesep() 'var']); % --- multicore setup --- % multicore cores count mc_setup.cores = 100; % multicore method {'cellfun','parcellfun','multicore'} mc_setup.method = 'multicore'; ...
function makeTuples( obj, key) % get scan information [lens,mag] = fetch1(Scans(key),'lens','mag'); pixelPitch = 11000/512/mag/lens; % get data tpr = tpReader(Scans(key)); if ~ isAligned(tpr);display('Not Aligned! Skipping...');return;end gChan = getAlignedImagingChannel( tpr, 1 ); times = readSyncedTimestamps(tpr); ...
function SilenceFirstCK_prs(obj, evt, stage) hndl = get(gcf, 'Userdata'); hndl = get(hndl.mainFig, 'Userdata'); switch stage case 1 hndl.setting.Pre.duration.SilenceFirst = get(obj, 'Value'); case 2 hndl.setting.LDur.duration.SilenceFirst = get(obj, 'Value'); case...
function [ output_args ] = coarseToFineBasic( ) %UNTITLED9 Summary of this function goes here % Detailed explanation goes here % level1 = im; % level2 = gaussian_filter(level1,1); % level2 = imresize(level2, 0.5); % level3 = guassian_filter(level2,1); % level3 = imresize(level3,0.5); % tau = 0.00035; tau = 0.0002;...
function p = primes(n) %p = primes(n) % primes(n) is a row vector of the prime numbers less than or % equal to n. if length(n)~=1 error('Input Not Scalar\n', 'n must be a scalar'); end if n < 2, p = zeros(1,0,class(n)); return, end p = 1:2:n; q = length(p); p(1) = 2; for k = 3:2:sqrt(n) if p((k+1)/2) ...
% This function center the image with the given center. function centered_img=centerimg_size(img,center,width, height) % input: img is the image to be centered, center is the coordinate with % (x,y). x is the horizontal coordinate, y is the vertical coordinate. % width, height is the size of returned image. n...
% Problem8.1 dt = 1/100; et = 4; t = 0:dt:et; y = square(2*pi*t); subplot(2,1,1);plot(t,y);grid on axis([0 et -2 2]); xlabel('Time(s)'); ylabel('X'); [f,s] = ft(t,y); S = abs(s); subplot(2,1,2); plot(f,S);grid on xlabel('Frequency(Hz)'); ylabel('Amplitude');
function [ visstimdataset ] = Prepare( filepath, varargin ) %PREPARE Read and Prepare VisStim data % Detailed explanation goes here import NeuroAnalysis.VisStim.* p = inputParser; p.StructExpand = false; addRequired(p,'filepath'); addOptional(p,'dataset',struct([])); parse(p,filepath,varargin{:}); filepath = p.Resu...
% Input directory idir = '/home/imbiriba/tmp/ftp.ssec.wisc.edu/pub/ssec/davet/'; % Input file names fnames={'SCRIS_npp_d20130510_t2029459_e2037437_b07952_c20130511023743801999_noaa_ops.h5', 'SCRIS_npp_d20130515_t2037059_e2045037_b08023_c20130516024502741669_noaa_ops.h5', 'SCRIS_npp_d20130516_t2020579_e2028557_b08037_c...
clear;clc;close all f=figure f.Position = [1510 42 1050 1314] %% dataA=csvread('LeArm_data__servo2__R2.txt'); dataB=csvread('LeArm_data__servo2.txt'); dataL=csvread('LeArm_data__LeapMotion___R2.txt') data=dataA; i=1 len=6; S = data(:,i:(i-1 +len)); i=i+len; data=data( S(:,1)==1, :); %% i=1 len=...
% AISI 1144 stressproof steel % source: https://www.onlinemetals.com/productguides/steelguide.cfm % density (kg/m3), Poisson's ratio, Elasticity (Pa), Yield (Pa), Shear modulus (Pa), Shear strength (Pa) 8000 0.25 689E9 350E6 80E9 414E6
function write2pcf(File, In) fid = fopen(File); for i = 1:5 tline{i} = fgetl(fid); end fclose(fid); fid = fopen(File,'w'); for i = 1:5 fprintf(fid,'%s\n',tline{i}); end fprintf(fid,'0, %1.2f, 0, 0, 0\n',In); fclose(fid);
% plot_finger.m % Kevin Coltin % % Plots a "fingerprint" in formation, by plotting the concentrations of the % primary morphogen A. % % The concentrations are plotted on a relative scale, obtained by dividing % A / max(max(A)). This is clearly not very scientific, so we should % consider changing it eventually. ...
% plots a curve graph in the current axis % function h = mygraph2( CG, varargin ) %#ok<*UNRCH> DEBUG_MODE = false; if DEBUG_MODE warning('DEBUG_MODE==true'); clc, clear, close all; load mygraph2_demo.mat CG; mygraph2( CG, '-b'); end %--- compute edges on the fly if isfield(CG,'viv') CG.edges = gr...
cc() load('res/NM91_clustering') load('res/NM91_tsne') load('res/NM91_pulsesNorm') centroidsPre = grpstats(pulseShapesNorm, Gpre); centroids = grpstats(pulseShapesNorm, Gw); centroidTSNEpre = grpstats(tSNE, Gpre); centroidTSNE = grpstats(tSNE, Gw); cmap = lines(max(Gpre)+2); %% clf subplot(1,6,1:2) gscatter(tSNE(:,1)...