text
stringlengths
8
6.12M
classdef signalCore5511a < qes.hwdriver.icinterface_compatible % icinterface compatible interface for signalCore 5511a mw source % Copyright 2017 Yulin Wu, USTC, China % mail4ywu@gmail.com/mail4ywu@icloud.com properties (Dependent = true) numChnls end properties (SetAccess = private) freqlimi...
function A=fRoty(t) A=[ cos(t) 0 sin(t) 0 1 0 -sin(t) 0 cos(t) ];
%% RAW DATA IMPORTER % written by Patrick Strassmann, November 2014 % Imports behavioral data produced by Med-Associates operant boxes % % Various options you can change: first, change the 'username' that % identifies you for the programs you use on the box. You can choose to % 'autosave' fil...
function [ bw_m2m ] = est_bw_min2min( u_x, ap ) %EST_BW_MIN2MIN Summary of this function goes here % This funtion assumes ux_true = -1.0 ux_true = -1.0; % Get the beamwidth of the main peak [troughs, minloc] = findpeaks(-ap, u_x); bw_half = minloc(1) - ux_true; bw_m2m = 2 * bw_half; end
%% Functional connectivity analysis % model inspired by Tavor et al. to predict inter-individual differences % in motor tasks exploiting MEG-based resting-state FC matrices. % % Author: Anna Vettoruzzo % Septemeber 2021 clear all; close all; clc; %% Select band, ntw, task datadir = ['D:\Tesi\Data\']...
folder = '5min_modes/'; dd=dir([folder,'*.csv']); delimiter = ','; M=3; formatSpec = '%f%f%f%f%f%f%[^\n\r]'; data = cell(floor(length(dd)/M),M); for ii=1:length(dd) filename = dd(ii).name; index=strsplit(filename,'_') kk=str2double(index{1}); ll=str2double(index{2}); fileID = fopen([folder,f...
function hough_transform_Canny(img,r_min,r_max,t1,t2,g1,sigma) subplot(2,2,1) imshow(img); img=rgb2gray(img); gaussianFilter = fspecial('gaussian',g1, sigma); blur_img=conv2(img,gaussianFilter); BW = edge(blur_img,'Canny',t1); subplot(2,2,2) imshow(BW) centers = zeros(30, 2); radii = zeros(si...
function [the,Te,Hb,dE] = frestemp(Te,the,rhoe,pe,hbl,z,dz,dt) S = size(Te); pes = repmat(pe,1,S(2)); tmp = abs(z-hbl); bl2 = find(tmp==min(tmp)); sig = 5.67e-8; % J/s/m^2/K^4 % Tm = 236; % K % Make radiation a function of mean temperature instead: % Tm = mean(nanmean(Te(bl2+1:end,:))); Tm...
function [orbit,fixedpoint] = findorbit6(RING,varargin) %FINDORBIT6 finds closed orbit in the full 6-d phase space % by numerically solving for a fixed point of the one turn % map M calculated with RINGPASS % % (X, PX, Y, PY, DP, CT2 ) = M (X, PX, Y, PY, DP, CT1) % % with constraint % CT2 - CT1 = C*HarmNumber(1...
%1998年全国大学生数学建模竞赛A题:收益与风险 模型求解 %参看《数学的实践与认识》1999年第一期,p39-42 %另见 jm98a2,jm983,jm983fun clear;close; %问题一投资目标曲线 n=4; r=[28 21 23 25 5]'/100; q=[2.5 1.5 5.5 2.6 0]'/100; p=[1 2 4.5 6.5 0]'/100; u=[103 198 52 40 100]'; lemda=0; for i=1:11 c=[(1-lemda)*(p-r);lemda]; A1=[(1+p)', 0]; A2=[diag(q(1:n)),zer...
clc; clear all; % Im = imread('../asset/image/example.png'); % Im = imread('../asset/image/1.png'); % Im = imread('../asset/image/2.png'); % Im = imread('../asset/image/3.png'); % Im = imread('../asset/image/4.png'); Im = imread('../asset/image/5.png'); RGB = Im; Im = im2bw(Im); hold on Im = clear_boundary(Im); imshow...
function hideInLegend(h) % prevent object h from appearing in legend by default for i = 1:numel(h) if ~isGraphicsHandle(h(i)), continue; end ann = get(h(i), 'Annotation'); leg = get(ann, 'LegendInformation'); set(leg, 'IconDisplayStyle', 'off'); end end function mask = isGra...
clear addpath('results','5th_hidstate') W5_temp=load('alloy2_5th(rbm)_(2f40f288f1000f6ws9ws9ws36wsP10Pb0401)_alloy_w1_b30_trans_ntx1_gr1_pb0_pl0_iter_20000.mat'); W4_temp=load('alloy2_4th(rbm)_(24f40f288f1000f6ws9ws9ws36ws)_alloy_w36_b1000_trans_ntx1_gr1_pb0.1_pl10_iter_2000.mat'); W5=gather(W5_temp.weight.vishid); vb...
load('twomoons_sk.mat') rng(9999) n = length(fea); n_labels = length(unique(gnd)); % data normalization % feastd = std(fea); % feastd(feastd == 0) = 1; % some pixels are 0 in all images % fea = (fea - mean(fea)) ./ feastd; % number of sets of samples n_sets = 10; % number of samples in each set n_samples = 20; % sigma...
classdef aircraft properties m = 4.5; rho = 1.225; S = 0.473; g = 9.806; Cd0 = 0.0173; Cd1 = -0.0337; Cd2 = 0.0517; b = 3; p = 1; x u coeffs tf VR N solution end methods ...
t=0:0.001:1; fs=5000; ts=1/fs; t_samples=0:ts:1; xn=xt(t_samples); %stem(t_samples,xn); B=8; y=quant(xn,2^B,-1,1); %hold on %stem(t_samples,y); %hold off n=t_samples; figure; subplot(3,1,1); stem(n,xn); title('Sampled signal') xlabel('n') ylabel('x[n]') subplot(3,1,2); stem(n,y); title('Quantized signal L=256') xl...
% Draw the introduction text in the middle of the screen Screen('TextSize', window, 60); Screen('TextFont', window, 'Courier'); DrawFormattedText(window, 'Choose Right or Left', 'center',... screenYpixels * 0.25, white); % ResultsFolder = 'C:\toolbox\results\'; %put the results in the \results folder Righ...
% single link arm - parameter file addpath ./.. % adds the parent directory to the path VTOLParam % general arm parameters % tuning parameters %tr = 0.8; % part (a) tr = 0.4; % tuned to get fastest possible rise time before saturation. zeta = 0.707; % equalibrium angle and torque % P.z_e = 0; P.f_e = P.mc*P.g+2*P.m...
#!/usr/bin/octave args = argv(); % command line arguments % load all coordinates if (length(args)) fp = fopen(args{1}, 'r'); else fp = fopen('monitoring.csv', 'r'); end % read data in goups of ten values, nn total number of items read [points, nn]=fscanf(fp, '%d;%f;%f;%f;%d-%d-%d %d:%d:%d', [10, Inf]); fclos...
clear clc d=10e-3; Re=1000; mi=1.0016e-3; ro=1e3; R=d/2; r=0:1e-4:R; u=Re*mi/(ro*d); Q=pi*(d^2)*0.25*u; dpl=8*Q*mi/(pi*R^4); vx=dpl*(R^2)/(4*mi).*(1-(r.^2)/(R^2)); figure(1); grid on; grid minor hold all plot(vx,r,'r'); plot([0 max(vx)],[-max(r) -max(r)],'b'); %legend('Ścianka rury','Profil pr...
classdef PID_controller < handle properties Kp; Ki; Kd; last_time; last_error; total_error; error; set_point; end methods function self = PID_controller(set_point, Kp, Ki, Kd) if nargin > 3 self.set_point =...
function [ newPosPCTmat, log ] = reviseHoldingPCTmat( posPCTmat, holdableMat ) % 修正持仓矩阵:不可持仓的股票持仓量为0,其他票rebalance。只能对pctmat进行调整,否则无法保证没有出入金 % [ newPosPCTmat, log ] = reviseHoldingPCTmat( posPCTmat, holdableMat ) % posPCTmat: 持仓占比矩阵,TsMatrix类 % holdableMat:可持仓矩阵,TsMatrix类,或者直接简单矩阵,默认取IPO后涨停打开 % ------------------...
%% Load dataset projectName = 'ColorImagePriors'; thisImageSet = 'CIFAR_all'; dataBaseDir = getpref(projectName, 'dataDir'); testData = 'image_cifar_all_gray.mat'; dataInDir = fullfile(dataBaseDir, thisImageSet, testData); load(dataInDir); imageTr = image_all_gray(1:9.5e4, :); imageTe = image_all_gray(9.5e4+1:end, :)...
%% Linear Offset Test % Create a pair of linear Gaussian curves with a shifted mean x = linspace( -5, 5, 1000 ); y = zeros( size( x ) ); sigma = [1 1]; offset = [1,0]; theta = 0; xs = x + offset(1); ys = y + offset(2); z = stats.gauss2d( x, y, sigma, 0, theta ); zs = stats.gauss2d( x, y, sigma, offset, theta ); ...
% Calculate robot end-effector displacement % % Using: % showDef_lin(F); % Input: F - force vector (Fx,Fy,Fz,Mx,My,Mz) example: F = [100;00;0;0;0;0]; % Output: none function showDef_lin_q(x,y) clear all L = 300e - 3; l = 100e - 3; d = 300e - 3; for i = 1:length(x) % disp(i/length(x)*100) for j = 1:length(y...
function measureSelective(parameters) % Specify save directory and load spreadsheet URL home_folder = mfilename('fullpath'); slash_idx = strfind(home_folder,filesep); home_folder = home_folder(1:slash_idx(end-1)); load([home_folder, 'locations.mat'],'-mat') if ~exist(locations.scope) error(['Invalid mount locatio...
% RatSLAM script file for the Axon Level 5 dataset % Copyright (C) 2008 David Ball (d.ball@uq.edu.au) (MATLAB version) % Michael Milford (m.milford1@uq.edu.au) & Gordon Wyeth (g.wyeth@uq.edu.au) % % This program is free software: you can redistribute it and/or modify % it under the terms of the GN...
function mat = norm_matrix(bits, fNumber, N) %norm_matrix loads norm matrix for given bits and fermion number % Detailed explanation goes here [len, rawdata] = norm_raw_data(bits, fNumber); mat = zeros(len); %display(rawdata) %display(rawdata(1, 2)) order = floor((bits + 1) / 2); %display(orde...
function [sources_int, sources_nonint, P_ar] = generate_sources_ar(fs, len, bandpass, pow) % Stefan Haufe, 2014, 2015 % stefan.haufe@tu-berlin.de % % If you use this code for a publication, please ask Stefan Haufe for the % correct reference to cite. % License % % This program is free software: you can red...
function model = TwoPoolO1() % Symbolic variables syms m10 m01 syms p1 p2 p3 p4 % Parameters model.sym.p = [p1;p2;p3;p4]; % State variables model.sym.x = [m10;m01]; % Control vectors (g) model.sym.g = [0;0]; % Autonomous dynamics (f) model.sym.xdot = [p4 ...
function [ ] = writeMesh( mesh, filename ) % [ ] = writeMesh( mesh, filename ) % write out mesh in .OBJ format fid = fopen(filename, 'w'); has_tex = ( size(mesh.u,1) == size(mesh.v,1) ); has_normal = ( size(mesh.n,1) == size(mesh.v,1) ); for i = 1:numel(mesh.vidx) fprintf(fid, 'v %f %f %f\n', mesh....
function this = selectShift(this, fromShift, toShift) [~, nQuan, ~] = size(this); posFrom = find(this.Shift==fromShift); if isempty(posFrom) posFrom = 1; end posTo = find(this.Shift==toShift); if isempty(posTo) posTo = length(this.Shift); end this.Matrix = this.Matrix(:, ((posFrom-1)*nQuan+1) : (posTo*nQuan))...
i = 0; Fvec = [1 0 1.2 3]; coefficients = conv(Fvec, Fvec); while i < 3 coefficients = conv(coefficients, Fvec); i = i+1; end coefficients
function [structuralPath,functionalPath,BC_V_Workspace] = download_testdata(testDataPath,BC_V_Workspace) if(~isfolder(testDataPath) && ~isequal(testDataPath,fullfile(pwd,'data'))) disp("The testData path is not a folder"); return; end if(~isfolder(fullfile(pwd,'data')) && isequal(testDataPath,fullfile(pwd,'dat...
function variance = getVarianceInPatch( binDev, absDev ) [m,n] = size(absDev); binDev(isnan(binDev)) = 0; absDev(absDev==0) = nan; area = sum(sum(binDev)); covPoints = zeros(1,area); i=1; for x=1:m for y=1:n if(~isnan(absDev(x,y))) covPoints(i) = absDev(x,y);...
function result = extractspm2() % % function result = extractspm2() % % Luis Hernandez % lastedit: 3-24-98 % returns the xyz coordinates (in pixel units) and the % intensities of all the non-zero elementsin an % analyze format image set % % It also computes the center of mass of the spm maps % and it counts the number ...
function [wlair,dwl]=wlrefrac(wl,p,t) %function [wlair,dwl]=wlrefrac(wl,p,t) % 12 5 98 julian % calculates wavelength shift in nm for P and T % dwl = wlvac-wlair % p should be in mbar % wl is wl vacuum if nargin<3,t=15;end if nargin<2,p=[];end % in Pascal if isempty(p),p=1013.25;end % p in mbar p=p*100 ...
function [ dW, dT ] = GetDeltaWeights( weights,output,theta,target,eta ) nW = length(weights); V = output(1:end-1); weights{nW+1} = (target-output{end}); dW = cell(1,length(V)); dT = cell(1,length(V)); delta = 0; % Recursion formula for backpropogation for i = 1:length(V) b = weights{end-i}*V{end-i+1}-theta{end-i+1...
%% AUTHOR % Fabricio Loor, faloor@unsl.edu.ar, PhD Student at UNSL %% ALGORITMH: AJSO % This algorithm is based on SHADE. AJSO introduces several changes in % mutations and in the way of updating the factors of mutation and crosover %% % THIS SCRIPT IS BASED ON THE WINNER CODES IN THE TEST BED 2 ON THE % IEEE 2017 and...
function [output] = myInterp(img, N) img = double(img); output = interp_sub(img); output = permute(output, [2 1]); output = interp_sub(output); output = permute(output, [2 1]); function [out] = interp_sub(input) [H, W] = size(input); out = zeros(H, W*N); out(:, 1:N:end) = input; ...
function elem=atcorrector(fname,varargin) %ATCORRECTOR creates a drift space element with class 'Corrector' % % ATCORRECTOR(FAMNAME,LENGTH,KICK,PASSMETHOD) % % FAMNAME family name % LENGTH length [m] % KICK [hor. kick vert. kick] [rad] % PASSMETHOD tracking function, defaults to 'CorrectorPass' %...
function mov = applyTracking(gui,mov,time) frnum = floor(time*gui.data.annoFR)+1; if(isempty(gui.data.tracking.active{frnum})&frnum>1) gui.data.tracking.active{frnum} = gui.data.tracking.active{frnum-1}; end if(isempty(gui.data.tracking.inactive{frnum})&frnum>1) gui.data.tracking.inactive{frnum} = gui.data.tra...
function distance = distance_EMterrano(Target_Pos,Out_Table) pos_idxs=[3 4 5]; [tmp rows]=unique(Out_Table(:,2)); for i=1:numel(rows) distance(i)=norm(Out_Table(rows(i),pos_idxs)'-Target_Pos); end end
function runGetPSTH(varargin) % This function runs the getPSTH.m file that is used to compute the psth % for the given channel % use:runGetPSTH(varargin) % inputs are: % 'num' : channel number, should be a string . like '1' % 'date' % 'binsize' % 'startTime' % 'stopTime' %$KK p = inputParser; p.addParameter('num',[],@i...
function assigned_class = hoplscfindclass(yc,class_thr) % assign samples for PLSC on the basis of thresholds and calculated responses % nobj = size(yc,1); nclass = size(yc,2); for i = 1:nobj pred = yc(i,:); chk_ass = zeros(1,nclass); for c = 1:nclass if pred(c) > class_thr(c); chk_as...
clc clear all sig=2.5; S=25; I=im2double(rgb2gray(imread('Penguins.jpg'))); for i=-floor(S/2):1:floor(S/2) for j=-floor(S/2):1:floor(S/2) Gc(i+floor(S/2)+1,j+floor(S/2)+1)=(2*pi*sig^2)^(-1)*exp(-(i^2+j^2)/(2*sig^2)); end end Gc=Gc/sum(Gc(:)); figure surf(Gc); figure imshow([I conv2(I...
clear; close all; figure('color','white'); % Lb=[0:0.001:66]; % n=ceil((1-0.000005).^(-8*(Lb.*1000+8+(Lb.*1000+20)/(1500-20)*28))); Lb=[2:0.001:66]; n1=ceil((1-0.000005).^(-8*(Lb*1000+8+(Lb*1000+20)/(1500-20)*28))); n2=ceil((1-0.000003).^(-8*(Lb*1000+8+(Lb*1000+20)/(1500-20)*28))); time1 = (n1*20-10)*60+(n2*20-10)*12...
% vimp=load('D:\CMTC\bothlead\Rp16\ugly\1\vimp.txt'); % [dosmap,rev,vimp]=spec_sedis_sp(1,1,.2,5,.2,1.2,300,1,vimp); % [dosmap,rev,vimp]=spec_sedis_sp(1,1,.2,5,.2,3,300,1,vimp); vimp=load('D:\CMTC\bothlead\Rp16\ugly\2\vimp.txt'); [dosmap,rev,vimp]=spec_sedis_sp(1,1,.2,5,.2,1.2,300,1,vimp); [dosmap,rev,vimp]=spec_sedis_...
function c = cost(sfile,tNow,xFinal,mdl,wave,ss,pto,l) % cost.m E.Anderlini@ed.ac.uk 06/03/2017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This function returns the mean generated power as cost function for the % optimization of the latched mode duration. % N.B.: Instea...
function [noised_signal, noise, r] = randNoise(signal, sampling_frequency, line_frequency, noise_ratio) %TODO: remove the noise first? samps_per_cycle = sampling_frequency/line_frequency; MIN_SAMPS_PER_CYCLE = 60; if(samps_per_cycle > MIN_SAMPS_PER_CYCLE) interp_mode = "linear"; else ...
function [] = save_results( fullpaths,data ) %UNTITLED4 Summary of this function goes here % Detailed explanation goes here disp('Saving results as excel files...'); [folder_name,~,~]=fileparts(fullpaths{1}); FilterSpec = {'*.xls', 'Excel Spreadsheet (*.xls)'}; %set the filter for the next ui dial...
function Iout = noiseReduction(I,N) % that calculates first any average filter mask of size NxN and applies it to the input image. B = ones(N,N) * (1/N) Iout = zeros(256,256) for x = 1:256 for y = 1:256 for i = x:(x+N-1) for j = y:(y_N-1) Iout(x,y) = Iout(x,y) + I(i,j)*B(i-x+1,j-...
clear clc load('lambda=1.0.mat') yH2O(1) = sum(exGas.dmCond.H2O); yH2SO4(1) = sum(exGas.dmCond.H2SO4); yHNO3(1) = sum(exGas.dmCond.HNO3); ratio(1) = mean(exGas.y.HNO3.iMix ./ exGas.y.H2SO4.iMix); load('lambda=1.1.mat') yH2O(2) = sum(exGas.dmCond.H2O); yH2SO4(2) = sum(exGas.dmCond.H2SO4); yHNO3(2) = sum(exGas.dmCond.H...
function [output] = setParams(fWeight, pCH, nodeAmount, maxEnergy, distrMode) params = struct; %%%%%%%%%%%%%%%%%%%% Network Establishment Parameters %%%%%%%%%%%%%%%%%%%% %%% Area of Operation %%% % Field Dimensions in meters % params.xm=100; params.ym=100; params.x=0; % added for better display results of ...
% ========================================================================= % Function: GetTubularShearStressSF % % Parameters: shearForce(Nmm), innerDiameter (mm), outerDiameter (mm), % yieldStrength (MPa) % % Outputs: n (turbular shear stress safety factor) % % Description: Calculates the shear stress sa...
%% Initialization clear ; close all; clc %% ======================= Part 1: Plotting ======================= fprintf('Plotting Data ...\n') data = load('ex1data.txt'); X_origin = data(:, 1:end-1); y = data(:, end); m = length(y); % number of training examples % Plot Data plotData(X_origin, y); fprintf('P...
function [ sig_long, sig_short, cle ] = Cle(bar, mu_up, mu_down) %UNTITLED2 Summary of this function goes here % Detailed explanation goes here if ~exist('mu_up', 'var'), mu_up = 0.05; end if ~exist('mu_down', 'var'), mu_down = 0.05;end close = bar.close; nAsset = size(close, 2); sig_long = zeros(size(close)); sig_...
filename = input('Enter the compressed image file name for decoding: ','s'); fprintf('\n Reading the file ...'); bin=binIn(filename); nn=bin(1:9); bin=bin(10:length(bin)); nn=char(nn+48); nn=double(bin2dec(nn)); inc=200^(1/511); delta=0.5*inc^nn; fprintf('\nThe decoded image will be saved as a ".tif" file.'); fname...
% %%% % % CsgA in WT % %%% % fnames = {'/Volumes/Scratch/Chris/Paper2_Rippling/Results/Csga Development/csgA in WT/A_30/', ... % '/Volumes/Scratch/Chris/Paper2_Rippling/Results/Csga Development/csgA in WT/A_31/', ... % '/Volumes/Scratch/Chris/Paper2_Rippling/Results/Csga Development/csgA in WT/DEV_1...
function [G0] = findRefPoint(G) % find the reference point from a set of measured points % the mid point in this case is taken as the reference point % G [3,N]: input pts % G0 [3,1]: reference pts G0 = sum(G,2)./size(G,2); end
function index = get_condition_index2(convergence_data,condition) rare = find(convergence_data(:,10)== -100); % rare = [1:length(convergence_data)]'; if(strcmp(condition,'convergence')) temp = find(~isnan(convergence_data(:,1))); index = intersect(temp,rare); elseif(strcmp(condition,'noch')) tem...
norsp=normalize(sp); sum=0; m=length(vzlist); parfor i=1:m % disp(i); sum=sum+norsp(i,:).'*norsp(i,:); end sum=sum/m; [v,d]=eigs(sum,2); y=norsp*v; % figure; % scatter(y(:,1),y(:,2),[],vzlist) % scatter(vzlist,y); % scatter(y(:,1),y(:,2));
function [adjmat] = presegm( neighb, affinity, k, adj_thr) %PRESEGM performs a screening of relevant EEG predictors by grouping the candidate set into clusters to improve % efficiency and to reduce computational load. % adjmat=PRESEGM(neighb, affinity, k, adj_thr) where the input adjacency matrix 'neighb' % exclud...
function est = estimator(y, model_estimator) % est = estimator(y, model_estimator) % % This function runs a state estimator on the noisy sensor data. est = y; %For now, assume perfect sensors end
function [ best_param, perform_mat] = TuneParam_lasso3... (param_range,data,Trnidx,vadratio) %% INPUT % data: original data % YearCutoff: Year after for test. % YearVad: Year after for validation. % obj_func_str: 1-parameter optimization algorithms % param_range: the range of the parameter. array % ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% simMixer.m %%%% test simulate with quartusII %%%% spectrum analyse the output file %%%% ZHAOCHAO %%%% 2018-03-26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
function [id,table] = iccp_ccpairs_to_table(ccpairs) % iccp_ccpairs_to_table Tabulate all paired neuron data parameters % % [id,table] = iccp_ccpairs_to_table(ccpairs) % % ccpairs : struct array holding paired neuron data. Paired neuron data is % data for two neurons recorde from the same electrode chann...
function [dgamma3xds_evaluated,dgamma3yds_evaluated] = dgamma3ds(s,region) % dgamma3ds computes the derivative of the top boundary % with respect to s, for the Pataki grid given in [1]. % % % % USAGE % ----- % [dgamma3xds_evaluated,dgamma3yds_evaluated] = dgamma3ds(s,region) % % % INPUTS % ------ % ...
%% Test Script for Boni 3.0 % Script written by: % Zhuo Li (zhuol7@student.unimelb.edu.au) % The University of Melbourne close all clc clear %% Settings transducer_number = 3; %change network adapter IP to 192.168.0.XX! %IP BK2250 IP = '192.168.0.10'; %FG %Paramerters f = [100 200 400 800 1000 1...
% ID_PARAM % % Zobrazuje dalsie moznosti identifikacie, % % Spusta: % % Zadanie parametrov modelu regulovaneho procesu - PARAM_VL2 % % Podla okolnosti dava na vyber: % % POROVNAT - POROVNAT % IDENTIFIKACIA S NIZSIM RADOM - NIZSIEN % SPAT - premenna NASPAT % Copyright is with the following author(s): % % ...
K = 6000; K_y = 3600; K_e = 600; V = 400; i_y = 1; i_e = 2; d_y = 10; d_e = 3; p_y = 1; % Supposed to be closer to 1.88 f_y = 0.01; c_y = .05; p_e = 0.5; f_e = 0.1; c_e = 0.025; f = figure; hold on; alpha = 1.0; T_y = K_y - V*alpha; T_e = K_e - V*(1-alpha); s_d = zeros(601,1); % Should be time*compound+1 s_i ...
function y = translate(x, p) Mstr1 = p.fixed.str1(2); % Maximum firing rate Bstr1 = p.fixed.str1(3); % Firing rate in absence of inputs Mstr2 = p.fixed.str2(2); Bstr2 = p.fixed.str2(3); Mstn = p.fixed.stn(2); Bstn = p.fixed.stn(3); Mgpe = p.fixed.gpe(2); Bgpe = p.fixed.gpe(3);...
function [curve_coor] = io_taper_curve2(origin,phi,dx,max_xx,coef0,coef1) % This matlab function returns a 2xN array consisting coordinates of % a curve. (1,n), (2,n) are the x, y coordinates of the curve, respectively. % The function takes as inputs the parameters of the desired curve. The curve % is described as y...
function YDF(block) setup(block); function setup(block) block.NumInputPorts=1; block.NumOutputPorts=1; block.SetPreCompInpPortInfoToDynamic; block.SetPreCompOutPortInfoToDynamic; block.InputPort(1).DirectFeedthrough=true; block.SampleTimes=[-1 0]; block.SimStateCompliance='DefaultSimState'; block.SetAccelRunOnTLC(true...
%%function connected = isConnected(adj) %Goal: Return 1 if the graph is connected and 0 if the graph is not. %Inputs: Adjacency graph function connected = mbiIsConnected(adj) checkForInfty = 0; for i = 1:length(adj) checkForInfty = checkForInfty + isinf(sum( simple_dijkstra(adj,i))); end ...
function plotReadLengthVsQualDensityLogData %% Function written by Eleni Christoforidou in MATLAB R2019b. %This function creates a density plot of the read length vs the basecall %quality before filtering out low basecall quality reads. The x-axis scale %is logarithmic. %The function requires a TXT file for ...
% SitzungII.m clc; clear all; close all; disp(' VISUALISIERUNG IN 2D'); pause; disp('>> x = 1:6, y = [76 45 36 20.5 82 44.3] % (x,y)-DATENSAETZE, Z.B. VON DER MESSUNG '); disp(' (x - ZEIT UND y - GESCHWINDIGKEIT)') ...
function I2=r_invt(A,B,C,D,tol); %R_INVT Right Invertibility Structure of Proper Systems % % rights = r_invt(A,B,C,D) % % returns the right invertibility structure of a multivariable % system characterized by (A,B,C,D). % % rights = I_2 List of Morse Indices % % See also INVZ, IN...
for t=1:length(u) ts=1:(length(u)-t); plot(u(1,ts),u(1,ts+t),'.'), title(t) drawnow end
clear; clc; close all; A = imread('images/binary/binary_text.png'); A_1 = A(:,:,1); %all 3 slices contain the same data sq = ones(2); A_2 = imdilate(A_1,sq); A_3 = imerode(A_1,sq); figure, subplot(1,3,1), imshow(A_1), title('original'); subplot(1,3,2), imshow(A_2),title('dilated'); subplot(1,3,3), imshow(A_3),title('er...
function [intervals] = splitIntoIntervals(from, toInc, intervalSize) numberOfIntervals = ceil((toInc - from + 1) / intervalSize); intervals = NaN(numberOfIntervals, 2); for i=1:numberOfIntervals intervals(i, 1) = from + (i - 1) * intervalSize; intervals(i, 2) = min(from + i * intervalSize - 1, toInc); ...
classdef MHyProState < handle properties (SetAccess = public, GetAccess = public) ObjectHandle end methods (Access = private) % Destructor function delete(obj) MHyPro(13, 1, obj.ObjectHandle); end end methods (Access = public) % Constructor ...
function [ flag ] = bootstrap_hypoDD( path,path2,boot_num,verbose,HYPODD) %% Arguments description: %INPUT path: where the original hypoDD relocation files are located % main_path: bootstrap working directory. % boot_num: the number of % verbose: 1, run time display on; 0. run time display off. % ...
function doy = daynum(dateval) dateval = datenum(dateval); prevYear = datenum(year(dateval)-1, 12,31); doy = dateval-prevYear; end
function DataMain = al_ChineseVersion(taskParam, unitTest) %AL_ARCVERSION % % XX % Also refer to unit and integration tests % Contributors % Initialize task % ---------------- if ~unitTest clear vars unitTest = false; end trials = taskParam.gParam.trials; askSubjInfo = taskParam.gParam.askSubjInfo; randomize...
classdef LogRegL1FitEng < LogRegFitEng properties verbose; end methods function eng = LogRegL1FitEng(varargin) [eng.verbose,eng.optMethod] = processArgs(varargin,'-verbose',true,'-optMethod','projection'); end end meth...
clc; close all; [I, fs]= audioread('AU3.wav'); %To read the Orchestral Music l= length(I); %length of original audio signal l2=2.^nextpow2(l); % next two pwer length fi=fft(I,l2); %fft of audio signal fi=fi(1:l2/2); %fft normalized to half of length cut_off1= 200/fs/2; ...
BGR=1e7; sigma_rx=0.68e-9:0.1e-9:(1.5/1.5e8); %Nsigma=2:.1:10; Nsigma=3; clear sigma_med sigma_bar %sigma_rx=0.5/1.5e8 kN=1; %for kN=1:length(Nsigma) for k=1:length(sigma_rx) HW=max(3,2*Nsigma(kN)*sigma_rx(k)*1.5e8); Nnoise=ceil(HW*BGR/1.5e8*57); h=[(rand(Nnoise*2, 10240)-0.5)*HW*2; sigma_rx(k)*1.5e8*randn...
stripes = toy_stripes(100, 50, 25); %imwrite(stripes, 'ex2_stripes_ground_truth.png'); stripes_noise = add_sp_noise(stripes, 0.1); %imwrite(stripes_noise,'ex2_stripes_noisy.png'); stripes_filtered = median_filter(stripes_noise, 5); %imwrite(stripes_filtered,'ex2_stripes_median_filter.png'); stripes_err = calc_psnr(stri...
function experiment = TivaroVstmParadigmMain %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %usefull for data analysis experiment.identifi...
clear all cd 'C:\Users\rmukhe03\Documents\EMG_Dataanalysis\Good' m1=matfile('Insect24_Test1good.mat'); m2=matfile('Insect24_Test3good.mat'); m3=matfile('Insect24_Test4good.mat'); m4=matfile('Insect24_Test5good.mat'); m5=matfile('Insect24_Test6good.mat'); m6=matfile('Insect23_Test4good.mat'); m7=matfile('Insect23_Test3g...
close all; clear all; clc; distrib = load('mars'); % load input Gaussians % her bir sinif dagilimlar olarak temsil edilmekte % her bir gauss dagilimi Cov ve Mean ile temsil ediliyor. model = ganders(distrib); % solve the GAT figure; title('Generalized Anderson task'); xlabel('x_1'); ylabel('x_2'); ...
% xGridErrors % Make some RMSE plots for different qBOLD models, based on Fig. 4 in Griffeth & % Buxton, 2011. % MT Cherukara % 2018-10-01 clear; setFigureDefaults; % Where the data is stored simdir = '../../Data/vesselsim_data/'; vsd_name = 'Sharan'; % Which distribution we want - 'sharan' or 'frechet' mod_nam...
clc; clear; a=input('enter the value:- '); x=[1 1]; for i=3:a x=[x (x(i-2)+x(i-1))]; end x
function [ total, rank_order ] = cv_helper(geno, y, covar, top_k, n_folds, seed, ... rank_order) if nargin < 7 recompute_rank_order = true; rank_order = zeros(n_folds, size(geno, 2)); % store for future use else recompute_rank_order = false; end % Create folds rng(seed, 'twister'); I_folds = randi(n_f...
% clear %% Create Koch snowflake geometry % I pinched this first little piece of code (generating the vertices) from % https://people.cs.clemson.edu/~goddard/handouts/math360/notes11.pdf P = [ 0 0; 1 0; cos(-pi/3), sin(-pi/3); 0 0 ]; % a triangle for iteration=1:5 newP = zeros( size(P,1)*4+1, 2); for i=1:s...
function [M] = gfilt(M,varargin) %% function [M_f] = gfilt( M, Ni, Nj) % this function applys a simple moving mean % Ni time for dimension 1 (1 default) % Nj time for dimension 2 (1 default) % % use for 2D matries M % % created by % Johannes Becherer % Mon Aug 15 12:53:47 PDT 2016 i...
function eq_CBF = CBF1() a=3 beta1=0.1 T1=linspace(30,37) %----------------White matter--------------------- w0_White=80; %w0=80 ml/min/100gfigure(1); eq_CBF_White = w0_White*power(a,(beta1*(T1-37))); figure(1); subplot(1,2,1) plot(T1,eq_CBF_White); title('CBF vs Temperature, White Matter'); xlabel('Tempera...
function pHandles = plotMMData4x4(Lam,MMdata,varargin) % inputs [Lam, MMdata, b_eV, pHandles, color] numvarargs = length(varargin); if numvarargs > 3 error('plotMMData4x4:TooManyInputs', ... 'requires at most 3 optional inputs'); end optargs = {0 0 'r'}; % set defaults for optional inputs optargs(1:numvarar...
function [LLH] = PS7_YW_llh(params, data, N, T) p.rho1 = params(1); p.rho2 = params(2); p.phi1 = params(3); p.phi2 = params(4); p.beta = params(5); p.sigma = params(6); p.sigma_A = params(7); p.sigma_B = params(8); T = min(T, length(data)); % simulate long-run transition rng(0); t=5000; x=zeros(t+3,1); epsilon=p.sigm...