text
stringlengths
8
6.12M
%% AG.Mitchell - 27.05.20 %% Analysis script looking at differences in response to different line contrasts for the landmark task % Script runs through right side longer responses for each line contrast ( % top left = black; top left = white) to see if visual illusion may be % biasing response %% Setting paths clear ...
function [sol] = ProxMapping(data, Bundle, control, BarX, c, LS) %%%% use mosek conic optimier %%%% clear map_prob; clear map_res; clear map_sol; % How to change the parameters that controls % the accuracy of a solution computed by the conic % optimizer . param = []; % Primal feasibility tolerance f...
% close all import SMASH.ImageAnalysis.Image import SMASH.Spectroscopy %Clean Data dfile='data_with_background_corrected.hdf'; wfile='hgne_corrected.hdf'; tfile='data_with_background_corrected.hdf'; d=Image(fullfile('\\snl','home','spatel','S1009830','Documents','ZShots','z3084','SVS5',dfile),'sydor'); data=d.D...
%%in barnamei baraye WIENER FILTER ast,BARAYE %EJRAYE BARNAME HAME BARNAME RA ENTEKHAB KARDE(Ctrl+A & Ctrl+C)VA DAR Command %Window MATLAB PASTE KONID. clear all; clc; close all; Img_in=imread('11.tif'); figure(1); imshow(Img_in,[]);title('tasvire vorudi'); [m,n]=size(Img_in); FFT=fftshift(fft2(Img_in)); a=2; b=2; [V,...
classdef PoolLayer < handle %PoolLayer NN layer that does only max pooling properties lastForward poolSide % Can think about maxMask as the "weight" matrix maxMask end methods function obj = PoolLayer(poolingSideLength, stride) ...
clc clear all; global n Y_n_a Y_n_r Y_line_net reply voltage M M1 P_d_k ... P_k_Max P_k_Min Q_d_k Q_k_Max Q_k_Min G_conn c2 c1 V_k_M V_k_m lcount t0=tic; n=input('Please Enter the particular IEEE Test Case You wish to run this Simulation for\nby indicating the number of buses.\nWarning:Valid Test Cases consist...
%% DEMO_create_run_import_FEBIO_spheres % Below is a demonstration for: % % * The use of TETgen for meshing based on surface geometry % * The specification of boundary conditions for FEBio % * The exporting of .feb files % * Running an FEBio job with MATLAB % * Importing FEBio results into MATLAB %% clear...
function [time_idx_new, time, Time] = workaround_shift_timeidx(num_timepoints, timebase, varargin) %WORKAROUND_SHIFT_TIMEIDX Summary of this function goes here % Detailed explanation goes here %-------------------------------------------------------------------------- % WORKAROUND %----------------------------------...
function [diagonal_element_H_1,diagonal_element_H_2, diagonal_element_H_3, ... diagonal_element_L_1,diagonal_element_L_2,diagonal_element_L_3] = ... Diagonal_element ... (x,H_Reg1,H_Reg2,H_Reg3,H_Reg4, it, matrix_7,matrix_8, extension_case,type_of_symmetry,option) %% periodic boundary conditi...
close all; clear all; addpath('/Users/woodie/Desktop/Compressed-Sensing-Delay-Estimation/matlab/lib'); % Parameters Fs = 500; % Sampling rate Ts = 1.0 / Fs; % Time interval low_freq = 0; %14.8; high_freq = 200; %15.8; % Prepare simulated data res_name = 'test'; n = 10000; time_ind = 1:n; pe...
% Generate data sig_e = 0.5; % std of the noise X = [-12 -10 -3 -2 2 8 12 14]'; N = length(X); Y = sin(X) + sig_e * randn(N,1); % N x 1 % Basis functions M = 4; % number of basis functions phi = @(x) [1 x.^(1:M-1)]; % Basis function matrix PHI = zeros(N,M); for i = 1:N PHI(i,:) = phi(X(i)); % N x M end % Prior var...
%Jake Tully 100904392 % % TE Modes optical waveguide % circular Nano particals on square waveguide clear clc close all %Parameters c = 299792458; % m/s lambda = 1550*10^-9; f = c/lambda; up = lambda*f; no = 1; n1 = 1.444; nm = 0.5 - 11i; DelNeff = 10^-5; Bo = (2*pi*1.443953)/lambda; B =(2*pi)/lambda; e1 = (8.85418781...
function [] = plot_conjuntos(Conjuntos,n) %UNTITLED13 Summary of this function goes here % Detailed explanation goes here [a,~] = size(Conjuntos); figure(n) hold on for i=1:a [x,y] = trapecio(Conjuntos(i,:)); plot(x,y) end ylabel("Grado de pertenencia", 'Fontsize',12) xlabel("Entrada", 'Fontsize',12) title("Con...
clear all VSXName='C:\Users\verasonics\Desktop\Vantage-3.0.4/MatFiles/L7_4_pcd_trigblock_fast'; %% Define variables opath = 'C:\Users\verasonics\Desktop\Vantage-3.0.4\Vandiver\'; % path to output files oname = 'pcd_test'; numacq = 2; % number of acquisitions per triggered frame numFrames = 50; % number of triggerd fra...
classdef ProbtrackX < Gridjob %ProbtrackX Summary of this class goes here % Detailed explanation goes here properties end methods %% Subclass Constructor: initialize standard parameters: function this = ProbtrackX(varargin) % Call superclass constructor: this = thi...
function varh = linearInterpolation( var, varLen, varh, varhLen, varargin ) %% Applies linear interpolation operator on a given variable to construct % its fine version. Used for prolongation. % % Author: Vahan Hovhannisyan, 2017. if ~isempty(varargin) operParams = varargin{1}; if isfield(operParams, 'n...
classdef hwserver < handle %HWSERVER Connects with server.py on host machine to control % varoius pieces of equipment % Note, some hwserver operations could conveivably take longer than the % default timeout used here. If so, obj.connection.Timeout should be % adjusted appropriately % % obj....
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function dx2val = d2SSE_dx2(data,times,devals,pars,more) if ~isfield(more,'more') more.more = []; end fdevals = more.fn(times,devals,pars,more.more); difs = data - fdevals; dfdx = more.dfdx(times,devals,pars,more.more); d2fdx2 = ...
function yapi2wav(yapi,alan,strcell,type) L=length(strcell); if strcmp(type,'all') hepsi=yapi(1).(alan); for qq=2:L; hepsi=[hepsi;yapi(qq).(alan)]; end wavwrite(hepsi,44100,16,strcell); end if strcmp(type,'one') for qq=1:L wavwrite(yapi(qq).(alan),44100,16,strcell{qq}); end end
%% Removes duplicately binned subjects from top score matrices % Create list of uniquely (& non-uniquely) binned subs try clear all_subs; end all_subs = [top1_subs;top2_subs;top3_subs;top4_subs]; % o=length(all_subs) % p=length(all_subs) - length(unique(all_subs)) % p/o*100 % keyboard subcount_mat = zeros(max(all_subs...
function [h1, h2] = pmx(p1, p2, varargin) % [h1,h2] = pmx(p1, p2) % [h1,h2] = pmx(p1, p2, crosspoint1, crosspoint2) % % Implements Partial Mapped Crossover (PMX) of permutations % p1 and p2. Crossover points are generated randomly if not % given. crosspoint1 must be less than crosspoint2. % % See also: cx, erx, ox...
function [ output_args ] = configSpaceFootPrint( input_args ) %Plot all valid configurations foot print % Detailed explanation goes here close all; clear; clc; %% ==================== Part 1: Vehicle info ==================== wheelbase = 1.78; vehicle_width = 1.58; track = 1.3; %% ==================== Part 2: Comp...
clc clear all image_lena = double( imread( 'data/images/lena.tif' ) ); image_sail = double( imread( 'data/images/sail.tif' ) ); image_smandril = double( imread( 'data/images/smandril.tif' ) ); image = [ image_lena, image_sail, image_smandril ]; histogram = hist( image( : ), 0 : 255 ); pmf = histogram / sum( histogram...
%%% This script's aim is to mark those events for rejection that we do not %%% have actual accuracy data on. To keep only the first forgotten number's %%% data. clear; clc; %open and load eeglab in matlab [ALLEEG EEG CURRENTSET ALLCOM] = eeglab; % this tracks which version of EEGLAB is being used, you may ignore i...
% Senjor Project: Software Defined Implementation of Digital Communication % Student: Leul Wuletaw % Professor: Dr. Ing.- Dereje Hailemariam % Date: June, 2017 % ***************** FUNCTION: derandomizer() ***************** % % This function derandomizes received data. function [ data_out ] = derandomizer( data...
% Michael Sikora <m.sikora@uky.edu> % 2018.01.01 % Defines a Platform object which is a circular microphone array % Updated to accept Euler angles on 2018.02.10 classdef Platform < handle properties loc_center % center point coordinates of platform N % number of microph...
function DataOrganization_auxtos_Separatefolder(stimdur) % FNIRS_AUX_TO_S covert the aux variable in the .nirs file into s % so that the nirstoolbox can reconize the stimmarks % Created Jan 30, 2019, Xiaosu Hu % Modified Nov 8 2019, Xiaosu Hu, to load file directly from the individual % data folder % Load file with Ni...
% A test script using templeCoords.mat % % Write your code here % Load the two images and the point correspondences from someCorresp.mat im1 = imread("../data/im1.png"); im2 = imread("../data/im2.png"); load("../data/someCorresp.mat"); M = max(size(im1,1),size(im2,2)); % Run eightpoint to compute the fundamental matrix...
function [ lnp ] = postblock( params,setup,data,block, params_estimated ) %computes the posterior as a function of the parameters in one block, %keeping the parameters in all other blocks fixed params_total=params_estimated; params_total(setup.index_block{block})=params; lnp=prior(params_total,setup)+likelihood_wrap( ...
% Main function clc clear all close all addpath('../JISR2D/readimg'); addpath('../JISR2D/images2D'); addpath('../JISR2D/bsplinelevelset'); addpath('../JISR2D/composition'); addpath('../JISR2D/setparameters'); addpath('../JISR2D/thbspline'); addpath('../JISR2D/iterationloop_funcs'); addpath('../JISR2D/levelsetseg_funcs...
function [top_mat,bottom_mat, left_mat, right_mat] = skeleton(picture,threshold) % Gives you the skeleton for every pixel in image % picture = repmat(eye(2),[10,10]); % threshold = -1; [height,width] = size(picture); top_mat =zeros(height,width); bottom_mat =zeros(height,width); left_mat =zeros(height,...
function [ F, ks,ps , badpoints,corrs, FFormatted, corrsFormatted,EFormatted,spacePts,width,height,FFormattedCLEAN,FCLEAN ] = generateFtwoangel( fdiff, skew, ar,centerdeviation,silent,number,noiselevel,numCorruptFs,width,height ,gaussianerrorstd,differentframes ,radangels) writefiles=0; numCorrs=200; FFormatted=cell(n...
function [act_travel_time,Arriving,Departing] = travel_time(x_veh,demand,source,discretesplits_nodes) %Here we are going to compute the actual travel time and the cumulative %numbers of the vehicles departures and arrivals after we run the %cell-transmission-model (CTM) from Daganzo in the function %CTM_network...
function [tsp_pme,idx_origin,transpo] = transpo_partialsMeanEnergy(knowledge_instance,resolution) % Transposition method for the partialsMeanEnergy descriptor pme = get_field_values(knowledge_instance,'partialsMeanEnergy'); pme = repmat(pme,resolution,1); [tsp_idx,idx_origin,transpo] = interleave_indices(size(pme,1)...
%low pass filtering with input sigma function lowFreq_part = lowPassFilter(originalPart,sigma) %gaussian filter for low pass filtering of the PRNU Filter=GaussianFilter(sigma); %process the PRNU border L=floor(length(Filter)/2); originalPart_extended = [ones(1,L) originalPart ones(1,L)]; lowFreq_part = conv(originalPar...
function [ it, iv, tt, tv ] = func_neuralnetwork( input, target, traning_rate ) %{ input : gerçekleşen neural network'un girdileri, target : gerçekleşen verilerin çıktıları, traning_rate : verilerin yüzde kaçının training için kullanılacağı, %} noofdata = size( input, 1 ); % satır türünden m...
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Authors: Frizziero - Suman - Dell'Eva %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% classdef SharedBSData < handle properties UE servingBS end % m...
clear all; %#ok<CLALL> close all; load dataAssign05.mat
function R = vec2vecrot(v1,v2) %VEC2VECROT calculates a transformation matrix that rotates and translates % vector 1 so that vector 1 is colinear with vector 2. % % Input: % v1, v2 both must either be 1-by-3 vectors or 2-by-3 matrices: % % if 1-by-3 v1 and v2 define the vectors. % if 2-by-3 each row in ...
function [f, df] = hyp_optim_kldiv(loghyp, x, y) ix = randperm(length(y)); xtrain = x(ix(1:2:end), :); ytrain = y(ix(1:2:end), :); xtest = x(ix(2:2:end), :); ytest = y(ix(2:2:end), :); e = size(y, 2); [nTrain, d] = size(xtrain); nTest = size(xtest, 1); if and(or(size(loghyp, 2) == 1, size(loghyp, 1) == 1), e > 1) ...
%Write a program to implement the structure plan of Exercise 3.2. %where is Exercise 3.2?
function varargout = demarrerapplication(varargin) % DEMARRERAPPLICATION M-file for demarrerapplication.fig % DEMARRERAPPLICATION, by itself, creates a new DEMARRERAPPLICATION or raises the existing % singleton*. % % H = DEMARRERAPPLICATION returns the handle to a new DEMARRERAPPLICATION or the hand...
function img_morphed = morph_tps_wrapper(img_source, img_dest, p_source, p_dest, warp_frac, dissolve_frac) % Calculate the size of the resulting image sz = max(size(img_source),size(img_dest)); sz(3) = 3; % Calculate the intermediate shape int_pts = (1-warp_frac)*p_source + warp_frac*p_dest; % Obtain TPS estimates fo...
% This code belongs to the paper % % M. Hasannasab, J. Hertrich, F. Laus, and G. Steidl. % Alternatives to the EM algorithm for ML-estimation of location, scatter % matrix and degree of freedom of the student-t distribution. % Numerical Algorithms, 2020. % DOI: https://doi.org/10.1007/s11075-020-00959-w % % If you use...
classdef TuPrk < TuSol % TUPRK creates the subclass object TuPrk to perform several computations for retrieving % and modifying game data. It stores relevant game information and % pre-kernel elements obtained by overloading functions from various solvers. % % Usage: clv = TuPrk(v,'gtype','gformat') % % Define variabl...
function nodeDegree = calculateNodeDegree(obj, tree_indices) %Calculate the node degree of each node the specified trees. % INPUT tree_indices: (Optional) Array of integer specifying % the trees for which to calculate the node degrees. % (Default: all trees). % OUTPUT nodeDegree: Cell array of lengt...
%% Synthetic INS simulation % This framework was created by Barak Or. % Version 0.1, released at July 6 2020. % The Synthetic INS simulation provide the exact navigation solution based % on the strapdown approch, with perfect IMU (no error for gyro and % accelerometes). % This code is dived into two main parts: % 1) ...
function [ cen ] = centroidFromLinearInd( ind, siz ) %CENTROIDFROMLINEARIND Calculate the centroid for a set of linear %indices in 3D. % INPUT ind: [Nx1] array of linear indices. % siz: [1x3] array of integer specifying the size of the cube to % which the indices in ind refer. % OUTPUT cen: Centroid of ...
%% Parte 2 - Arestas com overhead (metodo força bruta) tc_v=zeros(1,8); r_v=zeros(10,8); for i= 1:8 [tc_v(i),r_v(:,i)]= flowvecit(A,s,c,p,E,f2(:,i)); end function[tc,r]= flowvecit(A,s,c,p,E,f2) [~,edges]=size(A); [~,inst]=size(s); cvx_begin variable f1(edges,inst) variable r(edges) tc=dot(p,r)+dot(f2,E); ...
function kno_pet_figure5 % KNO_PET_FIGURE2 % % Produce figure 2 % L.V. Straatman1, M.M. van Wanrooij1,2, L.F. de Geus-Oei3, E.P. Visser3, A.F.M. Snik1, J.J.S. Mulder1 % %% Cleansing close all clear all warning off; p = 'E:\Backup\Nifti\'; cd(p) [N,T,R] = xlsread('subjectdates.xlsx'); % keyboard...
%{ Author: Akshay Tharval Subject: 06-665 PSM HW 5_3 S16 06-464 Chemical Engineering Process Control Instructor: Dr. Mark M Daichendt Process Dynamics and Control, 3ed Seborg, Edgar, Mellichamp and Doyle %} clear all; clc; Kcu = 1/0.235; Kc = 1.5*Kcu; theta = 1; GN = [2]; GD = [5 1]; G = tf(Kc*GN,GD,'InputDelay',the...
function [handle] = PlotElement_Duc(coord, ele,eleTrue, val, cMap,eleMat,matNum) if nargin < 4; cMap=gray; end ele_temp=ele; if matNum~=0 ele = ele_temp(ismember(eleMat,matNum)); else ele=ele(eleTrue); end ne = length(ele); elePoint = NaN(ne,8); for ii = 1:ne nodes = ele{ii}; elePoint(ii...
classdef imtool3D_3planes < handle % imtool3D_3planes(I,mask,parent,range) image viewer with synchronised % axial, saggital and coronal view % % Input: % I 3D-5D matrix % (mask) multi-label mask. Only 3D masks are supported (same size as % I in the first 3 dimensions). % (parent) ...
clear; addpath(genpath('/home/scw4750/github/global_tool')); caffe_path='/home/scw4750/github/caffe/matlab'; caffe_path='/home/scw4750/github/caffe/matlab'; rank_n=50; % % for lightencnn % prototxt='/home/scw4750/github/IJCB2017/lightencnn_deploy.prototxt'; % caffemodel='/home/scw4750/github/IJCB2017/final_LightenedCNN...
%--------------------------------------------------- %AUTHORS: Sofia Fernandes, Hadi Fanaee-T, Joao Gama %-------------------------------------------------- function [components,inds,scores,details]=findidenticanomalies(A) %------------------------------ % INPUT % A [cell] cell whose i^th entry is a struct co...
function out = c_caa_cef_var_get(varName,fileName) %CEF_GET_DATA read variable form CEF file % % Example: % R = CEF_GET_DATA('sc_r_xyz_gse','CL_SP_AUX__20101231_010001_20101231_010201.cef.gz') % % See also: CEF_INIT, CEF_READ % read file cef_init(); cef_read(fileName); % get time tt=cef_var('time_tags'); tt=tt'; t...
% These are the run times, on my computer, for the peptide mass % inversion problem. I ran these in such a way that they always % returned only 1 answer. function plotRunTimes Data = [ 8 0.092 9 0.260 10 0.723 11 1.914 12 5.063 13 12...
function [func, Jac] = pfunc_Lorentzian(p, x, jacFlag) % symmetric peak profile function Gaussian % refer to Rietveld book for more details % p is the parameters for a peak % x is the x axis (typically in radial distance or in tth) % jacFlag is the Jacobian flag % % Lorentzian peak function % f = A*(c1^.5/Gamma/pi)./(1...
function [ outImg, time ] = bilateralFiltering( img, depth, fplane, dEye) % Runs the algorithm from Zhou 2007 on the image and depth provided % img -- RGB image to be filtered % depth -- depth map % fplane -- distance to the plane in focus % dEye -- diameter of pupil (effective aperture) sizeIm = siz...
% Distance between two points P1 and P2 function dist = distance(p1, p2) dist = sqrt(sum((p2 - p1) .^ 2)); end
%% Branch 1. basic config - PEDRO AddPaths('Pedro_iMAC') parpool(16) % initialize number of cores %% Initialize Directories project_name = 'MMR'; project_name = 'UCLA'; project_name = 'MFA'; project_name = '7Heaven'; project_name = 'Scrambled'; project_name = 'Logo'; project_name = 'VTC_localizer'; project_name = ...
function [xf,xcf] = rk4stepperSec(x0,xc0,lightDrive,ti,tf) % RK4STEPPERSEC is an ODE solver used to determine state variable values % of the pacemaker model at the desired point in time % Create local variables Bdrive = 0.56 * lightDrive; hInterval = (tf - ti)/LRCrk4StepSize; % Initialize loop variables t = ti; % Lo...
clear all; close all; clc; Ta = 0.001; % Sampling period (sec). f0 = 1; % Fundamental frequency (Hz). Np = 10; % Number of periods; bk = [0 4/pi 0 4/(3*pi) 0 4/(5*pi) 0 4/(7*pi) 0 4/(9*pi) 0 4/(11*pi) 0 4/(13*pi)]'; ak = zeros(size(bk)); [x,t] = FourierFunction(Ta,f0,Np,ak,bk) figure(31); plot(t,x); g...
function [d, d_sintheta, d_dtheta] = sharms(l,x) %% sharms: Legendre functions used for vsh if size(x,1)>size(x,2) x=x'; end legendre_total=(associated_Legendre(l,x)); % [R, C] = [m, x] / |m| <= l, l order ms=(-l:1:l)'; % 1. Obtain d norm_legendre=sqrt(factorial(l-ms)./factoria...
function rgb = navy rgb = [0.0, 0.0, 0.50196]; end
function m=reconstructAERframeInterval(AE,t,xmask,ymask,xdim,ydim) % m=reconstructAERframeInterval(AE,xmask,ymask,xdim,ydim) % shows the inverse of the last intervals of the address events in AE % as an image defined by % the masks (xmask,ymask) and image dimensions (xdim,ydim) [x,y]=extractFrameCoordinates(AE,...
function [Y,T,X]=strnwave(t,x,xd,yd,len,a) % [Y,T,X]=strnwave(t,x,xd,yd,len,a) % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ % See Article 2.7 % This function computes the dynamic response % of a vibrating string released from rest with % a given initial deflection defined by % piecewise linear interpolation. The analysis...
classdef Whitening < Gridjob %GRIDJOBEXAMPLE Summary of this class goes here % Detailed explanation goes here properties end methods %% Subclass Constructor: initialize standard parameters: function this = Whitening(varargin) % Call superclass constructor: this = t...
% clear % clc % close all % cam=webcam; % original=snapsho(cam); % original=imread('RealLego1.jpg'); % cam = webcam('Logitech'); original=snapshot(cam); original=original(MyParameters.YMIN:MyParameters.YMAX,... MyParameters.XMIN:MyParameters.XMAX,:); % original=original(138:end,131:512,:); x=size(original,2); y=s...
% function gsubplot(N,k) function gsubplot(N,k,b,c) if(nargin==2) C=ceil(sqrt(N)); R=ceil(N/C); subplot(R,C,k); else subplot(N,k,(b-1)*k+c); end
function tricontour(V,F,w,speedup) % TRICONTOUR Plot a filled contour defined on top of a triangle mesh returns % function handle % % tricontour(V,F,w,speedup) % % % Inputs: % V list of vertex positions % F list of face indices % w scalar values defined on V % speedup optional speed up by n...
%% HomeWork #2_1_2.34(c) % m[n]=x[n]*f[n] clear all x = [zeros(1,4), ones(1,7), zeros(1,4)]; t = -5:1:5; for n = -5:1:5 if abs(n) <= 5 f_(n+6) = n; else f_(n+6) = 0; end end f__ = ones(1,11); f = f_.*f__; m = conv(x, f); t = -9:1:15; stem(t, m) xlabel('n') ylabel('m...
function lightReading = rgbc2lux(lightReading, constantsSet) %RGBC2CLA Summary of this function goes here % Detailed explanation goes here %% Extract data from table RGBC = horzcat(lightReading.red, lightReading.green, lightReading.blue, lightReading.clear); %% Set constants to be used switch constantsSet case ...
function pa_tdt_playsound(snd,RP2_1,zBus,com,level,speaker,stimSnd1,cmdSpeaker) % PA_TDT_PLAYSOUND % % Play sound in FART % % Dick Heeren / Tom / Denise % 2012 Modified: Marc van Wanrooij %% Initialization maxSamples = length(snd); stmSnd1 = 10; %% Write data RP2_1.WriteTagV('WavData', 0, snd(1:maxSamples)); %% Sp...
clc clear all close all DATA = csvread('Enviro2.csv') ; Sample = DATA(2:end,1) ; Wavelength = DATA(1,3:218) ; Spectra = DATA(2:end,3:218) ; Conc = DATA(2:end,219:222) ; Conc(find(Conc==0)) = NaN ; figure plot(Sample,Conc) figure plot(Wavelength,Spectra')
clear; %folderpath = '~/Videos/lab4/'; folderpath = '/Volumes/pi/Videos/lab4/'; %folderpath = '//run/user/1000/gvfs/smb-share:server=10.22.223.81,share=pi/Videos/lab4/'; [file, path] = uigetfile(join([folderpath,'*.mat'])); %[file, path] = uigetfile(join(['*.mat'])); path = join([path,file]); load(path); channelsBPass ...
% NATNAEL SHEWANGIZAW ZEWGE % March, 2017 % PD controller for a two wheel steering bicycle clc ; clear all; %parameters V = 1; %constant velocity l = 1; %length of bicycle( between wheel centers) Kp = 7; %proportional gain Kd = 5; %derivative gain K...
clear finalImg y = wgn(size(rImg,1)/dS,size(rImg,1)/dS,2); %white noise as the initial image iter = 5; %number of IFS application %finalImg as new input in each iteration, downsampled for ite=1:iter dBlocks = zeros(N, N, size(y,1)^2/N^2); newrBlocks = zeros(N, N, size(rImg,1)^2/N^2); b = 1; for i=1...
function A = battag_cal(X,tag,range) % % A = battag_cal(X,tag,range) % CAL.Be02c_8g = [129.6585 -0.2414; 122.0517 -0.0914; 131.6103 -0.3742] ; CAL.B5029_8g = [127.4075 -0.2383; 120.2901 -0.1874; 132.6318 -0.4181] ; CAL.B5032_8g = [127.4753 -0.2334; 122.8537 -0.1449; 130.3666 -0.3610] ; CAL.B2035_8g = [128.0764 -...
function tablas = getTablas tablas = {'cont_pmdoscinco' ,'cont_pmco','cont_nox' ,'cont_co' ,'cont_nodos' ,'cont_no' ,'cont_otres' ,'cont_sodos', 'cont_pmdiez'};
%% case 11 is configuration 2 in the report clear; raw=water; salinity=[0.37 .39 .39 .4 .4 .4 .41 .44 .61 1.06 1.56 6.21 11.13 18.52 32]; l=length(salinity); sa=32; for i=1 draw.Concentration=sa(:,i); draw.Flow=1; draw.Pressure=0; feed=water; feed.Concentration=sa(:,i); feed.Concentration=0.1; volume_rati...
%---------------------------------------- % %function y = pb_filtro (x) % %y : sinal filtrado; % %x : sinal % %---------------------------------------- function y=pb_filtro(x,h) a=2*pi*115; xi=[]; xi(1)=0; for k=2:1:length(x) xi(k) = (1-a*h)*xi(k-1)+a*h*x(k-1); end y=xi;
clear all, close all, clc % Calculates the mean average precision for the two datasets provided in % task 1d xi = [0:0.1:1]'; prec1 = [1.0, 1.0, 1.0, 0.5, 0.20]'; rec1 = [0.05, 0.1, 0.4, 0.7, 1.0]'; prec1_i = interp1q(rec1, prec1, xi); prec1_i(1) = 1; %Fix first value, not covered by interp1q() prec2 = [1.0, 0.80...
figure(1) plot(t,delta(:,1)*180/pi,'-b',t,delta(:,2)*180/pi,'--r',t,delta(:,3)*180/pi,'-.k',t,delta(:,4)*180/pi,'-.g',t,delta(:,5)*180/pi,'--b', ... t,delta_COI*(180/pi),'-g',t,delta_COI*(180/pi)+60,'-k',t,delta_COI*(180/pi)-60,'-k','LineWidth',1); grid on xlabel('\fontsize{12}Time t (s)') ylabel('\fontsize{12}Ang...
daq = DaqDeviceIndex; % connect to USB-1208 DaqAOut(daq,1,1) % turn on LED for k = 0:0.01:60 % move LED around a little. position=0.5-0.5*cos(k); DaqAOut(daq,0,position>0.5); WaitSecs(0.005); end DaqAOut(daq,0,0); % put LED back home DaqAOut(daq,1,0); % turn off LED WaitSecs(2); DaqAOut(daq,1,1) % turn...
%%%%%%%%%%%%%%% Updated debug.m: TOTAL_POWER_ITR= 50; % input('pow iter: '); tol = 1.0e-3; load trouble; aUold = aU; nsvd = size(aU,2); % Get true singular values... [Ut St Vt] = svd(full(sL)); St = diag(St); figure(1); clf; ht = semilogy(St, 's-r'); St(nsvd) St(nsvd)^50 St(nsvd)^25 %% Properties of initial aU s...
clear all close all clc nb_iter_grad=100; taillebatch=10; epsilon=0.1; steps=1; nb_iter_gibbs=1000; nb_images=10; load('binaryalphadigs.mat'); X=lire_alpha_digit(dat,[11 12 13 14]); RBM=init_RBM(size(X,2),100); RBM=train_RBM(X,RBM,nb_iter_grad,taillebatch,epsilon,steps); Y=generer_image_RBM(RBM,nb_iter_gibbs,nb_...
% Given a triangle mesh (V,F) compute a new mesh (VV,FF) which contains the % original faces and vertices of (V,F) except any small triangles have been % removed via collapse. % % We are *not* following the rules in "Mesh Optimization" [Hoppe et al] % Section 4.2. But for our purposes we don't care about this criteria....
function flag=A_save(item,fname) % item is inputs structure % fname is optional and can be the full path and name of the file without a % file type (i.e. ".GUI"). flag = 0; % flag = 1 means an error occurred. try mode=item.OpCond.mode; % test if ADEPT structure catch % test if Illumination structure t...
function configBitstream = exampleBitstream() % example - an example bitstream for the self-assembling particle network. % For each of the letters the shape is not entirely deterministic. % There are segments which are open-ended as to how many particles % are added before a cap is put on or the next segment begun. F...
function nmonster = makeMonster(tracklistFile,fsspecFile) trackspecs = gettracklist(tracklistFile); flist = getfeaturespec(fsspecFile); totalMonster = makeMultiTrackMonster(trackspecs, flist); % downsample; convert from every 10ms to every 20ms to same time and space totalMonster = totalMonster(2:2:end,:); tic for...
function s = pcw_der( x, p) %PCW_DER - Papadopulos-Cooper solution the well : Log derivative of the solution in Laplace domain % % Syntax: s = pcw_der( x, p) % x[1] = Cd % p = Laplace parameter % % See also: pcw_lap % sp=sqrt(p); k0=besselk(0,sp); k1=besselk(1,sp); s=0.5.*((2.*x(1)-1).*k0.^2+k1.^...
% Check numerical consistency of copse_TempCK1992 temperature function % No implication the values used here are within the domain of validity of % the approximation used % See also copse_TempCK1992 presentluminosity = 1368; %present day tempcorrect = 0.194; CtoK = 273.15; %display pre-ind mean T myfun = @(oldT) cop...
function table=think(corpus) %% ------------------------------------------------------------------------ % think % ------------------------------------------------------------------------- % author: Manuel Mörtelmayer, Andreas Arnold (comments) % % ----------------------------------------------------------------------...
function y = A1(r,a, kr, kL, B, b, kt, v0, vl, na, L0) v = 4 / 3 * pi * r .^3; Tau_r = (a /(4*pi) * 1./(1 + (r/kr).^na) * L0/(kL+L0)) - (B + b * r.^2)./(4*pi * r.^2) .* (v - v0)./(v - v0 + kt*vl); y = vl * Tau_r; end
% n=20; %points per cluster % sigma=.3; % X1 = ones(n,1)*[10 0]+sigma*randn(n,2); % X2 = ones(n,1)*[-4 .5]+sigma*randn(n,2); % X3 = ones(n,1)*[-6 -.5]+sigma*randn(n,2); % X=[X1; X2; X3]; load('AffectOfEigPertData.mat') labels = [ones(n,1); 2*ones(n,1); 3*ones(n,1)]; figure scatter(X(:,1),X(:,2),[],labels,'filled') titl...
function sethhparams(params, iext) % Sets current values of MLE parameters. Call as % call setmleparms(pml, iext) % This stores the parameters in an internal store from which they can be % fetched by getmleparms. This is how mlode gets its parameters. % pml is a column vector of params % pml=[gca, gk, gl, vca...
function [Jac_east_cell_temp,Jac_west_cell_temp, ... Jac_east_other_temp,Jac_west_other_temp, ... Jac_trunc_east_temp,Jac_trunc_west_temp, ... Jac_cell, ... trunc_east_temp,trunc_west_temp, ... fluxeast_temp, fluxwest_temp, ... residual_cell,maxspeedF] ... = probl...
function [FunkcjaDopasowana]=fxfit(dane) % Dla człowieka dlugosc fali widzialnego swiatla % zawiera się w przedziale (380-780) nm (co najmniej) % Dopasowanie krzywej dyspersji z wykorzystaniem fminsearch() % Zastosowano pseudo-losowy punkt startowy do obliczen fd=fopen('fxfitOUT.m','wt'); if nargin<1 lambda=[436 ...
% MEMDATA % % Sample data % MemDataset - Retrieve one of the sample datasets % % Data manipulation % Resample - Resample the data % SplitDataByField - Splits a dataset into subsets based on the given field % SplitDataByCondition - Splits a dataset into subsets based on .condition % GetDataByField ...