text
stringlengths
8
6.12M
function [mscn,miu,sub,sigma] = mscn(img,window) %==================================================================== % 求图像的MSCN值 % Input : (1) an double gray image % (2) a filter window % Output : % (1) the mscn map of the image % (2) the miu map of the image % (3) the sub ma...
function [prop,p_locs] = in_pareto_set_distance_problems(p_num,X) %[prop,p_locs] = in_pareto_set_distance_problems(p_num,X) % % function counts the proportions of the designs in X which lie in the % Pareto set region for the problem (p_num) % % returns the proportion of members who are optimal (prop) and their % corre...
function linearRegressionLearningCurve(fileName) [X, y, Xval, yval] = readTrainValTestDataFromFile(fileName); % Set options for fminunc lambda = 0; [error_train, error_val] = learningCurveData(X, y, Xval, yval, lambda, ... @costFunctionLinear, @trainLinearRegressionFminunc); plotLearningCu...
function [h_primitive h_axes] = draw(this, index,... h_primitive, h_axes,... draw_options,... n_samples, sampling_method) %#ok<INUSD> % draw Draw the multilinegroup object. % % draw_options, n_samples and sampling_method arguments are ignored, % for ...
function u_p = ichyfft(uch) % From Chebyshev space to physical space Nx = size(uch,1); Ny = size(uch,2)-1; M = zeros(Nx,2*Ny); uch(:,1) = uch(:,1)*2; uch(:,end) = uch(:,end)*2; M(:,1:Ny+1) = uch; M(:,Ny+2:end) = uch(:, end-1:-1:2); v = ifft(M,[],2); u_p = v(:,Ny+1:-1:1)*(2*Ny); end
clc clear all; close all; %% setup addpath('datapoints'); addpath('sensorModels'); addpath('helperFunctions'); addpath('stateEstimation'); %% load simulation parameters & data A = csvread('GoodSensordata30min.csv',1); vel_bf = A(:,2:4)'; % m/s omega_bf = A(:,5:7)'*pi/180; % rad/s position_in = A(:,8:10)'; % m euler_a...
function [ClusterAlpha,HullNumber]=RASCAL_Online_AlphaHulls_01(ClustersOnLine1, AlphaHullParameters, handles) % RASCAL_Online_AlphaHulls_01 creates alpha hulls of offline clustering results % Inputs: % GroupNumber: number of groups selected % ClustersOnline1: results of online clustering, cluster centres and % ...
function [averagePrecision, recall, precision] = iEvaluateClassifierParallelPerformance() %% Read dataset and labels day_testData = load('day_testData.mat'); day_testData = day_testData.day_testData; night_testData = load('night_testData.mat'); night_testData = night_testData.night_testData; rainy_testData = load('rain...
global E1 E2 mu epsilon delta load('good_EC50_okay_kinetics_and_amplitudes.mat'); P2X4StackDeMix3.setParams([]); J=logspace(-7,-5,30); dE3=zeros(size(J)); dE5=zeros(size(J)); dE55=zeros(size(J)); dEA=zeros(size(J)); for i=1:length(J) load('good_EC50_okay_kinetics_and_amplitudes.mat'); P2X4StackDeMix3.s...
function [ Ref, Test ] = fb_tds( E0_ref, E0_test, General, match_method ) %[ E1 ] = fb_tds_backwards( E0 ) % Time Domain Smearing (1) Backward masking Equation 35 % Adding of Internal Noise Equation 36,37 % Time Domain Smearing (2) Forward masking Equation 38-40 global debug_var if debug_var fprintf(' Backw...
function dudx=DudxCentral2(uf,ub,dx) dudx=(uf-ub)/(2*dx); end
function [ newim ] = GazeCorrect(Im ) %GAZECORRECT Summary of this function goes here % % INPUTS: % correctionAngle = [thetaX,thetaY] : correction angles for x and y % direction % OUTPUT: % newim : image of the rotated eye close all; if nargin < 1 ImFileName = 'frontal_view_model.jpg'; Im = imread(ImFi...
function w = ProxHard(T, w) w = w .* (abs(w) < T);
% Masking the ceiling camera function mask = Mask(image) ROI = imshow(image); position = [277.469854469854 124.960498960499 814.020790020791 820.407484407484]; e = imellipse(gca,position); mask = createMask(e,ROI);
% Mikołaj Szotowicz, date: 26/11 % Mecca in Saudi Arabia 21° 25' 36" N 39° 49' 34" E clc; precision = 0.001; meccaX = 0.69509676521; % 39° 49' 34" E = 39.826111° meccaY = 0.37396588688; % 21° 25' 36" N = 21.426667° declination = -0.36372661612; % -20.84°, date: 26/11 hourpointsLabelsNum = [8, 7 , 6, 5, 4, 3, 2, 1, 12...
function [groundPlane, NumSupporters]=trackGP(GPCandidate_xyz,uvdPoints, threshold) global intrinsics baseline; GPCandidate_uvd=uvdPlane2(GPCandidate_xyz, intrinsics, baseline); uvdPointsReshaped(:,1) = reshape(uvdPoints(:,:,1),1,[]); uvdPointsReshaped(:,2) = reshape(uvdPoints(:,:,2),1,[]); uvdPointsReshaped(:,3) = r...
%close all; load('exp_rslt_psd.mat'); %load('exp_rslt_piva.mat'); load('exp_rslt_2ndcom.mat'); Ot_psd = exp_rslt_psd; %Ot_piva = exp_rslt_piva; forg_dat = exp_rslt_2ndcom; resize_fact = [0.6 0.7 0.8 0.9 0.95 1.05 1.1 1.2 1.3 1.4]; %resize_fact = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1]; %resize_fact =...
clear all; close all; array = ["A.png"]; % array = ["A.png";"B.png";"C.png"]; Drone_MAX = 100; for stage = 1:size(array) if stage == 1 drone = field_positioning(Drone_MAX); end tic; [drone, Drone_Goal_Matching, Drone_MAX, goal, velocity_vector] = level1(char(array(stage)),Drone_MAX,drone); ...
addpath('../general_functions') addpath('../../chapter 1') addpath('../simulation_code') %% Generate data for figure 8a clear variables N_iter=[20 100 500]; d=2; lam=0.4; jtype=3; % Exp(1) jobs sp1=0; sp2=0; nruns=40; svals=linspace(0,200,40); w_range=linspace(0,400,10^5); dw=w_range(2)-w_range(1); Gbar=min(w_range.^(...
function PlotAvgWxy(Wxy,time,freq) arrowDensity =[18 18]; % default [25 25] ad = mean(arrowDensity); arrowSize = 1*30.*0.03/ad; % arrowSize = 0; % Uncommenting this line and commenting the prev one will % cause arrows not to display arrowHeadSize=0.9*arrowSize*180; % default 1*arrowsize*220 pkDetThr = 0.1; %%%%%% X...
function [bx,by,corsh] = disp_on_blocks(im1,im2,blocksize,subpix) % DISP_ON_BLOCKS calculates x- and y-displacements for each distinct block % taken from the image im1. The size of the blocks is determind by the % parameter blocksize. For each block in the image im1 the corresponding % block in the image im2 is...
function y = get_rand(size,sum_i) y = rand(1,size); while true s = sum(y)-sum_i; if s == 0 break; elseif s < 0 t = randi(size); d = (1-y(t))*0.001; if -s < d y(t) = y(t) - s; break; else ...
function association_rules = generate_association_rules (D, frequent_itemsets, min_confidence) fprintf(1, '\nCreating candidate assocoation rules...'); ln = length(frequent_itemsets.L); % convert double level structure into a single level k = 1; for i = 1 : ln for j = 1 : length(frequent_itemsets.L{i}) ...
%========================================================================= % % Program to estimate an exponential model and plot the % log-likelihood function. % %========================================================================= clear all; clc; % Read in the data for y y = [ 2.1, 2.2, 3.1, 1.6, 2.5, 0....
function [k, rbfPart, linearPart, n2] = ardKernCompute(kern, x, x2) % % This function computes an RBF kernel with ARD lenght scales. % % Syntax: [k, rbfPart, ... % linearPart, n2] = ardKernCompute(kern, x, x2); % % Inputs: % KERN : cell structure containing the parameters of the % ke...
% data1: sea-water Pc % Written by Ali A. Eftekhari % Last checked: June 2021 data{1}=[0.073 249 0.085 45 0.09 15 0.131 8 0.197 3.33 0.23 2.22 0.25 1.79 0.328 0.6 0.38 0 0.5 -0.1 0.6 -0.3 0.7 -0.7 0.8 -2.5 0.831 -5.8 0.84 -10 0.856 -20 0.863 -32.2 0.867 -43 0.869 -49.1 0.87 -54.3 0.882 -92.8 0.893 -126.9 0.895 -142.5 0...
function comparefiles(filea,fileb,len) % comparefiles(filea,fileb,len) % finde lines in file a that are not in file b %regarless of order a = scanlines(filea); original = a; b = scanlines(fileb); for j = 1:length(a) a{j} = regexprep(a{j},'\s+#.*',''); end for j = 1:length(b) b{j} = regexprep(b{j},'\s+#.*','');...
function p1 = basis(Xe,he) % Function calculant les fonctions de bases interieures: p1 % % SYNOPSIS: p1 = basis(Xe,he); % INPUT : Xe : le centroide .he : diametre % OUTPUT : p1 : les fonctions de la base P1 % AUTEUR : Diallo Amadou, 28/09/2020 p1 = {@(x,y) 1, @(x,y) 0, @(x,y) -(y-Xe(2))/he, @(x,...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Title: Project 1 % Filename: Tipton_EGR534_Project1.m % Author: Natalie Tipton % Class: EGR 534 % Date: 10/15/19 % Instructor: Dr. Rhodes % Description: This project reads in resting and exercise ECG data and % finds the QRS complex, ...
function [auto_results, manual_results] = comp_auto_manual_results(path, dataset, mode, metric_learning_enabled) addpath('./../'); % if(dataset == 'lfpw') face_list = [812:1035]'; all_face_list = [1:1035]'; elseif(dataset == 'cofw') face_list = [1346:1852]'; all_face_li...
function r = fhnx3d2fdx2(t,fd_cell,p) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % fhnx3d2fdx2 % % Cubic approx to 1D FitzHugh Nagumo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% r = cell(1,1,1); r{1,1,1} = -2*p(2)*eval_fd(t,fd_cell{1}); end
function [X, y]=gen_gauss_classes(m, S, P, N, seed) [row,column,class] = size(m); % matrix to hold data X = []; % vector to hold class number for respective data points y = []; figure(); for j=1:class % generates class data points t = gen_gauss_data(m(:,:,j),S(:,:,j),fix(P(j)*N), seed); if(j == 2) k=-1...
function [output] = perform_TOF_measurement() %UNTITLED7 Summary of this function goes here % Detailed explanation goes here output = rand(0, 100); end
%% clear % % orden de indices % i - power limits % j - part % m - month % l - trial k= [1, 0.5, 0.37, 0.37, 0.37, 0.17]'; k = reshape(k,6,1,1,1); coeff = 1.4064; c = (6:-1:1)' + rand(6,1); c = reshape(c,6,1,1,1); %% nquarter = 10; pi = 1500*rand(6,nquarter,12); pi = normrnd(500,200,[6 nquarter 12]); theta = @...
%% 调相信号的解调 %% 清理 clear clc close all %% 参数 f0 = 2; % 原始信号频率,单位Hz fc = 1e3; % 载波信号频率,单位Hz fs = 1e5; % 信号采样频率,单位Hz %% 设置信号 t = 0:(1/fs):8; % 时间 sigSrc = 0.5*sin(2*pi*f0.*t) + 0.5*sin(2*pi*2*f0.*t) + 0.3*cos(2*pi*0.5*f0.*t+pi/4); % 原始信号 sigCar = sin(2*pi*fc.*t); ...
%pring waiting orders to file or on the screen fc_msg = 0; if not(libisloaded('fc_matlab')) display('need login first'); else [fc_msg] = calllib('fc_matlab','printOrders', '01549059', 'waitingOrders.csv'); end; %{ Parameters for printOrders function: accountNumber, fileName accountNumber - account can b...
function GT_reco_bucket(connection) next_acquisition = @connection.next; acquisition = next_acquisition(); % Call input function to produce the next acquisition. sRO = connection.header.encoding.reconSpace.matrixSize.x; sPE = connection.header.encoding.reconSpace.matrixSize.y; sSE = connection.header.encoding.recon...
function plotDirectionTuningCurveGlm(TC,varargin) p=inputParser; p.addParamValue('bayesfit',false,@islogical); p.parse(varargin{:}); % colors={[1 0 0],[0 0 1],[0 1 0],[1 0 1],[1 1 0],[0 1 1]}; %%% subplot(2,2,1); for ss=[2:numel(TC) 1] % SubSets of the data, 1 is always all data, pl...
function [MOD,TEST_FIRE_CYCLE,w,TEST_CYCLE_TIME,TEST_FIRE_CYCLE_NUMBER,latitude,longitude,column, row,To_M, Ta_M, tm_M, ts_M, dT_M, k_M, w2_M, tau_M, m_z_M, P_M, v_z_M, v_m_M, theta_z_M, theta_zm_M, theta_zs_M, m_zs_M, tsr_P_M, a_P_M, Y_P_M, Z_P_M, a_RKHS_M, K_RKHS_M, deltaK_RKHS_M, a_SVD_M U_SVD_M deltaU_SVD_M Q, R1,...
function YI = flin(ts,te,Ys,Ye,t) dt = te-ts; dY = Ye-Ys; if (t <= ts) YI = Ys; elseif(t >= te) YI = Ye; else YI = Ys + dY.*(t-ts)/dt; end; return;
function LYCnetcallback2(obj,~) % 根据SICK LD-LRS3601重写 global bufferlen; global bgfrmnum2; global bg_lidar2; global bg2_lidar2; global proflag2; global lidar2frm; global bufferdata3; global bufferdata4; global firstflag2; global oridatadisplayflag; if firstflag2 == -1 bufferdata3 = fread(obj,bufferlen,'ui...
load('C:\Users\brain_000\Dropbox\Penalty Kick Ass\data - 8.8.15.mat') %first 2000 are musimol % data = data(randi(length(data),1,400)); NC=50; dim=6; D=6; obsTypes{1}.idx=[1,2,3,5,6,7]; %D=6; obsTypes{1}.idx=[1,2,3]; obsTypes{1}.dist='mvn'; model = mixHMM(NC,dim,D,obsTypes,ones(NC,1)/NC*4,ones(dim,dim)/dim,ones(dim,...
% Problem Parameters % ------------------ d1 = 0.02; d2 = 0.05; L = 0.8; rho = 2700; b = 9.81; E = 70e9; g = 9.81; tht = (d2-d1)/L; % Gauss Points and weights % ------------------------- xi1 = -0.774597; w1 = 5/9; xi2 = 0.774597; w2 = 5/9; xi3 = 0; w3 = 8/9; % Element1 % -------- xvec = [0;0.1;0.2]; x...
function [v,dv] = fun2(x) v = x*x*x + 2; dv = 3*x*x; endfunction
% This is material illustrating the methods from the book % Financial Modelling - Theory, Implementation and Practice with Matlab % source % Wiley Finance Series % ISBN 978-0-470-74489-5 % % Date: 02.05.2012 % % Authors: Joerg Kienitz % Daniel Wetterau % % Please send comments, suggestions, bugs,...
% Urban informatics course % Eelis Peltola, id:240286 % 12.12.2017 % This function calculates the decibel magnitude of calibration audio, and % the difference to dB values fromm calibration device. % Calibration test audio, in small audio room with 1 kHz sine wave sound filenames = ['dba_test1_sound1.wav'; 'dba...
classdef ImageInputLayer < nnet.cnn.layer.Layer % ImageInputLayer Image input layer % % To create an image input layer, use imageInputLayer % % ImageInputLayer properties: % Name - A name for the layer. % InputSize - The size of ...
function h=hh(a,b,c) if nargin == 3 c else end if nargin == 2 b else end if nargin == 1 a else end if nargin == 0 fprintf('0') else end
function [ flag ] = isCrossed( mask, object ) %ISCROSSED Summary of this function goes here % Detailed explanation goes here end
clear;close;clc; n = 115; noise = 6; for i = 1:n x(i) = 10+rand*noise -noise/2; y(i) = 10+rand*noise -noise/2; z(i) = 10+rand*noise -noise/2; end mat = [x' y' z']; dlmwrite('stationary.txt',mat,',') for i = 1:n x(i) = 10+rand*noise -noise/2 +0.1*i; y(i) = 10+rand*noise -noise/2; z(i)...
% Farinaz Fallahpour % Date: 2012 % https://github.com/FarinazFallahpour function cost = CostFunction(x) lambda = 100; violation = ( abs( x(:,1) - 4 ) + (x(:,1)-4) ) /2; cost = (x(:,1)-10).^2 + lambda * violation ;
% Parameters d = .25; % wheel base (meters) syms t dilation = 5; a = 0.4; l = 0.4; %Our cardioid equation cardioid = sym([-2*a*(((l-cos(t/dilation))*cos(t/dilation) + (1-l))); 2*a*(((l-cos(t/dilation))*sin(t/dilation))); 0]); %Finding the That vector T = diff(cardioid); MagT = norm(T); That = T./MagT; %Cal...
% Phase 6: Compute weights of cone inputs to mRGC RF centers and surrounds function runPhase6(runParams) connectivityFile = fullfile(runParams.outputDir, sprintf('%s.mat',runParams.inputFile)); load(connectivityFile, ... 'conePositionsMicrons', 'coneSpacingsMicrons', 'coneTypes', ... '...
function S = xmlelem2struct(Element) f = fieldnames(Element); f = f(~strcmp(f,'Attributes')); for i = 1:length(f) SubElem = Element.(f{i}); if iscell(SubElem) for j = 1:length(SubElem) S.(f{i})(j,1) = xmlelem2struct(SubElem{j}); end elseif isfield(SubElem,'Text') [number,...
function update_traces(q, p, handles) %q is a vector of states N=size(q,2); x_ankle=zeros(2,N); for idx=1:size(q,2) [body,hip,hip2,knee,knee2,ankle,foot,... body_com, hip_com, knee_com, knee2_com, ankle_com, foot_com]... = get_frames(q(:,idx),p...
function feature_vector = Extract_basic_features (data) n = size(data, 1); var_num = size(data, 2); window = size(data, 3); feature_vector = []; for i = 1: n features = []; for j = 1:var_num seg = data(i,j,:); % 4 features features = [features,mean(seg),std(seg),max(seg),min(seg)]; ...
%{ # Thermal integrator This function integrates the thermal model equations and returns the temperature of each node for each time step. INPUTS: * model: structure with the thermal mathematical model parameters * scenario: structure with the thermal load scenario parameters * ic: vector with initial temperature of ...
clear clc f = [5 18 42 27 8]; %A = cumsum(f); %for 1st quartile %q1 = (sum(f)+1)/4; Q1 = quantile (f, 0.25); Q2 = quantile (f, 0.50); Q3 = quantile (f, 0.75); q = (Q3-Q1)/2;
% demo_Su_2017_MRM_MRF_ASL.m % Written by Namgyun Lee % Email: namgyunl@usc.edu, ggang56@gmail.com (preferred) % Started: 10/07/2019, Last modified: 06/13/2020 %% Clean slate close all; clear all; clc; %% Add paths addpath(genpath('..\..\Bloch_Flow_MT')); %% Initialize a random number generator rng('default'); %% D...
% Example of creating Neighborhood Graphs % % by David L. Jones, Apr-2008 % % This file is part of the FATHOM Toolbox for Matlab and % is released under the GNU General Public License, version 2. % File: '.../examples/neighbors.mat' % -----Notes:----- % This example is similar to that presented in 'Dray, S. 2006. Mo...
function [corr_mat] = make_corr_mat(session_dir,subject_name,visual_area,hemi) %% set defaults if ~exist('hemi','var') hemi = 'lh'; end if ~exist('visual_area','var') visual_area = 'V1'; end if ~exist('SUBJECTS_DIR','var') SUBJECTS_DIR = getenv('SUBJECTS_DIR'); end anatdatadir = fullfile(SUBJECTS_DIR,subje...
close all; clear all; z=9; xk=4; r=[xk]; for i=1:20 %xk=(z+xk)/(1+xk); xk=0.5 * (xk + z/xk); r=[r xk]; end odd=r(:,1:2:end); even=r(:,2:2:end); hold on odde=abs(odd-4*ones(size(odd))); evene=abs(even-4*ones(size(even))); e=abs(r-sqrt(z)*ones(size(r))); plot(r); %plot(odd); %plot(eve...
function r = isdefined(var_s, vars) %% Cheacks whether a variable is initialized if any(strcmp(var_s, vars)) r = ~isempty(evalin('caller',var_s)); else r = false; end
function out=stringInFile( fileName, searchString) % Verify if searchString exists in file. % Returns 1 if the searchString exists in the file (fileName), where file % is in MATLAB search path. a=fileread(fileName); positions=strfind(lower(a),lower(searchString)); out=~isempty(positions);
function [Y,dYdom,dYdT] = rigid_motion(X,om,T); %rigid_motion.m % %[Y,dYdom,dYdT] = rigid_motion(X,om,T) % %Computes the rigid motion transformation Y = R*X+T, where R = rodrigues(om). % %INPUT: X: 3D structure in the world coordinate frame (3xN matrix for N points) % (om,T): Rigid motion parameters between worl...
% This is material illustrating the methods from the book % Financial Modelling - Theory, Implementation and Practice with Matlab % source % Wiley Finance Series % ISBN 978-0-470-74489-5 % % Date: 02.05.2012 % % Authors: Joerg Kienitz % Daniel Wetterau % % Please send comments, suggestions, bugs,...
clear; s = 'ST'; D = readX(s); tt = 20; D = timeprocess(D); %处理时间 D = interpolation(D,tt); %插值 [D,~]=move_mean(D); %减去平均值 [V,X]=tran_X_2(D,tt); %求速度和位移 windowsize=60; %序列长度 %% [D, ~]=move_mean(D); [V, ~]=tran_X_2(D,tt); centerX = classifyV(sqrt(V(:, 2) .^ 2 +V(:, 3) .^ 2));%聚类 centerX=[1,centerX,size(D,1)]; fprintf('...
% clc, clear load paths inria = load([inriaDataSet '/inriaPosTrain']); I = im2single(inria.images(1).image); params = load('results/optimize/inriaParametersHog.mat'); params.method = modifyDescriptor(params.method,'colour','none'); mFunc = parseMethod(params.method); [~,Dnone] = mFunc(I,'','',false);
function sem=standardError(dataaa,dim) c=size(dataaa,dim); s=std(dataaa,1,dim); sem=s./sqrt(c-1); end
function bcm = getbcm(varargin) %GETBCM - Bunch current monitor % BCM_328Point_Waveform = getictwave(Field) % StructureOfWaveforms = getictwave('All') % % BCM = getbcm('BunchCharge') {Default} % % NOTE % 1. There is roughly 62.54 ps between ADC samples (also the Trigger Delay step size) % 2. There is 32 sampl...
function [CFvals,CFvecs,basis_type,x] = cavity_loadBasis(basis_loc,k_a) load(basis_loc,'CFvals','CFvecs','basis_type','x'); [CFvals,CFvecs] = cavity_sortBasis(CFvals,CFvecs,k_a); end
%% setup variables c=1520; % [m/s] assume tissue Trans.spacing=params.pitch; Trans.frequency=params.fs/4*1e-6; lambda=c/(Trans.frequency*1e6); [depth_m sensor_n, nBuff] = size(rf_data); sampleZero=0; %should be zero if the physical image begins at sample 1 Fs = 4*Trans.frequency*1e6; dt = 1/Fs; %lambda=c/1.1e6; ...
%% script to make masks from basc on dartel on adni clear all % set the paths and inputs all_path = '/Users/AngelaTam/Desktop/adsf/adni_dartel/'; path_basc = [all_path 'basc_msteps_20160912_1/stability_ind/adni/sci10_scf9/brain_partition_consensus_ind_adni_sci10_scf9.nii.gz']; path_out = [all_path 'basc_masks/']; sca...
clear all clc %% outline % find the en, and ch err big index. % check the ser %% main ind_en=load('txt_err_big_en.txt'); ind_ch=load('txt_err_big_ch.txt'); ind_err=intersect(ind_en,ind_ch); % dlmwrite('txt_err_big.txt',ind_err,'precision', '%d',... % 'delimiter', '\t','newline', 'Unix'); %% logs % mod : 21-M...
% IN.ANAT.(SUBJECT) (string) the file name of an individual T1 volume (in stereotaxic space). % Labels SUBJECT are arbitrary but need to conform to matlab's specifications for % field names. % IN.FUNC.(SUBJECT) (string) the file name of an individual functional volume (in stereotaxic space) % Labels SUBJECT need...
function y = sym_polyval(p,x) A = sym_polymat(x,length(p)); y = A*p;
function accuracy = ACC(CCA_output, blockDim, correctSeq) % Check accuracy of CCA output (target * 1 or target * block) if nargin < 2 blockDim = 2; end if nargin < 3 correctSeq = [1: size(CCA_output, 1)]'; end if length(size(CCA_output)) > 2 error("Expected 2D matr...
function [ ] = tp_fn_Newton(R,N,tMax,T0,Tenv, flagC) % Ian Cooper % School of Physics, University of Sydney, Sydney, NSW, Australia % Email: ian.cooper@sydney.edu.au % Web: https://d-arora.github.io/Doing-Physics-With-Matlab/ % R Cooling constant [1/min] % N Number of time steps % tMax Tim...
function [lat lon azi] = getmidperp(xyz1, xyz2, ss) x1 = xyz1(1); y1 = xyz1(2); z1 = xyz1(3); x2 = xyz2(1); y2 = xyz2(2); z2 = xyz2(3); [lat1, lon1, h1] = geocent_inv(x1,y1,z1,ss); [lat2, lon2, h2] = geocent_inv(x2,y2,z2,ss); [L,azi1,azi2] = geoddistance(lat1,lon1,lat2,lon2,ss); [lat, lon, azi] = geodreckon(lat1, lo...
%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% %&% %&% %&% Λ.07 - ΕΞΟΡΥΞΗ ΔΕΔΟΜΕΝΩΝ %&% %&% 2Η Σειρά Ασκήσεων %&% %&% %&% %&% Υλο...
function plot_pald_graph(cluster) end
% frameRate = 10; %% cJet = colormap(jet(SegNum)); c1b = colormap(winter(SegNum)); c1c = colormap(autumn(SegNum)); close all; scrsz = get(0,'screensize'); HourXaxis = RT/frameRate/60/60; getsize = @(x)x(1); %% Plot Angles figure;hold on; for i = SEGMENTS plot((frames(FRAMES)),AHA_S05{5}(i,FRAMES),'Color...
function [xRef, uRef, xhat] = calc_reference_V2(x_func, y_func, currIndex, finalIndex, deltaT, varargin) % PURPOSE: Calculates positions and reference feedbacks for the model % based on the input position functions % % INPUTS: x_func and y_func are self-explanatory % currIndex --> the current index. Will be 1 ...
function [pass,maxerr] = test(opt) % Check indifference of aptkernel() towards input dimensionality t = linspace(-1,4,100); K1 = aptkernel(t); % Clear to remove cached results clear aptkernel K2 = aptkernel(t.'); % Pass 1: Kernel bases are equal pass(1) = isequal(K1.Base,K2.Base); % Pass 2: Frequency axe...
function FeatureBoxplot(PSD, labels, Features, FeatureNb) x = log(PSD(labels==773,Features(1,FeatureNb),Features(2,FeatureNb))); y = log(PSD(labels==771,Features(1,FeatureNb),Features(2,FeatureNb))); group = [ones(size(x)); 2*ones(size(y))]; boxplot([x;y], group, 'Notch', 'on'); set(gca,'XTickLabel',{'Class 773 (Hands...
%% DIGITAL IMAGE PROCESSING - Aristotle University of Thessaloniki % Assignment 2 - Summer Semester 2020/2021 % Kavelidis Frantzis Dimitrios - AEM 9351 - kavelids@ece.auth.gr - ECE AUTH function [keypointsHighC,kpfiltCell] = discardLowContrasted(DoGs,keypoints ,keypointsCell,t, p) % discardLowContrasted : Func...
function [results] = esvm_evaluate_pascal_voc(test_struct, grid, ... params, ... target_directory, cls, ... models_name) % Evaluate PASCAL VOC detection task with the models, their ...
function im_map=map_con_array_1(im_orig, N, Cmin, Cmax); % function im_map=map_con_array_1(im_orig, N, Cmin, Cmax); % % mapping array of images to concentrations using information from one slice N % use map_con_array_2 for mapping using Min and Max for two - top and bottom images % % im_orig - original array (n...
function [ w ] = nextState(w) %NEXTSTATE the trainsition function % This is a function maps action to the next state global p; % transit to the target state with probability 1 w.nexts = w.cura; % give the reward for the next state if w.targetsRemain(w.nexts) w.targetsRemain(w.nexts) = false; w.R = p.subR; ...
% Record of parameters chosen and set-up n = 200; %d = 1000; %for paper example d = 1000; Means = [1 1; -1 -1; 1 -1; -1 1; 0 0]; %Means = [2 1; -1 -1; 1 -1; -2 1; 0 0]; k = size(Means,1); r = 2; N = k*n; %sigma = .3; M = [Means zeros(k,d-2)]; %augment with zeros % X = [ones(n,1)*M(1,:)+sigma*randn(n,d); % ones(...
%% 2D Diffusion on a Rectangular Plane (Dirichlet Boundaries) xmin = 0; xmax = 10; ymin = 0; ymax = 10; N = 10; M = 10; xvals = linspace(xmin, xmax, N+1); yvals = linspace(ymin, ymax, M+1); % Initialize vert_list because it's good practice verts = zeros((N+1)*(M+1),2); hold on for i=1:N+1 for j = 1:M+1 % ...
clear all; clc; % initial weight values w1=[33.7 62 3.4]; w2=[39 61.5 6.5]; LR=0.5; name = 'HabermanData.txt'; % import data M = dlmread(name, ','); % split data M=M(1:140,:); y1=1; y2=2; x1=M(:,1);x2=M(:,2);x3=M(:,3); % x1:age attribute, x2:year attribute, x3=nodule target=M(:,4); % target:surviv...
clear; close all; clc; addpath('C:\Users\akehi\Documents\GitHub\GNSSLIB') lam=plotpos('1800_3回目(GPあり)\left_lambda.pos'); lam.nickname='..\中間発表\img\屋上lambda'; figure lam.graph('xy') figure lam.graph('xy',1) lam.repo() clam=plotpos('1800_3回目(GPあり)\left.pos'); clam.nickname='..\中間発表\img\屋上clambda'; clam.setre...
clear all close all load('CTRL25_table.mat'); ctrl=2503; DT=0.05; %3 mins NPeriods=960; %48 hours cells=CTRL25.TRACK_ID; IDs=unique(cells); Ncells=size(IDs,1); time=CTRL25.POSITION_T; T=linspace(0,NPeriods-1,NPeriods)*DT; track_data=NaN(Ncells,NPeriods,4); %Split tracks and give them x and y posit...
function [images, x, y, z, number_of_images] = load_images(file_type) % Image folder path. % Open a folder picker to pick folder. directory_name = uigetdir('C:\'); % Get files with given type and folder. S = dir(fullfile(directory_name, file_type)); % Get number of images. [number_of_images, ~] = size(S); ...
function [ X_R ] = orthoProject( X, Z ) if(isvector(Z)) X_R = X - Z*(Z'*X) ./ (Z'*Z); else [~, pivcol] = rref(Z); A = Z(:, pivcol); clear Z; % P = A/(A'*A)*A'; % I = eye(size(P)); % P_ortho = I - P; % X_R = P_ortho*X; X_...
function [pf_th,th_used]=adjusted_profile_thresholding_new(pf,num_max) % it threshold this profile to have at most num_max rows row_size=size(pf,1); if row_size<=num_max pf_th=pf; th_used=0; else th=0.1; stop=0; pf_th=profile_thresholding_new(pf,th); if size(pf_th,1)<=num_max ...
function [a, b] = Fp(f, h) %Dérivée au point inital (a) et final (b) a = (f(2) - f(1)) / h; b = (f(end) - f(end-1)) / h; end
x=linspace(0,2*pi,30) y=sin(x) z=cos(x) result=plot(x,y,x,z)
function job_id = queue_job(func,args,jobs_to_wait) % path are just for reference. include addpath in the function, or % ask me to add it to default search path. Aki 04/24/2014 if(nargin<2) args = {}; end if(~iscell(args)) args={args}; end if(nargin<3) jobs_t...