plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | epilepsyecosystem/1stplace_notsorandomanymore-master | csp.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/csp.m | 1,635 | utf_8 | 2c3cc9ecabee5250c8a4d953ac52f540 |
% Coded by James Ethridge and William Weaver
function [result] = CSP(varargin)
if (nargin ~= 2)
disp('Must have 2 classes for CSP!')
end
Rsum=0;
%finding the covariance of each class and composite covariance
for i = 1:nargin
%mean here?
R{i} = ((... |
github | epilepsyecosystem/1stplace_notsorandomanymore-master | hjorth.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/hjorth.m | 552 | utf_8 | a0bf784291539da122d8642eb5e6df86 | % Function to calculate Hjorth parameters
function [activity, mobility, complexity] = hjorth(y_step)
activity = var(y_step,1); % Variance of each EEG epoch. 1st Hjorth parameter
eeg_diff1 = diff(y_step,1,1); % 1st derivative of EEG
mobility = std(eeg_diff1,1)./(std(y_s... |
github | epilepsyecosystem/1stplace_notsorandomanymore-master | ar.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/ar.m | 8,371 | utf_8 | cf66d76a53acbec25e46d830a2f0385a | function [th,ref]=ar(data,n,varargin)
%AR Computes AR-models of signals using various approaches.
% Model = AR(Y,N) or TH = AR(Y,N,Approach) or TH = AR(Y,N,Approach,Win)
%
% Model: returned as an IDPOLY model with the estimated parameters of the
% AR-model, see HELP IDPOLY.
%
% Y: The time series to... |
github | epilepsyecosystem/1stplace_notsorandomanymore-master | ar_prediction_error.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/ar_prediction_error.m | 1,304 | utf_8 | 53bedeca00d334945ab9cbc48afad186 | function fit_error=ar_prediction_error(model_data,test_data,ar_order)
model_data = remove_infsnans(model_data);
test_data = remove_infsnans(test_data);
if(range(model_data)<1e-5)
fit_error (1:ar_order) = 50;
else
if (range(test_data)<1e-5)
fit_error(1:ar_order) = 100;
else
if size... |
github | epilepsyecosystem/1stplace_notsorandomanymore-master | EEG_subbands.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/EEG_subbands.m | 325 | utf_8 | 33a6c3fb719a73bc1453d3d0e59a029b | % Function to calculate power in sub-bands from freq_range
function [PSD_band] = EEG_subbands(PSD,freq,freq_range)
i1 = find(freq==freq_range(1)); % f1 hertz index
i2 = find(freq==freq_range(2)); % f2 Hz index
PSD_band = trapz(PSD(i1+1:i2,:)); % Range of PSD
%*****************************************... |
github | epilepsyecosystem/1stplace_notsorandomanymore-master | EEG_PSD_features.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/EEG_PSD_features.m | 664 | utf_8 | 89547b991537897c82241a13b45fc6f1 | %Function to extract frequency and power features for EEG classifier method
function [peak,peak_freq] = EEG_PSD_features(spectrum,freq,f1,f2)
%*************** Find dominant peak in range F1-F2 *****************************
i1 = find(freq==f1); % f1 hertz index
i2 = find(freq==f2); % f2 Hz index
spec = s... |
github | epilepsyecosystem/1stplace_notsorandomanymore-master | nonlinear_energy.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/nonlinear_energy.m | 167 | utf_8 | d4ed89a03ce6bf04f97f0538581f426c | % Function to calculate nonlinear energy
function [N,x] = nonlinear_energy(epoch)
a = epoch.*epoch;
x = a(2:end-1) - epoch(1:end-2).*epoch(3:end);
N = mean(x);
|
github | epilepsyecosystem/1stplace_notsorandomanymore-master | spectral_entropy_g.m | .m | 1stplace_notsorandomanymore-master/Andriy/code/spectral_entropy_g.m | 350 | utf_8 | 77b9b0be6e5d7693f626a3b75c1498e5 | % EEG Spectral entropy per epoch
function H = spectral_entropy_g(spectrum,w)
flag=0;
psd = spectrum;
pdf = zeros(size(spectrum));
if(flag==1)
for i = 1:1:w
pdf(:,i) = psd(:,i)./(sum(psd(:,i))+eps);
end
elseif(flag==0)
pdf = psd./(repmat(sum(psd,1),size(psd,1),1)+eps);
end
H = -... |
github | franciscozuccala/android-voip-master | echo_diagnostic.m | .m | android-voip-master/configuration/trunk/third_party/speex/libspeex/echo_diagnostic.m | 2,076 | utf_8 | 8d5e7563976fbd9bd2eda26711f7d8dc | % Attempts to diagnose AEC problems from recorded samples
%
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
%
% Computes the full matrix inversion to cancel echo from the
% recording 'rec_file' using the far end signal 'play_file' using
% a filter length of 'tail_length'. The output is saved to 'o... |
github | Wendroff/ModalTheory-master | select_script.m | .m | ModalTheory-master/Supplementary_Material_AMR-13-1059/Theofilis/select_script.m | 22,698 | utf_8 | 2a2588be03a779c4d9bb79aba2525962 | function output = select_script(run)
% This file contains Matlab codes for computing the eigenvalue
% problem corresponding to the 2D Helmholtz, and the 2D and 1D LNS
% equations. These are parts of the tutorial:
% "Modal Stability Theory" by Matthew Juniper, Ardeshir Hanifi,
% and Vassilios Theofilis, published in Ap... |
github | Wendroff/ModalTheory-master | select_script.m | .m | ModalTheory-master/Supplementary_Material_AMR-13-1059/Juniper/select_script.m | 29,508 | utf_8 | d243aa025bdaaad6fc2faeb9b35391b9 | function output = select_script(run, param)
% This file contains Matlab codes for local stability analysis
% using analytical dispersion relations for plug flows.
% These are parts of the tutorial:
% "Modal Stability Theory" by Matthew Juniper, Ardeshir Hanifi,
% and Vassilios Theofilis, published in Applied Mechanics... |
github | Wendroff/ModalTheory-master | select_script.m | .m | ModalTheory-master/Supplementary_Material_AMR-13-1059/Hannifi/select_script.m | 37,249 | utf_8 | d192d79e72917a3b725f50a0fd152ad5 | function output = select_script(run)
% This file contains Matlab codes for computing the eigenvalue
% problem corresponding to the Orr-Sommerfeld and linearized
% Navier-Stokes equations. These are parts of the tutorial:
% "Modal Stability Theory" by Matthew Juniper, Ardeshir Hanifi,
% and Vassilios Theofilis, publish... |
github | ShaocongDong/QF4102-Financial-Modelling-master | New_Euro_float_lookback_put.m | .m | QF4102-Financial-Modelling-master/Assignment1/New_Euro_float_lookback_put.m | 961 | utf_8 | 2b319b5fcf97e0826c4520d7cf4c4e91 | %Group G04
%Dong Shaocong A0148008J
%He Xinyi A0141132B
function opt_value = New_Euro_float_lookback_put(S0, r, T, sigma, q, N)
% Sample BTM program for European floating strike options
% q: the continuous dividend rate
% S0: current underlier price
% X: strike price
% T: time to maturity, in years
% sigma: volatility... |
github | ShaocongDong/QF4102-Financial-Modelling-master | BTM_Euro_down_out_call.m | .m | QF4102-Financial-Modelling-master/Assignment1/BTM_Euro_down_out_call.m | 1,005 | utf_8 | 36b8f3a55934275392a20b6d8659fc8f | %Group G04
%Dong Shaocong A0148008J
%He Xinyi A0141132B
function opt_value = BTM_Euro_down_out_call(S0, X, r, T, sigma, q, N, H)
% Sample BTM program for European down and out call options
% q: the continuous dividend rate
% H: the barrier level
% S0: current underlier price
% X: strike price
% T: time to maturity, in... |
github | ShaocongDong/QF4102-Financial-Modelling-master | Euro_down_out_call.m | .m | QF4102-Financial-Modelling-master/Assignment1/Euro_down_out_call.m | 1,426 | utf_8 | 626cfa9ccddf91ede6649c83bbd97d73 | %Group G04
%Dong Shaocong A0148008J
%He Xinyi A0141132B
function opt_value = Euro_down_out_call (q, H, S0, X, t, r, sigma)
% Exact solution for European down-and-out call option
% This function is able to work with the intial underlier price S0 in a
% vector form; whereas the rest of the inputs are real numbers.
% Cdo... |
github | ShaocongDong/QF4102-Financial-Modelling-master | Black_Scholes.m | .m | QF4102-Financial-Modelling-master/Assignment1/Black_Scholes.m | 517 | utf_8 | 68a903751b9c44dadabd1a836e326948 | %Group G04
%Dong Shaocong A0148008J
%He Xinyi A0141132B
function c = Black_Scholes (t, S0, X, r, q, sigma)
% t: time to maturity
% S0: the current spot price of the underlying asset
% X: the strike price
% r: the risk free rate
% q: continuous dividend yield
% sigma: the volatility of the underlying asset's return
% On... |
github | ShaocongDong/QF4102-Financial-Modelling-master | Old_Euro_float_lookback_put.m | .m | QF4102-Financial-Modelling-master/Assignment1/Old_Euro_float_lookback_put.m | 1,222 | utf_8 | 3cb484039bab04db4f78aca5300f21bc | %Group G04
%Dong Shaocong A0148008J
%He Xinyi A0141132B
function opt_value = Old_Euro_float_lookback_put(S0, r, T, sigma, q, N, running)
% Sample BTM program for European floating strike options
% q: the continuous dividend rate
% S0: current underlier price
% X: strike price
% T: time to maturity, in years
% sigma: v... |
github | ShaocongDong/QF4102-Financial-Modelling-master | FD_ids_call_trans.m | .m | QF4102-Financial-Modelling-master/Assignment3/FD_ids_call_trans.m | 2,099 | utf_8 | a865de9a4b5114142dbbdff9e1e790f5 | %% Finite Difference - fully implicit scheme for:
% transformed European vanilla call options
% calling syntax:
% v=FD_ids_call_trans(S0, X, r, q, T, sigma, I, N, xmax)
%function fd_v=FD_ids_put(S0, X, r, T, sig, N, dS)
function OptVal=FD_ids_call_trans(S0, X, r, q, T, sigma, I, N, xmax)
%% Initialization
... |
github | ShaocongDong/QF4102-Financial-Modelling-master | FD_ids_Acall_trans.m | .m | QF4102-Financial-Modelling-master/Assignment3/FD_ids_Acall_trans.m | 1,839 | utf_8 | 4b15fa5ad23d4c4ada6d9013371c4959 | %% Finite Difference - fully implicit scheme for:
% transformed American vanilla call options
% calling syntax:
% v=FD_ids_Acall_trans(S0, X, r, q, T, sigma, I, N, xmax, omega, eps)
function OptVal=FD_ids_Acall_trans(S0, X, r, q, T, sigma, I, N, xmax, omega, eps)
%% Initialization
dt = T/N;
dx = xmax/I; %... |
github | ShaocongDong/QF4102-Financial-Modelling-master | BS_DigitalCall.m | .m | QF4102-Financial-Modelling-master/Assignment3/BS_DigitalCall.m | 207 | utf_8 | c58a36f5849fde5195c493183cd275e9 | %% Function for exact solution of digital option
% Call syntax:
function OptVal=BS_DigitalCall(S0, X, r, q, T, sigma)
x = (log(S0/X)+(r-q-sigma^2/2)*T) / (sigma*sqrt(T));
OptVal = exp(-r*T)*normcdf(x);
end |
github | ShaocongDong/QF4102-Financial-Modelling-master | FD_eds_put.m | .m | QF4102-Financial-Modelling-master/lec_code/FD_eds_put.m | 2,083 | utf_8 | 5ec896974d4bde947988dc3b0a19b0e7 | % Finite Difference - explicit scheme(S) for vanilla put options
%
% calling syntax:
% v=FD_eds_put(S0, X, r, T, sig, N, dS)
%
function fd_v=FD_eds_put(S0, X, r, T, sig, N, dS)
% For Explicit schemes, N has to be chosen large enough to avoid
% violating the monotinicity condition
%
Smax=3*X; % set maxi... |
github | ShaocongDong/QF4102-Financial-Modelling-master | BS_call.m | .m | QF4102-Financial-Modelling-master/lec_code/BS_call.m | 284 | utf_8 | 672dbaf1f5822d05c7d3802698694d91 | % Black-Scholes formulae for European vanilla call
% call syntax: c = BS_call(S0, X, r, T, sigma, q)
function c = bs_call(S0, X, r, T, sigma, q)
d1=(log(S0/X)+(r-q+sigma^2/2)*T)/sigma/sqrt(T);
d2=d1-sigma*sqrt(T);
c=exp(-q*T)*S0.*normcdf(d1)-exp(-r*T)*X*normcdf(d2);
return
|
github | ShaocongDong/QF4102-Financial-Modelling-master | FD_ids_put.m | .m | QF4102-Financial-Modelling-master/lec_code/FD_ids_put.m | 1,268 | utf_8 | 1470caec9a1007a8e7efb71debc7475d | % Finite Difference - fully implicit scheme for vanilla put options
% calling syntax:
% v=FD_ids_put(S0, X, r, T, sig, N, dS)
function fd_v=FD_ids_put(S0, X, r, T, sig, N, dS)
Smax=3*X; % set maximum S to be three times the strike value
dt=T/N;
I=round(Smax/dS);
%
VGrid=zeros(I+1,N+1); % finite difference... |
github | ShaocongDong/QF4102-Financial-Modelling-master | MC_EurCall.m | .m | QF4102-Financial-Modelling-master/lec_code/MC_EurCall.m | 518 | utf_8 | 9ddd38e0a761f588432d8b85cb4b5f1b | % Sample Monte-Carlo simulation program for European vanilla call options
%
% call syntax: Euro_vanilla_call=MC_EurCall(S0,X,r,T,sigma,q,no_samples)
%
function Euro_vanilla_call=MC_EurCall(S0,X,r,T,sigma,q,no_samples)
%
mu=r-q-sigma^2/2;
epsv=randn(no_samples,1); % random standard normal numbers
ST=S0*exp(mu*... |
github | ShaocongDong/QF4102-Financial-Modelling-master | btm_EurCall.m | .m | QF4102-Financial-Modelling-master/lec_code/btm_EurCall.m | 591 | utf_8 | e19760108661595bb5d310acf83fe071 | % Sample BTM program for European vanilla call options
% call syntax: OptVal=btm_EurCall(S0,X,r,T,sigma,q,N)
function OptVal=btm_EurCall(S0,X,r,T,sigma,q,N)
% set up lattice parameters
dt=T/N; dx=sigma*sqrt(dt);
u=exp(dx); d=1/u;
df=exp(-r*dt); % discount factor
p=(exp((r-q)*dt)-d)/(u-d); % risk-neutral pr... |
github | ShaocongDong/QF4102-Financial-Modelling-master | A2qivfunc.m | .m | QF4102-Financial-Modelling-master/Assignment2/A2qivfunc.m | 1,356 | utf_8 | 7b105144760b8e166b76648a79e7fb96 | function fd_v=A2qivfunc(S0, X, r, q, T, sig, dt, dS)
%% Meanings of the parameters
% S0: the current underlier price
% X:
% r: the market's risk free rate
% q: the underlier's dividend yield
% T: the time to maturity of this option
% sig: vollatility of the underlier price
% dt: the small interval of time
% dS: the s... |
github | ShaocongDong/QF4102-Financial-Modelling-master | EDSiiiAmericanVanillaCall.m | .m | QF4102-Financial-Modelling-master/Assignment2/submission/EDSiiiAmericanVanillaCall.m | 1,942 | utf_8 | 3b7484c56d80fc4b7be438f817b2cd4b | function fd_v=EDSiiiAmericanVanillaCall(S0, X, r, q, T, sig, N, dS)
%% Meanings of the parameters
% S0: the current underlier price
% X:
% r: the market's risk free rate
% q: the underlier's dividend yield
% T: the time to maturity of this option
% sig: vollatility of the underlier price
% dt: the small interval of t... |
github | ShaocongDong/QF4102-Financial-Modelling-master | EDSiiiEuropeanVanillaCall.m | .m | QF4102-Financial-Modelling-master/Assignment2/submission/EDSiiiEuropeanVanillaCall.m | 1,921 | utf_8 | 2c3f8465dfbfe31b0632987464090015 | function fd_v=EDSiiiEuropeanVanillaCall(S0, X, r, q, T, sig, N, dS)
%% Meanings of the parameters
% S0: the current underlier price
% X:
% r: the market's risk free rate
% q: the underlier's dividend yield
% T: the time to maturity of this option
% sig: vollatility of the underlier price
% dt: the small interval of t... |
github | mapDIA/mapDIA-master | NLOPT_GN_ORIG_DIRECT.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_ORIG_DIRECT.m | 164 | utf_8 | 43ae70342fc7484716698f445981512b | % NLOPT_GN_ORIG_DIRECT: Original DIRECT version (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_ORIG_DIRECT
val = 6;
|
github | mapDIA/mapDIA-master | NLOPT_LN_BOBYQA.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_BOBYQA.m | 189 | utf_8 | 15ba6db5057c8907343184908e0ecf06 | % NLOPT_LN_BOBYQA: BOBYQA bound-constrained optimization via quadratic models (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_BOBYQA
val = 34;
|
github | mapDIA/mapDIA-master | NLOPT_GN_DIRECT.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_DIRECT.m | 137 | utf_8 | 915b9f3f3a223d681a10bfaa80318309 | % NLOPT_GN_DIRECT: DIRECT (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_DIRECT
val = 0;
|
github | mapDIA/mapDIA-master | NLOPT_LD_MMA.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_MMA.m | 155 | utf_8 | 7e4519526e6353452086a1cf929b12ad | % NLOPT_LD_MMA: Method of Moving Asymptotes (MMA) (local, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_MMA
val = 24;
|
github | mapDIA/mapDIA-master | NLOPT_GN_DIRECT_L.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L.m | 143 | utf_8 | ae13ecf48a1ee6d222444643f59c2993 | % NLOPT_GN_DIRECT_L: DIRECT-L (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_DIRECT_L
val = 1;
|
github | mapDIA/mapDIA-master | NLOPT_LD_VAR1.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_VAR1.m | 168 | utf_8 | 45d4388965becdc240350c73a2779757 | % NLOPT_LD_VAR1: Limited-memory variable-metric, rank 1 (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_VAR1
val = 13;
|
github | mapDIA/mapDIA-master | NLOPT_GN_DIRECT_L_NOSCAL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L_NOSCAL.m | 166 | utf_8 | c20477ea33399f3311ea6e533dc347ae | % NLOPT_GN_DIRECT_L_NOSCAL: Unscaled DIRECT-L (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_DIRECT_L_NOSCAL
val = 4;
|
github | mapDIA/mapDIA-master | NLOPT_LN_COBYLA.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_COBYLA.m | 189 | utf_8 | 2c95152f70105c8ca20929fba67d12a2 | % NLOPT_LN_COBYLA: COBYLA (Constrained Optimization BY Linear Approximations) (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_COBYLA
val = 25;
|
github | mapDIA/mapDIA-master | NLOPT_LN_AUGLAG_EQ.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_AUGLAG_EQ.m | 189 | utf_8 | 5432778c9b81b5fdcfb98ca1bbbd6486 | % NLOPT_LN_AUGLAG_EQ: Augmented Lagrangian method for equality constraints (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_AUGLAG_EQ
val = 32;
|
github | mapDIA/mapDIA-master | NLOPT_GN_DIRECT_L_RAND.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L_RAND.m | 164 | utf_8 | 2135dc3891b556738f41c2a35009b227 | % NLOPT_GN_DIRECT_L_RAND: Randomized DIRECT-L (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_DIRECT_L_RAND
val = 2;
|
github | mapDIA/mapDIA-master | NLOPT_GN_MLSL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_MLSL.m | 169 | utf_8 | 93ab4e64e2760c4ca201fada42cb05c3 | % NLOPT_GN_MLSL: Multi-level single-linkage (MLSL), random (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_MLSL
val = 20;
|
github | mapDIA/mapDIA-master | NLOPT_GD_MLSL_LDS.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GD_MLSL_LDS.m | 180 | utf_8 | 7f41fd0094df543c2e45280f86c0b87b | % NLOPT_GD_MLSL_LDS: Multi-level single-linkage (MLSL), quasi-random (global, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GD_MLSL_LDS
val = 23;
|
github | mapDIA/mapDIA-master | NLOPT_LD_AUGLAG_EQ.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_AUGLAG_EQ.m | 186 | utf_8 | 41b81c30c553388e2ff1b6b1fb681618 | % NLOPT_LD_AUGLAG_EQ: Augmented Lagrangian method for equality constraints (local, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_AUGLAG_EQ
val = 33;
|
github | mapDIA/mapDIA-master | NLOPT_LD_CCSAQ.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_CCSAQ.m | 214 | utf_8 | 33892896fe470090edb583b50b9e7d93 | % NLOPT_LD_CCSAQ: CCSA (Conservative Convex Separable Approximations) with simple quadratic approximations (local, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_CCSAQ
val = 41;
|
github | mapDIA/mapDIA-master | NLOPT_LD_AUGLAG.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_AUGLAG.m | 155 | utf_8 | 2d7d515e911b5d0277490940a47f333e | % NLOPT_LD_AUGLAG: Augmented Lagrangian method (local, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_AUGLAG
val = 31;
|
github | mapDIA/mapDIA-master | NLOPT_GN_DIRECT_L_RAND_NOSCAL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L_RAND_NOSCAL.m | 187 | utf_8 | 3287f776b0f2ac5e3495c2a4c95ba4e7 | % NLOPT_GN_DIRECT_L_RAND_NOSCAL: Unscaled Randomized DIRECT-L (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_DIRECT_L_RAND_NOSCAL
val = 5;
|
github | mapDIA/mapDIA-master | NLOPT_LN_SBPLX.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_SBPLX.m | 196 | utf_8 | c99ee02eb277898e9c509dd359740680 | % NLOPT_LN_SBPLX: Sbplx variant of Nelder-Mead (re-implementation of Rowan's Subplex) (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_SBPLX
val = 29;
|
github | mapDIA/mapDIA-master | NLOPT_GN_ISRES.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_ISRES.m | 173 | utf_8 | 2c12964785aed0828a5ac17fc416f5be | % NLOPT_GN_ISRES: ISRES evolutionary constrained optimization (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_ISRES
val = 35;
|
github | mapDIA/mapDIA-master | NLOPT_LD_VAR2.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_VAR2.m | 168 | utf_8 | 5ba0bd034c240547765a0fd4ce90c825 | % NLOPT_LD_VAR2: Limited-memory variable-metric, rank 2 (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_VAR2
val = 14;
|
github | mapDIA/mapDIA-master | NLOPT_AUGLAG_EQ.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_AUGLAG_EQ.m | 182 | utf_8 | 2f8b59b483a4f2621264c7de9df58365 | % NLOPT_AUGLAG_EQ: Augmented Lagrangian method for equality constraints (needs sub-algorithm)
%
% See nlopt_minimize for more information.
function val = NLOPT_AUGLAG_EQ
val = 37;
|
github | mapDIA/mapDIA-master | NLOPT_LN_NELDERMEAD.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_NELDERMEAD.m | 168 | utf_8 | 219928fdd3fc8317d321f9f0535d550f | % NLOPT_LN_NELDERMEAD: Nelder-Mead simplex algorithm (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_NELDERMEAD
val = 28;
|
github | mapDIA/mapDIA-master | NLOPT_LN_NEWUOA.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_NEWUOA.m | 185 | utf_8 | b318db6792885a5d23dcfd5b28fdc507 | % NLOPT_LN_NEWUOA: NEWUOA unconstrained optimization via quadratic models (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_NEWUOA
val = 26;
|
github | mapDIA/mapDIA-master | NLOPT_GN_CRS2_LM.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_CRS2_LM.m | 185 | utf_8 | 9a171159b83c77e07256a24704139d8a | % NLOPT_GN_CRS2_LM: Controlled random search (CRS2) with local mutation (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_CRS2_LM
val = 19;
|
github | mapDIA/mapDIA-master | NLOPT_LN_PRAXIS.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_PRAXIS.m | 153 | utf_8 | c7d354e0602183d0d3a7ff71641ab7b4 | % NLOPT_LN_PRAXIS: Principal-axis, praxis (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_PRAXIS
val = 12;
|
github | mapDIA/mapDIA-master | NLOPT_LD_SLSQP.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_SLSQP.m | 164 | utf_8 | e767cc9cde902065e67a31664a571819 | % NLOPT_LD_SLSQP: Sequential Quadratic Programming (SQP) (local, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_SLSQP
val = 40;
|
github | mapDIA/mapDIA-master | NLOPT_G_MLSL_LDS.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_G_MLSL_LDS.m | 187 | utf_8 | dfafcdb44b43c59aa5e4d5b73542dc50 | % NLOPT_G_MLSL_LDS: Multi-level single-linkage (MLSL), quasi-random (global, needs sub-algorithm)
%
% See nlopt_minimize for more information.
function val = NLOPT_G_MLSL_LDS
val = 39;
|
github | mapDIA/mapDIA-master | NLOPT_LD_TNEWTON.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_TNEWTON.m | 152 | utf_8 | 5e00532d1e34e85f395f6ace048d7d64 | % NLOPT_LD_TNEWTON: Truncated Newton (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON
val = 15;
|
github | mapDIA/mapDIA-master | NLOPT_LD_LBFGS_NOCEDAL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_LBFGS_NOCEDAL.m | 184 | utf_8 | 7b1380ab03a2272b6e3f1c0f49e4babf | % NLOPT_LD_LBFGS_NOCEDAL: original NON-FREE L-BFGS code by Nocedal et al. (NOT COMPILED)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_LBFGS_NOCEDAL
val = 10;
|
github | mapDIA/mapDIA-master | NLOPT_GD_STOGO.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GD_STOGO.m | 137 | utf_8 | 1b374b07cc8dd1fd43998c8f60f49267 | % NLOPT_GD_STOGO: StoGO (global, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_GD_STOGO
val = 8;
|
github | mapDIA/mapDIA-master | NLOPT_AUGLAG.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_AUGLAG.m | 151 | utf_8 | a4a6ef23ad60f4ceab26caae4276c02d | % NLOPT_AUGLAG: Augmented Lagrangian method (needs sub-algorithm)
%
% See nlopt_minimize for more information.
function val = NLOPT_AUGLAG
val = 36;
|
github | mapDIA/mapDIA-master | NLOPT_GD_MLSL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GD_MLSL.m | 166 | utf_8 | 3735615f01a5de64ba710bfa7b7eba3a | % NLOPT_GD_MLSL: Multi-level single-linkage (MLSL), random (global, derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GD_MLSL
val = 21;
|
github | mapDIA/mapDIA-master | NLOPT_GN_DIRECT_NOSCAL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_DIRECT_NOSCAL.m | 160 | utf_8 | 9f11af031bd7ca9c9348de64f7169482 | % NLOPT_GN_DIRECT_NOSCAL: Unscaled DIRECT (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_DIRECT_NOSCAL
val = 3;
|
github | mapDIA/mapDIA-master | NLOPT_LN_AUGLAG.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_AUGLAG.m | 158 | utf_8 | ec49cb21c2b454870a401a1c5afd1058 | % NLOPT_LN_AUGLAG: Augmented Lagrangian method (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_AUGLAG
val = 30;
|
github | mapDIA/mapDIA-master | NLOPT_GN_ESCH.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_ESCH.m | 130 | utf_8 | 6cad4da90ce4145ad2b1dafcf286286f | % NLOPT_GN_ESCH: ESCH evolutionary strategy
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_ESCH
val = 42;
|
github | mapDIA/mapDIA-master | NLOPT_G_MLSL.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_G_MLSL.m | 173 | utf_8 | fd60012f2c05bdeb027ee6dee44175fb | % NLOPT_G_MLSL: Multi-level single-linkage (MLSL), random (global, needs sub-algorithm)
%
% See nlopt_minimize for more information.
function val = NLOPT_G_MLSL
val = 38;
|
github | mapDIA/mapDIA-master | nlopt_minimize_constrained.m | .m | mapDIA-master/nlopt-2.4.2/octave/nlopt_minimize_constrained.m | 5,174 | utf_8 | 2093a6be53db585559168905f1fc1e4a | % Usage: [xopt, fmin, retcode] = nlopt_minimize_constrained
% (algorithm, f, f_data,
% fc, fc_data, lb, ub,
% xinit, stop)
%
% Minimizes a nonlinear multivariable function f(x, f_data{:}), subjec... |
github | mapDIA/mapDIA-master | NLOPT_LN_NEWUOA_BOUND.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LN_NEWUOA_BOUND.m | 207 | utf_8 | 67ca43d03f5347c97069a86e3e73a7e4 | % NLOPT_LN_NEWUOA_BOUND: Bound-constrained optimization via NEWUOA-based quadratic models (local, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_NEWUOA_BOUND
val = 27;
|
github | mapDIA/mapDIA-master | nlopt_minimize.m | .m | mapDIA-master/nlopt-2.4.2/octave/nlopt_minimize.m | 3,978 | utf_8 | f71b68688b460e0440ff89bdf086d2a7 | % Usage: [xopt, fmin, retcode] = nlopt_minimize(algorithm, f, f_data, lb, ub,
% xinit, stop)
%
% Minimizes a nonlinear multivariable function f(x, f_data{:}), where
% x is a row vector, returning the optimal x found (xopt) along with
% the minimum function value (fmin = f(x... |
github | mapDIA/mapDIA-master | NLOPT_GN_ORIG_DIRECT_L.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_ORIG_DIRECT_L.m | 170 | utf_8 | d61c095f05bf7fd4fbbf2ddbe22c58a4 | % NLOPT_GN_ORIG_DIRECT_L: Original DIRECT-L version (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_ORIG_DIRECT_L
val = 7;
|
github | mapDIA/mapDIA-master | NLOPT_LD_TNEWTON_RESTART.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_TNEWTON_RESTART.m | 184 | utf_8 | a482ddde1f6d6b386a3810fc142829a2 | % NLOPT_LD_TNEWTON_RESTART: Truncated Newton with restarting (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON_RESTART
val = 16;
|
github | mapDIA/mapDIA-master | NLOPT_LD_TNEWTON_PRECOND_RESTART.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m | 215 | utf_8 | 1082f147b249cc1f7e564aa3b2462048 | % NLOPT_LD_TNEWTON_PRECOND_RESTART: Preconditioned truncated Newton with restarting (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON_PRECOND_RESTART
val = 18;
|
github | mapDIA/mapDIA-master | NLOPT_LD_TNEWTON_PRECOND.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_TNEWTON_PRECOND.m | 183 | utf_8 | 167e47e5e372152ffba7552308e1193f | % NLOPT_LD_TNEWTON_PRECOND: Preconditioned truncated Newton (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON_PRECOND
val = 17;
|
github | mapDIA/mapDIA-master | NLOPT_GD_STOGO_RAND.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GD_STOGO_RAND.m | 170 | utf_8 | fea04c6327afd49e02ff536330527f60 | % NLOPT_GD_STOGO_RAND: StoGO with randomized search (global, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_GD_STOGO_RAND
val = 9;
|
github | mapDIA/mapDIA-master | NLOPT_LD_LBFGS.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_LD_LBFGS.m | 160 | utf_8 | 02936ac48fc420cd73b5a6848808dd68 | % NLOPT_LD_LBFGS: Limited-memory BFGS (L-BFGS) (local, derivative-based)
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_LBFGS
val = 11;
|
github | mapDIA/mapDIA-master | NLOPT_GN_MLSL_LDS.m | .m | mapDIA-master/nlopt-2.4.2/octave/NLOPT_GN_MLSL_LDS.m | 183 | utf_8 | 0fb34e2ebed6204b06925782f5fc2417 | % NLOPT_GN_MLSL_LDS: Multi-level single-linkage (MLSL), quasi-random (global, no-derivative)
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_MLSL_LDS
val = 22;
|
github | fugro/displaz-master | dplot.m | .m | displaz-master/bindings/matlab/dplot.m | 9,534 | utf_8 | 4ced888f527c02de953a7627e4983c17 | function dplot(position, varargin)
% 3D plotting function for points and lines
%
% The interface is similar to plot() where possible and convenient.
%
% dplot(P) Plots the Nx3 array P as points, with a point in each row
% (so X = P(:,1), Y = P(:,2), etc)
%
% dplot(P, S) Plots points P us... |
github | meghanathmacha/xPACS-master | svd_solve.m | .m | xPACS-master/src/SVDD/svd_solve.m | 475 | utf_8 | 9f710ad1ada6d2e3e9674b1cd5aecf78 |
%% SVDD Margin Primal form
function [d1, b, cSVDD,status]=svd_solve(dat,ldat,C)
nx = diag(dat*dat');
yi = ldat;
Xi = dat;
dims = size(dat,2);
ndat = length(dat);
cvx_begin quiet
cvx_precision best
variables b(1) cSVDD(dims,1) xi(ndat,1)
dual variables d1 p1
minimize( cSVDD'*cSVDD + b + C*sum(xi) )
s... |
github | meghanathmacha/xPACS-master | singleSphere.m | .m | xPACS-master/src/SVDD/singleSphere.m | 2,637 | utf_8 | ec64193bc977a2d4b691985a8b89a67a | %% Reading data
function []=singleSphere(outerfolds,innerfolds,model,name)
Cgrid = 0.1:0.2:2;
fprobs = [ ];
for outerid = 1:outerfolds
disp(outerid);
sets = setdiff([1:outerfolds],outerid);
delimiterIn = ',';
headerlinesIn = 1;
fdata = [ ];
for id = 1:sets
... |
github | 9ich/kk-master | echo_diagnostic.m | .m | kk-master/code/libspeex/echo_diagnostic.m | 2,076 | utf_8 | 8d5e7563976fbd9bd2eda26711f7d8dc | % Attempts to diagnose AEC problems from recorded samples
%
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
%
% Computes the full matrix inversion to cancel echo from the
% recording 'rec_file' using the far end signal 'play_file' using
% a filter length of 'tail_length'. The output is saved to 'o... |
github | rmahieu/misaligned-dfd-master | computeColor.m | .m | misaligned-dfd-master/dependencies/OpticalFlow/computeColor.m | 3,142 | utf_8 | a36a650437bc93d4d8ffe079fe712901 | function img = computeColor(u,v)
% computeColor color codes flow field U, V
% According to the c++ source code of Daniel Scharstein
% Contact: schar@middlebury.edu
% Author: Deqing Sun, Department of Computer Science, Brown University
% Contact: dqsun@cs.brown.edu
% $Date: 2007-10-31 21:20:30 (Wed, 31 O... |
github | rmahieu/misaligned-dfd-master | iat_flow2rgb.m | .m | misaligned-dfd-master/dependencies/IAT_v0.9.2/misc/iat_flow2rgb.m | 4,136 | utf_8 | fad3338a55cc2825fbace1f585065e42 | function rgb = iat_flow2rgb( fx, fy, dispRange )
% RGBIM = IAT_FLOW2RGB( FX, FY, DISPRANGE )
%
% IAT_FLOW2RGB creates a color image RGBIM from the dense displacements (flows)
% FX and FY. The angle of each displacement vector is translated to a color
% through a specific colomap. DISPRANGE is an optional parameter tha... |
github | rmahieu/misaligned-dfd-master | DIRT_Registration.m | .m | misaligned-dfd-master/dependencies/IAT_v0.9.2/dirt/DIRT_Registration.m | 24,483 | utf_8 | cee4718fbdb5ea31e4166bf6ae7ea2fd | function reg = DIRT_Registration(tI, pre, varargin)
% reg = DIRT_Registration(tI, pre, ...)
%
% Register the target image tI to the source image sI in pre, using the
% pixels in some region of interest in pre. The registration model is:
% sI[q] = P(tI[G(q)]) + noise
% where P is a photometric transformation and G a ... |
github | rmahieu/misaligned-dfd-master | DIRT_Precomputation.m | .m | misaligned-dfd-master/dependencies/IAT_v0.9.2/dirt/DIRT_Precomputation.m | 15,279 | utf_8 | 4d0d580de562775f1514e3b37e5e38ea | function pre = DIRT_Precomputation(sI, varargin)
% pre = DIRT_Precomputation(sI, ...)
%
% Do some precomputations for image alignment using the DIRT_Registration
% function.
%
% Mandatory inputs:
% - sI [image]
% The source image
%
% Optional inputs (properties):
% - 'ROI' [struct from the DIRT_Mask2ROI functio... |
github | rmahieu/misaligned-dfd-master | DIRT_FM_Registration.m | .m | misaligned-dfd-master/dependencies/IAT_v0.9.2/dirt/DIRT_FM_Registration.m | 2,749 | utf_8 | 96862857a3ffd780c1b26d3d2732cf76 | function reg_FM = DIRT_FM_Registration(tI, pre_FM, tR, tC, varargin)
% reg_FM = DIRT_FM_Registration(tI, pre_FM, tR, tC, varargin)
%
% Compute the SSD and OptSSD between the points in the source image in pre_FM
% and the points (tR,tC) in the target image.
%
% Mandatory inputs:
% - tI [image]
% The source image... |
github | rmahieu/misaligned-dfd-master | DIRT_FM_Precomputation.m | .m | misaligned-dfd-master/dependencies/IAT_v0.9.2/dirt/DIRT_FM_Precomputation.m | 2,514 | utf_8 | bcbdd3a7c94000f185b6d5c867e50183 | function pre_FM = DIRT_FM_Precomputation(sI, sR, sC, varargin)
% pre_FM = DIRT_FM_Precomputation(sI, sR, sC, varargin)
%
% Do some precomputations for two-image feature matching using the
% DIRT_FM_Registration function.
%
% Mandatory inputs:
% - sI [image]
% The source image
% - sR, sC [column vectors]
% ... |
github | rmahieu/misaligned-dfd-master | iat_dense_sift.m | .m | misaligned-dfd-master/dependencies/IAT_v0.9.2/nonrigid/siftflow/iat_dense_sift.m | 6,587 | utf_8 | 49eede0370fe71dfff65c0b3cce8cf81 | function [siftImage, gridX, gridY] = iat_dense_sift(im, patch_size, grid_spacing, varargin)
% [SIFTIMAGE, GRIDX,GRIDY] = IAT_DENSE_SIFT(IMAGE, PS, GSPACING)
% IAT_DENSE_SIFT creates SIFTIMAGE from IMAGE, when the pixels of latter
% are replaced by SIFT descriptors [1] that describe their surrounding
% area od size PSxP... |
github | waps101/polarisation_optimisation-master | SfPol_full.m | .m | polarisation_optimisation-master/SfPol_full.m | 11,666 | utf_8 | 0974392d46c902c538bfa0c958e46a57 | function [height1, Jacob] = SfPol_full(img, theta_pol, mask, spec_mask, process_type, opt_weights, init_z, s)
% Shape-from-polarisation full model
% Inputs:
% img: image matrix with shape H*W*Nimgs
% theta_pol: polariser angles for input images
% mask: object mask
% spec_mask: mask on specularity
% process_ty... |
github | waps101/polarisation_optimisation-master | SfPol_ratio.m | .m | polarisation_optimisation-master/SfPol_ratio.m | 11,400 | utf_8 | 0039d33ba9e00120865374a21dfebaa0 | function [height1, Jacob] = SfPol_ratio(img, theta_pol, mask, spec_mask, process_type, opt_weights, init_z)
% Shape-from-polarisation ratio-base model
% Inputs:
% img: image matrix with shape H*W*Nimgs
% theta_pol: polariser angles for input images
% mask: object mask
% spec_mask: mask on specularity
% proces... |
github | waps101/polarisation_optimisation-master | comp_result.m | .m | polarisation_optimisation-master/utils/comp_result.m | 11,720 | utf_8 | ff25163764175ce643c25cada6950686 | function comp_result(z, mask)
% show comparison between gradient map of input and ground truth sphere
% [GTx, GTy] = meshgrid(-1:2/128:1, -1:2/128:1);
% GTmask = (GTx.^2 + GTy.^2)<=1;
% GTz = zeros(size(GTmask));
% GTz(GTmask) = sqrt(1 - GTx(GTmask).^2 - GTy(GTmask).^2);
% GTnx = GTx ./ sqrt(GTx.^2+GTy.^2+1);
% GTny =... |
github | waps101/polarisation_optimisation-master | ratioResidualsFromZ.m | .m | polarisation_optimisation-master/utils/ratioResidualsFromZ.m | 16,260 | utf_8 | 5e291719016510881e46a021e78ef4b8 | function [ residuals,J ] = ratioResidualsFromZ( z,D_x,D_y,eta,pol_angles,I_obs,spec,smooth_type,bd_Dx,bd_Dy,bd_weight,bd_penalty,smooth_L,smooth_weight, smooth_counter, smooth_kernel)
% compare boundary convexity through [cos, sin] vector
%polResidualsFromZ Residuals between observed intensities and diffuse
%polarisat... |
github | waps101/polarisation_optimisation-master | polResidualsFromZ.m | .m | polarisation_optimisation-master/utils/polResidualsFromZ.m | 14,707 | utf_8 | aa10d848fcb4838e8c1ee39d26c8cec7 | function [ residuals,J ] = polResidualsFromZ( z,D_x,D_y,eta,s,albedo,pol_angles,I_obs,spec,smooth_type,bd_Dx,bd_Dy,bd_weight,bd_penalty,smooth_L,smooth_weight, smooth_counter, smooth_kernel)
%polResidualsFromZ Residuals between observed intensities and diffuse
%polarisation model
%
% Inputs:
% z is vector of height v... |
github | aranyadan/WENO5_2D_NSsolver_FORTRAN-master | WENOcaller.m | .m | WENO5_2D_NSsolver_FORTRAN-master/matlab version/WENOcaller.m | 2,379 | utf_8 | 55551064eb675f6f09cdf3c12df2571f | function [dFx,dFy] = WENOcaller(lambda,q,dx,dy)
%% Calls WENO
% Setting up ghost cells
[nx,ny,eqns] = size(q);
qnew = zeros(nx+5,ny+5,eqns);
qnew(3:2+nx,3:2+ny,:) = q(:,:,:);
qnew(1:2,:,:) = repmat(qnew(3,:,:),[2,1,1]); qnew(nx+3:nx+5,:,:) = repmat(qnew(nx+2,:,:),[3,1,1]);
qnew(:,1:2,:) = repmat(qnew(:,3,:),[1,2,1]); ... |
github | aranyadan/WENO5_2D_NSsolver_FORTRAN-master | set_boundary.m | .m | WENO5_2D_NSsolver_FORTRAN-master/matlab version/set_boundary.m | 626 | utf_8 | 6ac8f78a95ad0e25b67c1f2c6da8932b | %% Function to set BC
function q0 = set_boundary(q)
global gamma
rho=q(:,:,1); u=q(:,:,2)./rho; v=q(:,:,3)./rho; E=q(:,:,4)./rho; p=(gamma-1)*rho.*(E-0.5*(u.^2+v.^2));
u(:,end) = u(:,end-1);
v(:,end) = v(:,end-1);
p(:,end) = p(:,end-1);
rho(:,end) = rho(:,end-1);
u(:,1) = 0;
v(:,1) = 0... |
github | madkn/MultiregionBilinearCNN-ReId-master | classification_demo.m | .m | MultiregionBilinearCNN-ReId-master/caffe-bilinear/matlab/demo/classification_demo.m | 5,466 | utf_8 | 45745fb7cfe37ef723c307dfa06f1b97 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | cmjiang/FASTGE2-master | quadedgep.m | .m | FASTGE2-master/ncutfiles/quadedgep.m | 3,327 | utf_8 | 4e0cc45e71e843887beae643eb7bcb8b | % function [x,y,gx,gy,par,threshold,mag,mage,g,FIe,FIo,mago] = quadedgep(I,par,threshold);
% Input:
% I = image
% par = vector for 4 parameters
% [number of filter orientations, number of scales, filter size, elongation]
% To use default values, put 0.
% threshold = threshold on edge strength
% Outpu... |
github | pringithub/sfrmat3-master | rotate90.m | .m | sfrmat3-master/rotate90.m | 803 | utf_8 | c9c61e6d53b87cdb4b52d3e2630f465a | function out = rotate90(in, n)
%[out] = rotate90(in, n) 90 degree counterclockwise rotations of matrix
% in = input matrix (n,m) or (n,m,k)
% n = number of 90 degree rotation
% out = rotated matrix
% default = 1
% Usage:
% out = rotate90(in)
% out = rotate90(in, n)
% Needs:
% r90 (in this file)
%
% Author: ... |
github | pringithub/sfrmat3-master | legendTitle.m | .m | sfrmat3-master/legendTitle.m | 3,440 | utf_8 | 6f2c2e8f163c7c5c1067dea3a386c075 | % legendTitle - add a title to a legend
%
% Add a title to a legend
% hTitle = legentTitle ( hLegend, string, argPairs )
%
% hLegent = handle to the legend for the title to be added
% string = text string of title
% argPairs = all valid arg pairs for a title object
%
% example:
% % To add ... |
github | ElisNycander/vsc_opf-master | vscopf_f_minCurtail.m | .m | vsc_opf-master/vscopf_f_minCurtail.m | 1,748 | utf_8 | 669a5ff4393e4e63fccf04f587520913 |
function [f, df, d2f] = vscopf_f_minCurtail(x, om)
% Objective function: maximize sum of active generation from generators
% with gen2(:,PMAXIMIZE) == 1
define_constants;
%% unpack data
mpc = get_mpc(om);
vv = get_idx(om);
wind = mpc.contingencies.wind/mpc.baseMVA; % wind scenarios
prob = mpc.contingencies.probabilit... |
github | ElisNycander/vsc_opf-master | vscopf_f_maxPg.m | .m | vsc_opf-master/vscopf_f_maxPg.m | 707 | utf_8 | 0a2beb6f0474902e6ffcd231e04365d8 |
function [f, df, d2f] = vscopf_f_maxPg(x, om)
% Objective function: maximize sum of active generation from generators
% with gen2(:,PMAXIMIZE) == 1
define_constants;
%% unpack data
mpc = get_mpc(om);
vv = get_idx(om);
%% problem dimensions
nxyz = length(x); %% total number of control vars of all types
%% ... |
github | zhehedream/UAV-Path-Optimization-master | Is_Plane_In_Radar.m | .m | UAV-Path-Optimization-master/sub/Is_Plane_In_Radar.m | 475 | utf_8 | df849bf70008208815758c292c1a2366 | % Is_Plane_In_Radar
% Input: point
% Vectors of radars
% Input: p_point
% Coordinate of plane
% Input: distance
% Radar scanning radius
% Output: result
% 1-in_radar; 0-not_in_radar
function result=Is_Plane_In_Radar(point,p_point,distance)
for i=1:size(point,1)
if point(i,1)==-1000
... |
github | zhehedream/UAV-Path-Optimization-master | Get_Points_Order.m | .m | UAV-Path-Optimization-master/sub/Get_Points_Order.m | 704 | utf_8 | b6d84cbae5ca3345c36fa4c9ba0c77af | % Get_Points_Order
% Get the minimum point order which shows how to travel through all
% the points to achieve the minimum distance
% Input: point
% Output: opoint
% point order
% Output: dist
% minimum travel distance
function [opoint,dist]=Get_Points_Order(point)
n=size(point,1);
seq=perms(1:n);
min... |
github | zhehedream/UAV-Path-Optimization-master | Get_Point_Center.m | .m | UAV-Path-Optimization-master/sub/Get_Point_Center.m | 196 | utf_8 | d76613e7098932ca775f37a3ecc1b34a | % Get_Point_Center
% Get the coordinate of the weight center
function [x,y]=Get_Point_Center(A,vec)
n=length(vec);
x=0;
y=0;
for i=1:n
x=x+A(vec(i),1);
y=y+A(vec(i),2);
end
x=x/n;
y=y/n;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.