text
stringlengths
8
6.12M
classdef self_similar_gaussian_velocity < velocity_interface %SELF_SIMILAR_GAUSSIAN_VELOCITY Wake velocity object implementing a %symmetric Gaussian wake as described in :cite:`Bastankhah2016`. properties ct % Turbine thrust coefficient thrustAngle % Turbine thrust angle TI % Tu...
clc; clear all; %[eitimg eitgi] = readeitdat('ts_guertel_M_konf_A_01_01.bin'); %customized parameters %origfile = '0116exp/ab_xy_01_eiu_Img.mat'; %origfile='0227exp/Baoshuai/ab_xy_19_eiu_Img.mat'; origfile='0227exp/Lin_Liu/ab_xy_07_eiu_Img.mat'; genfile = 'testeit_exp07.mat'; gen_movfile = 'testeit_exp07.avi'; [eitimg ...
%% Main File % The main file for DE optimization algorithm useage. %% F = 0.5; CR = 0.9; popsize = 200; maxIteration = 10000; [globalBest, globalBestFitness, FitnessHistory] = DE(popsize, maxIteration, F, CR, @Fun); % For post-process figure(1) plot(log10(FitnessHistory))
function [yinterp,ypinterp] = ntrp113(tinterp,~,~,tnew,ynew,klast,phi,psi,idxNonNegative) %NTRP113 Interpolation helper function for ODE113. % YINTERP = NTRP113(TINTERP,T,Y,TNEW,YNEW,KLAST,PHI,PSI,IDX) uses data computed % in ODE113 to approximate the solution at time TINTERP. TINTERP may be a % scalar or a row ...
%% MASCRET Quentin - Copyright 2017 %% function [Energy]= short_time_energy(Signal, window_ms, step_ms , fs) % variables alpha=0.97; if( max(abs(Signal))<=1 ), Signal = Signal * 2^15; end; % preemphasis filtering Signal = filter( [1 -alpha], 1, Signal ); % normalisation of the Signal % ...
function [ mker ] = multker( mt, lpar, lu) %MULTKER Summary of this function goes here % Detailed explanation goes here if ~(equals(sum(lu),1)==0) disp('This message means the weight vectors were not normalized.'); disp('And we have done it automatically.'); lu=lu/sum(lu); end if ~(length(lpar)==length(lu...
% figure (1); % plot(nn11,'-.r'); % hold on; % plot(nn21, '--g'); % hold on; % plot(nn31,':b'); % hold on; % plot(nn41,'-'); % title('Gaussian Derivatives (N1)') % xlabel('time ns') % ylabel('normalized magnitude') % % % figure (2); % plot(nn12,'-.r'); % hold on; % plot(nn22, '--g'); % hold on; % plot(nn32,':b'); % h...
function ishared_activity = init_ar_activity(n_sources, T, phi1, phi2, noise_level) shared_activity = zeros(2*T,n_sources); % Hold the AR for each node. for i = 3:T shared_activity(i,:) = phi1 .* shared_activity(i-1,:) + ... phi2 .* shared_activity(i-2,:) + ... ...
function balanduino_plot(logged_data) time = logged_data(:, 1); reference = logged_data(:, 2); actual_output = logged_data(:, 3); error = logged_data(:, 4); calculated_control = logged_data(:, 5); actual_control = logged_data(:, 6); subplot(3,1,1) plot(time, reference, time, actual_output) legend('reference', 'actual...
function map = face(tester) frequenciesToKeep = 6; output = zeros(100,frequenciesToKeep); for a = 1:100; im = imread(sprintf('Images/FaceTraining/Face%1d.gif', a)); im = logical(im); %Convert the original intensity values into logical 1s and 0s c = chainCode(im); %% filter using the FT of the angles of the chaincode a...
function data = formatData(k,lag,n,T,ts,coeff,mu,explained,coeffbar,mubar,explained_bar,N_STATE_PC,A,SS_A,W,H,SS_H,Q,Explained_Mean,Explained_Trials,xbar,x,z) %FORMATDATA Put data struct into stereotyped struct format % % data = kal.formatData(...); % % Inputs % Basically everything that we want to save from `kal.kIn...
function model_close(model) %This function runs when the model is closed. It will remove the model %and its support folders from the path. mdlPath = fileparts(which(model)); paths = textscan(path, '%s', 'Delimiter', pathsep); paths = paths{1}; for p = 1:length(paths) if(strfind(paths{p}, mdlPath) == 1) rm...
folder = '../'; dd=dir([folder,'*.csv']); delimiter = ','; M=1; formatSpec = '%f%f%f%f%f%f%[^\n\r]'; data = cell(length(dd)/M,M); for ii=1:length(dd) filename = dd(ii).name; index=strsplit(filename,'_'); kk=str2double(index{1}); fileID = fopen([folder,filename],'r'); dataArray = textscan(fil...
L=7; M=5; % x = audioread("doors.wav"); % x = x(2001:3000); % x = x'; h = create_lpf(L,1); xi = zeros(length(x)*L,1); xi(1:L:end) = x; nv = conv(h,xi); y = pp_interpolate(x,h,L); %>> norm(y(1:7200)-nv) % % ans = % % 1.1927e-15 %
function nii_sum (P, sumname); % Adds all input images together and saves cumulative image % P = filenames to average (optional) % if not specified, dialog prompts user to specify images % sumname = filename of output (optional) % if not specified, prefix 'sum' appended to first filename % % Example % ...
%Generating PolarNRZ line code function [t, x] = PolarNRZ(bits, Tb) T = length(bits) * Tb; N = 40; Ws = (N*2*pi)/Tb; Ts = (2*pi)/Ws; t = 0:Ts:T; x = zeros(1,length(t)); for i = 0:length(bits)-1 if bits(i+1) == 1 x(i*N+1:(i+1)*N) = 1; else x(i*N+1:(i+1)*N) = -1; end end
function [myCMCQNCS, classMatch, SEFF, processors] = readXML_CMCQNCS_SEFF(filename,verbose) % Q = READXML_CMCQNCS_2(A) reads an XML file A, that holds the % description of an LQN model, and builds a Closed Multi-Class Queueing % Network with Class Switching (Q) for analysis. % % Parameters: % filename: filepath...
% %%psk clc; clear all; runs=1; M=2; k=log2(M); n=k*1000; EbNo_db=20; EbNo=10.^(EbNo_db/10); beta=0.5; sps=8;%Samples per symbol span=20; tblen = 10; tb=16; const = pskmod([0:M-1],M); Offset1=1; Offset2=1; Offset=abs(Offset1-Offset2); Symbols = pskmod([0:M-1],M); rng default; for j=1:length(EbNo) AvgEr=0; h...
function Y=rotrc(X,row,col) % ROTRC - rotation of rows and columns of a matrix % % USAGE: Y=rotrc(X,row,col); % % Input : X ... matrix to be rotated % row ... rotate rows by row (integer) % col ... rotate columns by col (integer), % default: col=0 % Output: Y ... ...
%% YPOLOGISTIKH NOHMOSUNH 2021 PTUXIAKH EXETASTIKH %% NIKOLAOS ISTATIADIS AEM:9175 clear; clc; close all; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% REGRESSION ON %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MULTIDIMENTIONAL DATATSET %% EISAGWGH TWN DEDOMENWN SUPERCONDUCTIVITY DATASET ...
function w = train_logistic_regression(xtrain, ytrain, lambda) % the output is the trained model with parameters w and b n = size(xtrain, 1); m = size(xtrain, 2); % initialize xtrain_with_one = [ones(n, 1) xtrain]; w = zeros(m + 1, 1); theta = 1; epoch = 100; for i=1:epoch mu = logsig(xtrain_with_one * w); grad...
function [PARES WW DIST]=func_find_pares(P0,WMAX,CENTER,DIST_UMBRAL) N=size(P0,1); N2=floor(N/2); PARES=cell(N2,1); WW=cell(N2,1); DIST=zeros(N2,1); II=1; while size(P0,1)>0 Pt1=P0(1,:); P0(1,:)=[]; WMAX1=WMAX(1); WMAX(1)=[]; IDd=func_find_close_t...
% Timothy Smith %Oscillators Chapter 16 Y-T Mode figure % Time Domain View subplot(2,1,1) plot(X,CH1,'m') labx=xlabel('Time (s)'); labx.FontSize=16; laby=ylabel('Volts(V)'); laby.FontSize=16; t=title('Signal Generator Output at 154.402 Hz'); t.FontSize=18; subplot(2,1,2) plot(X,CH2,'k') labx=xlabel('Time (s)'); labx...
function [w_D,A_BS,A_BS_pinv,theta,A_BS_OS,theta_OS]=func_codedesign(delta_inv,theta_min,theta_max,N,S,control_plot,l_plot,delta_theta,OS_rate) delta = 1/delta_inv; i_set = 1:delta_inv; theta = theta_min + (delta_theta/2) + (i_set-1)*delta*(theta_max-theta_min); A_BS = exp(1j*pi*(0:N-1)'*sin(theta)); if delta_...
function [ ] = CrearPla( x1, y1, z1 ) %UNTITLED2 Summary of this function goes here % Detailed explanation goes here pointA = [x1,y1,z1]; % x, y, z pointB = [0,y1,z1]; % x, y, 0 pointC = [0, 0,z1] ; % 0, y, z pointD = [x1,0,z1]; points = [pointA' pointB' pointC' pointD']; fill3(points(1,:), points(2,:), points...
clear all;clc;close all %Load HRTF data filename = "hrir_final.mat"; load(filename); %Load audio source filename_1 = 'Taylor Swift - Gorgeous (Lyric Video).wav'; [y,Fs] = audioread(filename_1); y_freq = fft(y); %Load RIR data filename_2 = 's1_r1_b.wav'; [ry,rFs] = audioread(filename_2); %Sound positi...
clc; clear all; close all %%%%% PARA TP 2 %USANDO LOS DATOS DE LA GRAFICA DADA K=0.1; wn=561; zi=0.5; s=tf('s'); %Comparacion de la respuesta al escalon y la delta para un mismo sistema %con zita=0.4 g=K*wn^2/(s^2+2*zi*wn*s+wn^2); %polos=pole(g) step(100*g) %% clc; clear all; close all; %%%%% PARA TP 2 %U...
function [ ] = removeRow(obj, idx) % 删去一行,改变obj.yProps和obj.data和obj.Ny % [ ] = removeRow(obj, idx) % idx: 待删除行行号 % ---------------- % 程刚,20150519,初版本 % TODO: 能否改成接受参数idx 或 nameStr %% 预处理 % 判断idx范围正常 if idx < 0 || idx > length( obj.yProps ) error('idx=%d,超出范围!',idx); end %% main obj.yProps(idx) = []; ob...
function ThisInsDataWithCost = computeCost(ThisInsData) %computeCost 计算ThisInsData中每条路径的费用(必须有更新的wff) % 输入 % ThisInsData 完整含wff的数据结构体 % 输出 % ThisInsDataWithCost 增加含Vehilce.Cost_***的数据结构体 %% function ThisInsDataWithCost = computeCost(ThisInsData) da = ThisInsData; wff = da.Veh_Cus.wff...
classdef face < handle properties(SetAccess = private) V=vertex.empty;% Left base vertex of this face N% 2D unit normal vector pointing away from the polygon end methods function thisF=face(LV,normal) thisF.V=LV; thisF.N=normal; end en...
function [Theta2, Theta1] = updateWeights(X, y, out, Theta1, Theta2, k, j, eta, v1) %updating the weight for the outermost layer delta = y(1,j) - out; Theta2(1,k) = Theta2(1,k) + eta*(delta*v1(k)); %Weight update for hidden-input layers Theta1(1,k) = Theta1(1,k) + eta*(sigmoidGradient(v1(k))*(y(j) - out)*Thet...
function op_lfp_power_change_by_optosti(file, fpass, pathsave) [~,chan] = plx_ad_chanmap(file); [~,freqs] = plx_adchan_freqs(file); [~,chandata] = plx_adchan_samplecounts(file); chan = chan(chandata ~= 0 & freqs == 1000); Numchan = numel(chan); window = 4; % ÉèÖô°³¤¶ÈΪ 1 s band = 3; for j = 1 : 1 [Fs,~,~,~,lfp]...
function writeFeatureFile(filename, featureCollection, description) fido = fopen(filename, 'w'); numAdditional = numel(featureCollection{1,1}); numFeatures = numel(featureCollection{1,3}); fprintf(fido, '%.0f %.0f\n', numAdditional, numFeatures); for i = 1:numel(description) fprintf(fido, '%s\t', description{i})...
classdef City < Model.Node methods function obj = City(name, index) obj = obj@Model.Node(name, index); end end end
function [sibhes, manifold, oriented] = determine_sibling_halfedges(nv, elems, varargin) %DETERMINE_SIBLING_HALFEDGES constructs an extended half-edge data structure % for a non-oriented or non-manifold surface mesh. It works for both % triangle and quadrilateral meshes that are either linear and quadratic. % % [S...
t_seg = 1000; t_seg_xtra = 1000; M_PI = pi; vsasl_venc = 4; GAMMA_H1 = 26754; t1 = 0.0; t2 = (t1 + t_seg) ; t3 = (t2 + t_seg_xtra + 2*t_seg) ; t4 = (t3 + t_seg); t5 = (t4 + 2*t_seg_xtra + 2*t_seg) ; t6 = (t5 + t_seg) ; t7 = (t6 + t_seg_xtra + 2*t_seg) ; ...
%{ %File: main.m %Project: Autonomous Vehicles Lab | Kalman Filter %File Created: Thursday, 19th November 2020 8:14:28 AM %Authors: Rudra Patel % Kojo Anyinam-Boateng %Emails: rudra.patel@eleves.ec-nantes.fr % kojo.anyinam-boateng@eleves.ec-nantes.fr %Version: 1.0 %Brief: %----- %Last Modified: Tuesday, ...
clc;clear close all %所有数值按字母顺序排列 A C D E F G H I K L M N P Q R S T V W Y %求20个氨基酸疏水值的平均值和方差, %shushui存放20中氨基酸5种特征的原数值,每行代表不同特性,分别是疏水,极化率,极性,二级结构和密码子多样性 %shushui_junzhihua存放的是20中氨基酸均值化后的5种特性数值,每行代表不同的特性,同上 shushui=zeros(5,20); W1=zeros(5,2); shushui_junzhihua=zeros(5,20); %20种氨基酸疏水特性数值 shushui(1,1)...
function varargout = roiSelector(varargin) % ROISELECTOR MATLAB code for roiSelector.fig % ROISELECTOR, by itself, creates a new ROISELECTOR or raises the existing % singleton*. % % H = ROISELECTOR returns the handle to a new ROISELECTOR or the handle to % the existing singleton*. % % ROISELECT...
clc; clear; close all; folder = 'Citra uji'; filenames = dir(fullfile(folder, '*.jpg')); images_total = numel(filenames); test_input = zeros(6,images_total); for n = 1:images_total full_name= fullfile(folder, filenames(n).name); Img = imread(full_name); Img = im2double(Img); % E...
%script18_8.m figure('Position',[80 80 280 220],'Menubar','none'); axes('position',[0.15 0.15 0.8 0.8]); axis([0 1 0 1]); set(gcf,'WindowButtonDownFcn','draw_lines(''down'')'); set(gcf,'WindowButtonMotionFcn','draw_lines(''motion'')'); set(gcf,'WindowButtonUpFcn','draw_lines(''up'')');
function content = getMessageContentAsByte(obj) % GETMESSAGECONETENTASBYTE Gets message content as a byte array % The content is returned as a uint8 array % Copyright 2019 The MathWorks, Inc. content = uint8(obj.Handle.getMessageContentAsByte()); end
function [ Results ] = uq_subsetsim( CurrentAnalysis ) % RESULTS = UQ_SUBSETSIM(CURRENTANALYSIS) performs a subset simulation % analysis of CURRENTANALYSIS and stores the results on the "Results" % struct. % % See also: UQ_RELIABILITY, UQ_MCMC Options = CurrentAnalysis.Internal; % Keep track of constant ma...
clear all close all tic list_cdom=dir('Ed0_Files/24_48/Ed0_*.mat'); l_cdom=length(list_cdom); spectrum_path=cd; % Load optical properties load('PureWater.mat') % Determine depth steps within the cell (m) depth=[0:0.001:0.05]; % Depth range Wavelength=250:700; % Time point possible time_possible=[...
function [ j, k ] = tripick( face, i ) % [j,k] = tripick(face,i) % pick [j,k] != i from face, preserving cw/ccw ordering fi = find(face==i); face = circshift(face,[0,1-fi]); j = face(2); k = face(3); end
% OCT0897a % script to filter a random noise % by the Gammatone filterbank % check out the cross correlations % and save sounds to files Fs = 30000; duration = 0.1; rampdur = .005; maxval = 2048; fpath = 'd:\kip\noisetc\gamma\'; fsuffix = 'b.noi'; % use random noise or some file from disk Path = input('...
%Programar el método de la factorización LU de forma que se puedan resolver % varios sistemas con la misma matriz. %Comparar con el comando lu de Matlab. % Au=b con A simétrica definida positiva, se puede factorizar como A=BB^T % con B matriz triangular inferior. % Nos devuelve la matriz B factorizada function [B] ...
%% Monta Carlo Simulations of OFDM with QPSK under AWGN Noise SNR = 1:20 ; sep = zeros(size(SNR)); for n = 1:length(SNR) bitstream = generatebits(1e6); % input bit stream symbolstream1 = qpskmod(bitstream); % QPSK symbol stream symbolstream2 = ofdmmod(symbolstream1,4,1); % OFDM Symbol Stream with NC=4 and N...
% function to visualize network data at a given iteration in runtime function visualize_runtime(sensory_data, populations, tau, t, d) if(d~=length(sensory_data.x) && tau~=1) set(gcf, 'color', 'w'); % activities for each population (both overall activity and homeostasis) subplot(3, 3, 1); acth3 = plot(po...
%naturalimages=importdata('NaturalImages_rgb.mat'); % In addition to the existing feature histogram peaks are taken into account. spamimages=importdata('SpamImages_rgb.mat'); [m,n]=size(spamimages); for ii=1:n image=cell2mat(spamimages(1,5)); image=double(image); image=image./255; hslimage=rgb2h...
% calculate the intersection between 2D lines l1 and l2 % where l1, l2 are nx2x2 arrays % with each 2x2 slice containing [x0; dx] function [p t1 t2] = lineIntersect2D(l1, l2) den = l2(:,1,2).*l1(:,2,2)-l2(:,2,2).*l1(:,1,2); num = l1(:,2,2).*(l1(:,1,1)-l2(:,1,1))+l1(:,1,2).*(l2(:,2,1)-l1(:,2,1)); t2 = num./den; t1 ...
function res = importCrspIndices(fullzipfile) % IMPORTCRSPINDICES Imports the zipped CRSP msix, dsix and similar datasets into a table % % IMPORTCRSPINDICES(FULLZIPFILE) % Full path to the zipfile writeto = '.\results'; [~,datasetname] = fileparts(fullzipfile); % Unzip and loadf as row strings csvfile = un...
%PO观测节点压力 GO观测管段流量 S阻力系数 %数值 节点或管段号 工况 function [sum] = dragCoefficientIdentification(A,D,Re,u,p,S,e,PO,GO) sum=0; [G_Cal,P_Cal] = hydraulicCalculation(A,D,Re,u,p,S,e); %获取数据数量 [p_length,~]=size(PO); [g_length,~]=size(GO); %求压力 for i=1:p_length poi=PO(p_length,1); poi_num=PO(p_length,2); pci=P_Cal(poi_num); s...
function[punta_px, punta_py, datos_x_1, datos_y_1, recta_1, datos_x_2, datos_y_2, recta_2, flag_descarte] = hexagono_individual_funcion(directorio, camara, tag_x, tag_y, graficos, guardar) % funciona con el algoritmo que llamé "idea 2" % graficos vale 'on', 'off' % guardar vale 1 o 0 dir_camar...
function y = convertToMBImg(x,Ng,Mg,nb) c=class(x); y=zeros( Ng, Mg,nb); x=reshape(x,Ng*Mg,nb); for i=1:nb z=x(:,i); z=reshape(z, Mg, Ng); y(:,:,i) = z'; end y=cast(y,c); end
function er = simulatePolicy(st_init,a_init) load ../results/lightbulb_problem.mat if a_init == 2 || sum(st_init) >= 31 || st_init(1) == -1 er = (max(st_init)-min(st_init))/sum(st_init); else c = 7; reps = 10; S = lightbulb_problem(c).mdp.states; policy = lightbulb_...
%输入计算初始参数 d1 = '2012-08-24'; d2 = '2015-08-21'; index = '000001.SH'; % index = '399001.SZ'; period1 = 240; p=40; %调用Hurst_strategy_new,得到买卖时点和相应价格 [buy,sell,in1,time] = Hurst_strategy_new(d1,d2,index,period1,p); %以下部分为策略评价和报告输出 xlswrite('D:\纪尹杰\Hurst测试\回测报告.xls',{'策略回测报告'},'Sheet1','A1'); %起止时间 xlswrite('...
function logInfo(message) %LOGINFO Convenience function for simple logging % Detailed explanation goes here logger = ether.log4m.Logger.getLogger('root'); logger.info(message, true); end
function HEAD2MAT(file) % HEAD2MAT merges heaphone-TF2 to matfile. % % HEAD2mat(name_core) % name_core is the name of file without extension xx.sc2 % The matlab-file will be name_core.mat % Klaus Hartung (hartung@aea.ruhr-uni-bochum.de) % Lehrstuhl fuer allg. Elektrotechnik und A...
classdef (Abstract) Test < matlab.unittest.TestCase properties drawEnabled = true fig % figure iPlot % current plot params = struct % parameters of current test joinedParams = '' name = {'', ''} % name of the current test end methods (TestMethodSetup) function setup(testCase) ...
function [arm_angles] = inv_kin(r, theta, z) % inv_kin() takes cylindrical coordinates and converts to 3 joint angles for the mearm. % % r % theta % z L_link=80; %mm %% offset values r=r-45-16; %% find theta_1 theta_1 = theta; %% find theta_2, 3 L = sqrt(r^2 + z^2); temp_angle = acos((L^2-2*L_link)/(2*L_link^2));...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MDN month average % Takes MDNsort data, and averages it daily and then monthly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Run setup - import data from files GreatLakesMDN %To run sktt and store values %Change site name to desired s...
function [K,kp,P] = Cguide(H,Q,R,lambda1,b,bark1) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % [K,kp,P] = Cguide(H,Q,R,lambda1,b,bark1) - implementation of (C1)-(C4) % H,Q,P - positive definite 6x6 matrix % R - positive definite 3x3 matrix % lambda1,b,bark1,k - positive scala...
function [d]=collect_stats_b(d,st,et) %initialize structure if no existing data if length(fieldnames(d.s))<2 d.s.counts=[]; d.s.mom=[]; d.s.avg_mom=[]; d.s.temp=[]; d.s.pres=[]; d.s.quat=[]; d.s.lines=[]; d.s.dea_t=[] ; d.s.v1t=[]; d.s.v2t=[]; d.s.v3t=[]; d.s.v4t=[]; ...
function [ Sheet1T,out_table1 ] = an_andrea_add_missing( Sheet1T,out_table1 ) %UNTITLED Summary of this function goes here % Detailed explanation goes here out_table1colmissing = setdiff(Sheet1T.Properties.VariableNames, out_table1.Properties.VariableNames); Sheet1Tcolmissing = setdiff(out_table1.Properties.VariableN...
%data = importdata('../plot/fig2/gamma0=0.0001.dat'); %plot(data); %saveas(gcf,['./','test','.jpg']); close all; clear all; datapath1='aa.dat'; load(datapath1,'aa'); datapath2='bb.dat'; load(datapath2,'bb'); datapath3='cc.dat'; load(datapath3,'cc'); datapath4='dd.dat'; load(datapath4,'dd'); h = figure('visible...
function stopOnlineTracking % stopOnlineTracking (no arguments) % Stops the periodic timer event that runs the online tracking algorithm. % See Also: 'startOnlineTracking' global MTT; %multi-target tracking run-online variables if isempty(MTT) error('no MTT: perhaps not started?'); end stop(MTT.timer)...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Velocity Classification through Vibration Pattern Recognition % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% STARTUP OPERATIONS % Before launching the script, make sure to activate the current % project by double clicking on it...
function spc_opennext global spc try [filepath, basename, filenumber, max] = spc_AnalyzeFilename(spc.filename); catch error('Current filename not specified'); end next_filenumber_str = '000'; next_filenumber_str ((end+1-length(num2str(filenumber+1))):end) = num2str(filenumber+1); % if max == 0 next_file...
clearvars -except finalDS close all warning('off') %% Normalize firing rates and Shift Correlation Values Up for pt=1:size(finalDS.eighteenAQ, 2) for qt=1:size(finalDS.eighteenAQ, 1) matrix = finalDS.eighteenAQ{qt, pt}; if ~isempty(matrix) % finalDS.eighteenAQ{qt,pt} = mat...
clear;clc;%close all dates_all={'Dec_17_13' 'Dec_18_13' 'Dec_19_13' 'Jan_08_14' 'Jan_08_14' 'Jan_06_15'... 'Jan_06_15'}; % 'Mar_24_15_A' didn't have the inline heater on, not using it cellnum_all={'C' 'A' 'A' 'A' 'B' 'B'... 'C'}; rate_all_all=cell(1,6); for k=1:numel(dates_all) eval(['load ' pwd '\voltage...
% % masterscript.m % First created February 21, 2013 by Itai Axelrad % Runs all seven function and organizes outputs and plots % Uses user-defined functions: LUfact.m, shear\_moment.m, wbeamselect.m, % ang\_disp.m, stressstate.m, transplot.m and fsplot.m % % Input Variables: % w=distributed load in kips % L=lenght of t...
% @author: Asaf %clear; close all; clc; clearvars -except 'Robot_A_final_trajectories' 'Robot_B_final_trajectories' 'Robot_A_final_cov' 'Robot_B_final_cov'; scenario = 'mrbsp_ros_tutorials'; scenario_folder = ['..' filesep 'scenarios' filesep scenario]; current_run_name = 'ANPL_Researcher_2019-12-09_04-37-47'; curre...
% The model configuration for the test suite robots % % Author : Darwin LAU % Created : 2016 % Description : classdef TestModelConfig < ModelConfigBase properties (Constant) MODEL_FOLDER_PATH = '/test_models'; LIST_FILENAME = '/test_models_list.csv'; end methods ...
function v = leadfield_hom_xy(xy_0, xy_1, xy_j, sigma) % SIGMA = 1; if nargin<4 || isempty(sigma) sigma = SIGMA; end xy_r = xy_1-xy_0; r = sqrt(sum(xy_r.^2)); j = sqrt(sum(xy_j.^2)); cos_theta = (xy_r'*xy_j) / (r*j); v = (j * cos_theta) / (4*pi*sigma*r^2);
function [isInBox] = verifyIfCircleIsInBox(circle, box) isInBox = true; [circleSquareBoxX , circleSquareBoxY] = getCircleSquareBox(circle) [xExtremumMatrix, yExtremumMatrix] = getExtremumCoord(box) sideMatrix = box.sideMatrix; [~, colunms] = size(sideMatrix); % Vérification suivant les x for i = 1:1:colunms xMatrix...
function Main %Read Data from file Data = readData(); %Neuron matrix 3x3, weights 4; N = rand(3,3,4); representDataInSpace(Data,N); IterationsForOrdering = 100000; MaximumConvergence = 50000*size(N,1)* size(N,2); S0=sqrt(size(N,1)* size(N,2)); T1 = IterationsForOrdering/log(S0); alpha0 = 0.1; alpha_limit =0.01; S_...
plotType=3; PON = 1; cutoff = .05; switch plotType case 1 %gamma dvunits = ''; dvlabel = '\Gamma'; dvaxis =[0,1.4,0.05,0.40] dv=' g' ptype= 'gamma'; case 2 %angle dv='ang1'; dvunits = '\circ'; dvlabel = 'Angle (\circ)'; ptype= 'angle'; ...
classdef FrictionParabolicBowl2d < SWEConventional2d properties (Constant) hmin = 1e-4 gra = 9.81 end properties (Constant) h0 = 10 a = 3e3 B = 5 k = 0.002 T = 2*672 end methods ( Access = public ) function obj = FrictionParabolicBowl...
function prospective_pfcfwdreplays(thisdir,label,ilab) disp(['Start prospective_pfcfwdreplays ' label]) numshuff = 1000; load(thisdir,[label '_replay_singlebothjoint'],[label '_Cand_sig_modu_include'], ... [label '_PFCreplayspikes_binned'],[label '_PFCreplayspikes_list'],... [label '_replay_shuffle_p'...
function plotColorSpace(cs_image, rgb_image) coord = reshape(cs_image, [], 3); color = reshape(rgb_image, [], 3); x = coord(:,1); y = coord(:,2); z = coord(:,3); scatter3(x(:), y(:), z(:), ones(size(x(:))), color); xlabel('Y'), ylabel('Cb'), zlabel('Cr'); axis square set(gca, '...
function exportFigure(name,type) %exportFigure - save the current figure to the file name and format %specified... % There are various types possible... switch type case 'png' opt = '-dpng'; case {'jpg','jpeg'} opt = '-djpeg'; case 'eps' opt = '-depsc'; ...
%2. A figura abaixo representa um eixo vazado com raios internos variando %entre 15 e 20 mm(incremento de 0.25 mm) e raios externos variando %entre 25 e 30 mm, com o mesmo incremento. Considerando G = 80 GPa, %traçar um gráfico no Matlab da variação dos diâmetros em função da rigidez %torcional do eixo. clear ...
function [SDbw] = indexSDbw( data, Dmatrix, nCatFeature, clu, varargin) %%%Input: %data: row wise, normalized data for clustering, nCatFeature first %Dmatrix: a precomputed pairwise distance, just to save computation %nCatFeature: number of Categoric feature in the dataset %clu: clustering , partition...
%> @brief Convert body struct to a spatial_v2 model %> The purose of this is to facility an ease of conversion between %> spatial_v2 and RBDL via files read in by yaml function [model] = body_struct_to_spatial_model(robot, gravity) if nargin < 2 gravity = -9.81; end % dim = body_struct.dim; % @todo Add in option ...
%========================================================================== % MN_Model_Destexhe2001.m % Author: Akira Nagamori % Last update: 8/5/19 % Descriptions: %========================================================================== close all clear all clc %% %% theta_m = -35; %(mV) theta_h = -55; %(mV) the...
function display(Lfd) fprintf(['NDERIV = ', num2str(Lfd.nderiv),'\n']); fprintf('\nWFD:\n'); display(Lfd.wfdcell); fprintf('\nAFD:\n'); display(Lfd.afdcell); fprintf('\nUFD:\n'); display(Lfd.ufdcell);
function result=ConcatenateTones(tones,overlap_time) % 连接tones中各个信号,叠接时间为overlap_time overlap_time=int64(overlap_time); if(length(tones)>2) % 递归 first=ConcatenateTones(tones(1:int64(length(tones)/2)),overlap_time); second=ConcatenateTones(tones(int64(length(tones)/2)+1:end),overlap_time); ...
function [ targetList] = signalProcessing( rawData, radarParameters ) %RADARSIGNALPROCESSING: Signal Processing of the Radar Signal to get the %output as a dected target list with estimated range, velocity and DOA and %the pulse compression value % rawData = radarSignal_1; % radarParameters = radarParameter; ...
clc x = 1:4; f = (x + 5)/30; if min(f) >= 0 && max(f) <= 1 && sum(f) == 1 fprintf('sim') else fprintf('nao') end
clear close all % FENE-P eta_s = 4.27; eta_p = 0.43; L = 1; lbd = 0.0001; ##eta_s = 0.012; ##eta_p = 0.378; ##L = 2; ##lbd = 2; gammaP = 1:1:1e6; delta1 = 1 + sqrt(1+((2*L^6)./(27*(lbd^2).*(gammaP.^2).*(L^2-3)^2))); delta2 = 1 - sqrt(1+((2*L^6)./(27*(lbd^2).*(gammaP.^2).*(L^2-3)^2))); FeneP = eta_s + (eta_p*(...
function [ tanstruct_out ] = merge_ace_dmp( tanstruct_in, dmpstruct_in) %A function to read ACE DMP data, according to the occultations of %the input, and add the latitude and longitutde information to the input %structure. The input ACE data should use the original ACE 1km-grid. The %tangent latitude and longitude are...
%% Image Analysis Project % % Federico Badini & Stefano Bodini % Politecnico di Milano % 2014-2015 % Corso del Prof. V. Caglioti % % The following function build the name of a single image given its index function [img_name] = build_image_name(cur_img) img_name = 'Seq_Genova'; if cur_img < 10 img_name ...
function y = fun1_la num=[4 0]; den=[5 1]; step(num,den); grid on; end
function status = generateV3DPipeline(strDir) %generateV3DPipeline(strDir) This function demonstrates how to generate and % save a Visual3D pipeline script to a user specified directory. This % particular example will: % 1. Create a new workspace (File|New). % 2. Create a hybrid model (Model|Create|Hyb...
function getContours( image, contourLvl ) if nargin < 2 contourLvl = 1; end if size(image, 3) > 1 image = rgb2gray(image); end imcontour(image, contourLvl); end
function [ rnmn ] = tsEvaNanRunningVariance( series, windowSize ) %!!! series must be 0 averaged!! minNThreshold = 1; rnmn = zeros([length(series), 1])*nan; dx = ceil(windowSize/2); l = length(series); smsq = 0; n = 0; for ii = 1:l minindx = max(ii - dx, 1); maxindx = min(ii + dx, l); if (ii == 1) ...
function [count,whichone]=typeofvar(str,inoutother,cw); thisstr=str; if ~isempty(findstr(str,'_f')), thisstr=str(1:(findstr(str,'_f')-1)); end if length(find(strcmp(thisstr,inoutother{1})))>0, whichone=1; end if length(find(strcmp(thisstr,inoutother{2})))>0, whichone=2; end if length(find(strcmp(thisstr,inoutother{3}))...
clc;clear; n=10 gamma=0.9 A(1,2)=1; A(2,1)=1; A(1,3)=1; A(3,1)=1; A(1,4)=1; A(4,1)=1; A(2,5)=1; A(5,2)=1; A(5,6)=1; A(6,5)=1; A(6,2)=1; A(2,6)=1; A(6,7)=1; A(7,6)=1; ...
function [subSubjectFolders,nFolder,GAexist] = find_subject_folder(folderName) subSubjectFolders = dir(folderName); subSubjectFolders = subSubjectFolders ([subSubjectFolders(:).isdir]); if any(strcmp({subSubjectFolders(:).name},'GA')) subSubjectFolders(strcmp({subSubjectFolders(:).name},'GA')) = []; GAexi...