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 | alexalex222/Wind-Speed-Prediction-master | uimm_update.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ekf_sine_demo/uimm_update.m | 2,973 | utf_8 | e386b64264ff328d4c5e5fa35c945487 | %IMM_UPDATE UKF based Interacting Multiple Model (IMM) Filter update step
%
% Syntax:
% [X_i,P_i,MU,X,P] = IMM_UPDATE(X_p,P_p,c_j,ind,dims,Y,H,R)
%
% In:
% X_p - Cell array containing N^j x 1 mean state estimate vector for
% each model j after prediction step
% P_p - Cell array containing N^j x N^j st... |
github | alexalex222/Wind-Speed-Prediction-master | ukf_update2.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ekf_sine_demo/ukf_update2.m | 3,187 | UNKNOWN | 0a303ec8bcb980daf834c0d75ff65fb8 | %UKF_UPDATE2 - Augmented form Unscented Kalman Filter update step
%
% Syntax:
% [M,P,K,MU,IS,LH] = UKF_UPDATE2(M,P,Y,h,R,h_param,alpha,beta,kappa,mat)
%
% In:
% M - Mean state estimate after prediction step
% P - State covariance after prediction step
% Y - Measurement vector.
% h - Measurement model func... |
github | alexalex222/Wind-Speed-Prediction-master | urts_smooth2.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ekf_sine_demo/urts_smooth2.m | 3,098 | UNKNOWN | eafbc7975b06ca22a4d6002269610046 | %URTS_SMOOTH2 Augmented form Unscented Rauch-Tung-Striebel smoother
%
% Syntax:
% [M,P,S] = URTS_SMOOTH2(M,P,f,Q,[f_param,alpha,beta,kappa,mat,same_p])
%
% In:
% M - NxK matrix of K mean estimates from Unscented Kalman filter
% P - NxNxK matrix of K state covariances from Unscented Kalman Filter
% f - Dynamic ... |
github | alexalex222/Wind-Speed-Prediction-master | eimm_smooth.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ekf_sine_demo/eimm_smooth.m | 10,081 | utf_8 | 14cc37296d6aa91b1c0ded61dd76c73f | %EIMM_SMOOTH EKF based fixed-interval IMM smoother using two IMM-EKF filters.
%
% Syntax:
% [X_S,P_S,X_IS,P_IS,MU_S] = EIMM_SMOOTH(MM,PP,MM_i,PP_i,MU,p_ij,mu_0j,ind,dims,A,a,a_param,Q,R,H,h,h_param,Y)
%
% In:
% MM - Means of forward-time IMM-filter on each time step
% PP - Covariances of forward-time IMM-f... |
github | alexalex222/Wind-Speed-Prediction-master | ekf_sine_f.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ekf_sine_demo/ekf_sine_f.m | 479 | utf_8 | 3e305873b26ce735e10f3cc3bf0cbee1 | % Dynamical model function for the random sine signal demo
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function x_n = ekf_sine_f(x,param)
dt =... |
github | alexalex222/Wind-Speed-Prediction-master | ungm_d2h_dx2.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ungm_demo/ungm_d2h_dx2.m | 354 | utf_8 | 7dfa2e46358bf758dafc4800e05ce95f | % Hessian of the measurement model function in UNGM-model.
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function d = ungm_d2h_dx2(x,param)
d = ... |
github | alexalex222/Wind-Speed-Prediction-master | ungm_d2f_dx2.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ungm_demo/ungm_d2f_dx2.m | 356 | utf_8 | 9ffb3dfcf6d01d351901d55c4e263b84 | % Hessian of the state transition function in UNGM-model.
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function d = ungm_d2f_dx2(x,param)
d = 25... |
github | alexalex222/Wind-Speed-Prediction-master | ungm_h.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ungm_demo/ungm_h.m | 382 | utf_8 | 0f3485c123b9aa66a21f68bce20aa18a | % Measurement model function for the UNGM-model.
%
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function y_n = ungm_h(x_n,param)
y_n = x_n(1,:).*x_n... |
github | alexalex222/Wind-Speed-Prediction-master | ungm_dh_dx.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ungm_demo/ungm_dh_dx.m | 328 | utf_8 | f502cd540115362bbb125287a8f4c55c | % Jacobian of the measurement model function for the UNGM-model.
%
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function dh = ungm_dh_dx(x,param)
dh... |
github | alexalex222/Wind-Speed-Prediction-master | ungm_f.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ungm_demo/ungm_f.m | 440 | utf_8 | 6923e25b28640fe8a310079cafe82c97 | % State transition function for the UNGM-model.
%
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function x_n = ungm_f(x,param)
n = param(1);
x_n = 0.... |
github | alexalex222/Wind-Speed-Prediction-master | ungm_df_dx.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/ungm_demo/ungm_df_dx.m | 358 | utf_8 | 2b593c3666a1c0e89fbf5e9ce173953f | % Jacobian of the state transition function for the UNGM-model.
%
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function df = ungm_df_dx(x,param)
df ... |
github | alexalex222/Wind-Speed-Prediction-master | kf_cwpa_demo.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/kf_cwpa_demo/kf_cwpa_demo.m | 7,431 | utf_8 | 83f5b06ca7f301fb9a3c358fa88bba60 | % Demonstration for Kalman filter and smoother using a 2D CWPA model
%
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function kf_cwpa_demo
% Transit... |
github | alexalex222/Wind-Speed-Prediction-master | bot_d2h_dx2.m | .m | Wind-Speed-Prediction-master/UKF/unscented kalman/ekfukf/demos/bot_demo/bot_d2h_dx2.m | 991 | utf_8 | 121065207e815dd017245b07a9f807b6 | % Hessian of the measurement function in BOT-demo.
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function dY = bot_d2h_dx2(x,s)
% Space for Hessia... |
github | alexalex222/Wind-Speed-Prediction-master | emgm.m | .m | Wind-Speed-Prediction-master/Global Code/emgm.m | 3,012 | utf_8 | 3e33f09eae2378fb4c43bac397dcedbf | function [label, model, llh] = emgm(X, init)
% Perform EM algorithm for fitting the Gaussian mixture model.
% X: d x n data matrix
% init: k (1 x 1) or label (1 x n, 1<=label(i)<=k) or center (d x k)
% Written by Michael Chen (sth4nth@gmail.com).
%% initialization
fprintf('EM for Gaussian mixture: running ... \n');... |
github | alexalex222/Wind-Speed-Prediction-master | learn_kalman.m | .m | Wind-Speed-Prediction-master/Autoregressive-Kalman/learn_kalman.m | 5,515 | utf_8 | d0a3eadd7f797f9383d3eaa4c716787b | function [A, C, Q, R, initx, initV, LL] = ...
learn_kalman(data, A, C, Q, R, initx, initV, max_iter, diagQ, diagR, ARmode, constr_fun, varargin)
% LEARN_KALMAN Find the ML parameters of a stochastic Linear Dynamical System using EM.
%
% [A, C, Q, R, INITX, INITV, LL] = LEARN_KALMAN(DATA, A0, C0, Q0, R0, INITX0, INI... |
github | alexalex222/Wind-Speed-Prediction-master | f1.m | .m | Wind-Speed-Prediction-master/SVRmethod/f1.m | 408 | utf_8 | 846533f6236754c7362829983348b666 | % Dynamical model function for the random sine signal demo
% Copyright (C) 2007 Jouni Hartikainen
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function x_n = f1(x)
load('regressionmo... |
github | zeroc-ice/ice-demos-main | clean.m | .m | ice-demos-main/matlab/clean.m | 805 | utf_8 | 549542af4104f0c574c5f6f8ad44f518 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function clean()
function r = folders(root)
function r = exclude(name)
r = strcmp(name, '.') | strcmp(name, '..');
end
all = dir(root);
all = all([all.isdir]);
all = all(~cellfun(@exclude, {all.name}));
... |
github | zeroc-ice/ice-demos-main | build.m | .m | ice-demos-main/matlab/build.m | 1,031 | utf_8 | 3872e391b95f86080eb35ba7e7943e7a | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function build()
function r = folders(root)
function r = exclude(name)
r = strcmp(name, '.') | strcmp(name, '..');
end
all = dir(root);
all = all([all.isdir]);
all = all(~cellfun(@exclude, {all.name}));
... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Manual/printer/client.m | 774 | utf_8 | 2bc870a8b95e4433aab5fd7759fded79 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Manual/simpleFileSystem/client.m | 1,731 | utf_8 | 1d44e8c0f8069b5f66fcc8925484d7d0 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Filesystem.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.in... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/minimal/client.m | 579 | utf_8 | 45301b723801bc18283c76a3bba4be90 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client(args)
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*
if nargin == 0
args = {};
end
try
communicator = Ice.initialize(args);
cleanup = onClea... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/optional/client.m | 5,567 | utf_8 | 8e173bc8ae80237300c61d1bc90d6794 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/gui/client.m | 225 | utf_8 | 37e7e2b4667e3eab1fd4686f029dfc8e | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
import Ice.*;
UI();
end
|
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/asyncInvocation/client.m | 2,577 | utf_8 | c32f942189ccd3972ef7e7e26d7b7d71 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/hello/client.m | 4,279 | utf_8 | 10b2c2a55d685424a9d0061fba768a8f | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initialize({'--Ice.Confi... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/context/client.m | 2,381 | utf_8 | ff91ad5a25e5d8356ef12c1d59205924 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/matrix/client.m | 1,610 | utf_8 | 1078741eae96f53da166188b8bb51656 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/properties/client.m | 3,499 | utf_8 | c1919c1ae16194327d74471f0b3b659e | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/throughput/client.m | 9,576 | utf_8 | 1ae6bc6f3a3859b480bbc0f0e63ccee3 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/session/client.m | 2,742 | utf_8 | b2489718e44460a1e2ea416729131056 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/Ice/latency/client.m | 1,047 | utf_8 | 6918e92a9816c0fb3d0a633fdc6d6b64 | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
try
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initiali... |
github | zeroc-ice/ice-demos-main | client.m | .m | ice-demos-main/matlab/IceDiscovery/hello/client.m | 4,270 | utf_8 | ec94a426793d6cc92b7f0f88222b3e3f | %
% Copyright (c) ZeroC, Inc. All rights reserved.
%
function client()
addpath('generated');
if ~libisloaded('ice')
loadlibrary('ice', @iceproto);
end
import Demo.*;
% Initializes a communicator and then destroys it when cleanup is collected
communicator = Ice.initialize({'--Ice.Confi... |
github | sailorguy/MATLAB-Photonics-master | latticeGen.m | .m | MATLAB-Photonics-master/Geometry/latticeGen.m | 10,616 | utf_8 | bf95966b476727a3459d17650d5350cf | function [colors,radii,latticeSites,disorderSites, lattice] = latticeGen(lattice)
%Lattice Vectors
switch lattice.type
case '1D'
%Get basis location
lattice.basisVec = [0 0 0];
%Get Lattice Sites
latticeSites = generateLatticeSites(lattice);
... |
github | sailorguy/MATLAB-Photonics-master | addEpsilonDataMEEP.m | .m | MATLAB-Photonics-master/Utilities/addEpsilonDataMEEP.m | 1,749 | utf_8 | d7a340ae592158809d65c9a07fabaee7 | function addEpsilonDataMEEP
global simCount
simCount = 0;
%Parent directory for simulations
parentDirectory = 'W:\scratch\simulation\Resonance\IDO\R-0.250_epsS-13.0_epsL-1.0\DefectRadius-0.000';
%Process all simulations in parent directory
isFolderSim(parentDirectory);
end
function isFolderSim(parentDirectory)
%... |
github | sailorguy/MATLAB-Photonics-master | addEpsilonDataMPB.m | .m | MATLAB-Photonics-master/Utilities/addEpsilonDataMPB.m | 1,720 | utf_8 | 50dd063a55a7720fd0c038096781d53c | function addEpsilonDataMPB
global simCount
simCount = 0;
%Parent directory for simulations
parentDirectory = 'W:\data\simulation\MPB\Diamond\InverseOpal\FieldMap';
%Process all simulations in parent directory
isFolderSim(parentDirectory);
end
function isFolderSim(parentDirectory)
%Get listing of all directories
... |
github | sailorguy/MATLAB-Photonics-master | format_ticks.m | .m | MATLAB-Photonics-master/Utilities/format_ticks.m | 17,356 | utf_8 | d9ac2601fdb54cb85cf24d42e8784212 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BEGIN HEADER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%... |
github | sailorguy/MATLAB-Photonics-master | intgrad1.m | .m | MATLAB-Photonics-master/Utilities/integratedgradient/intgrad1.m | 8,370 | utf_8 | 7d2da6f87b1b99f0cc829f722312f615 | function fhat = intgrad1(fx,dx,f1,method)
% intgrad: generates a vector, integrating derivative information.
% usage: fhat = intgrad1(dfdx)
% usage: fhat = intgrad1(dfdx,dx)
% usage: fhat = intgrad1(dfdx,dx,f1)
% usage: fhat = intgrad1(dfdx,dx,f1,method)
%
% arguments: (input)
% dfdx - vector of length nx, as gradient... |
github | sailorguy/MATLAB-Photonics-master | distance2curve.m | .m | MATLAB-Photonics-master/Utilities/Curve Distance/distance2curve.m | 55,859 | utf_8 | 0f0482460c8c58989168e01a720f9b8b | function [xy,distance,t_a] = distance2curve(curvexy,mapxy,interpmethod)
% distance2curve: minimum distance from a point to a general curvilinear n-dimensional arc
% usage: [xy,distance,t] = distance2curve(curvexy,mapxy) % uses linear curve segments
% usage: [xy,distance,t] = distance2curve(curvexy,mapxy,interpmethod)
%... |
github | sailorguy/MATLAB-Photonics-master | quaterniondemo2.m | .m | MATLAB-Photonics-master/Utilities/Quaternion/quaterniondemo2.m | 1,248 | utf_8 | 0a22e80f27f38381f45ebcbf6670d11b | function quaterniondemo2
% function quaterniondemo2
% quaternion demo 2, Reentry Vehicle tip off on separation and spin-up
mass = 500; % kg
radius = 0.5; % m
len = 3; % m
Iaxial = mass * 0.3 * radius^2; % kg * m^2, solid cone axial moment
Ilat = mass *( 0.15 * radius^2 + 0.0375 * len^2 ); % latera... |
github | sailorguy/MATLAB-Photonics-master | quaternion.m | .m | MATLAB-Photonics-master/Utilities/Quaternion/quaternion.m | 84,070 | utf_8 | 4dc1cb632b215e339393ded15ba9d9b7 | classdef quaternion
% classdef quaternion, implements quaternion mathematics and 3D rotations
%
% Properties (SetAccess = protected):
% e(4,1) components, basis [1; i; j; k]: e(1) + i*e(2) + j*e(3) + k*e(4)
% i*j=k, j*i=-k, j*k=i, k*j=-i, k*i=j, i*k=-j, i*i = j*j = k*k = -1
%
% Constructors:
% q = quater... |
github | sailorguy/MATLAB-Photonics-master | quaterniondemo.m | .m | MATLAB-Photonics-master/Utilities/Quaternion/quaterniondemo.m | 5,125 | utf_8 | 69e670df23edcb478ac37aec34cd0e18 | function quaterniondemo( time, sap, DCMin, interval )
% function quaterniondemo( time, sap, DCMin, interval )
% quaternion demo, compare numerical and analytical rotational motion
% solutions
% Inputs:
% time(nt) time series array (s)
% sap(3) [spin rate (Hz), precession cone half angle (rad),
% ... |
github | sailorguy/MATLAB-Photonics-master | averageSimData.m | .m | MATLAB-Photonics-master/Utilities/Process Simulations/averageSimData.m | 3,114 | utf_8 | dc01476d6a254fbaa3f657928c56deac | function averageSimData
global simCount
simCount = 0;
global localPath;
localPath = 'R:/';
%Parent directory for simulations
parentDirectory = [localPath 'gpfstest\IDO\PRM2'];
%Process all simulations in parent directory
isFolderSim(parentDirectory);
simCount
end
function isFolderSim(parentDirectory)
global simCo... |
github | sailorguy/MATLAB-Photonics-master | checkSimulationCompletion.m | .m | MATLAB-Photonics-master/Utilities/Process Simulations/checkSimulationCompletion.m | 4,351 | utf_8 | 6caafd086d49a5c6f2867d089dabbd03 | function checkSimulationCompletion
global simCount
simCount = 0;
global SimGroup
global localPath;
localPath = 'W:/';
global pbsQueue
pbsQueue = 'iw-shared-6';
global pbsNodes
pbsNodes = 256;
global walltime
walltime = 12;
%Parent directory for simulations
parentDirectory = [localPath 'gpfs-scratch\IDO\Clean\Test'];
%... |
github | sailorguy/MATLAB-Photonics-master | loadHarminvSimulation.m | .m | MATLAB-Photonics-master/Utilities/Process Simulations/loadHarminvSimulation.m | 1,798 | utf_8 | d1c46a9922c583da4068b8cfb2cc520d | function [Sims, simNumber] = loadHarminvSimulation(parentDirectory)
global simCount
global SimGroup
simCount = 0;
SimGroup = SimGroupObj;
%Process all simulations in parent directory
isFolderSim(parentDirectory);
%Display number of simulations found for resubmission
simCount
%Return SimGroup
Sims = SimGroup;
simNu... |
github | sailorguy/MATLAB-Photonics-master | loadSimulationFields.m | .m | MATLAB-Photonics-master/Utilities/Process Simulations/Field Computations/loadSimulationFields.m | 4,609 | utf_8 | 0b8127e614471203e7d3cfbc02d28f62 | function [SimGroup] = loadSimulationFields(path, simName, indices, useLoadedFields)
matFile = [path '/save/' simName '.mat'];
field = ElectromagneticFieldObj;
SimGroup = SimGroupObj;
%Load matlab data file
temp = load(matFile);
SimGroup = temp.SimGroup;
if(~isempty(SimGroup.field) && useLoadedFields)
return
end... |
github | sailorguy/MATLAB-Photonics-master | line_fewer_markers.m | .m | MATLAB-Photonics-master/Utilities/Line fewer markers/line_fewer_markers/line_fewer_markers.m | 10,907 | utf_8 | 51c1e76a1de1730209fc9cb74139ee20 | % line_fewer_markers - line with controlled amount of markers and correct legend behaviour
%
% LINE_FEWER_MARKERS(X,Y,NUM_MARKERS) adds the line in vectors X and Y to the current axes
% with exactly NUM_MARKERS markers drawn.
%
% LINE_FEWER_MARKERS(X,Y,NUM_MARKERS,'PropertyName',PropertyValue,...) plots the dat... |
github | sailorguy/MATLAB-Photonics-master | ctlFile.m | .m | MATLAB-Photonics-master/File Management/ctlFile.m | 10,365 | utf_8 | 7901fb47d1446ea1511dd0303873fc74 | %This file contains functions used to generate a .ctl file for inputting
%simulation parameters to MEEP.
%Materials, Geometry and Simulation are data structures containing fields
%that describe those parameters. Sim is a switch variable that is used to
%call the correct sub-function for the simulatio under considerati... |
github | sailorguy/MATLAB-Photonics-master | MPBctlFile.m | .m | MATLAB-Photonics-master/File Management/MPBctlFile.m | 6,610 | utf_8 | 785e8d45efe1422d8a5190885d35fd9a | function MPBctlFile(SimGroup)
%This file contains functions used to generate a .ctl file for inputting
%simulation parameters to MPB.
global fid
%Open .ctl file for writing
fid = fopen([SimGroup.localPath '/' SimGroup.dir '/' SimGroup.name '/' SimGroup.name 'MPB.ctl'],'w');
%Setup lattice
geoLattice(SimGroup);
%Set... |
github | sailorguy/MATLAB-Photonics-master | updateSimGroups.m | .m | MATLAB-Photonics-master/Simulation Viewer/updateSimGroups.m | 6,358 | utf_8 | c0fc2b677cc98bcb647de1b7072a0e84 | function updateSimGroups(TreePath, checked)
%This function updates the loaded sim groups based upon user selections
global SimViewer_g
%If function call origniated from usere changing checkbox status, clear all
%checked flags in SimViewer_g
if(checked)
resetCheckedFlag;
end
%Loop over all selected paths (1 if mo... |
github | sailorguy/MATLAB-Photonics-master | drawPlotElements.m | .m | MATLAB-Photonics-master/Simulation Viewer/drawPlotElements.m | 1,175 | utf_8 | 66836b457ec63152bfdae80786319b53 | function drawPlotElements(k)
%This function loops over plot elements and their children, drawing them to
%the current axes, for the SimGroup with index k
global SimViewer_g
%Hold to allow plotting of multiple elements
hold on
%Loop over all root level elements (that don't use parent data)
for n = 1:length(SimViewer_... |
github | sailorguy/MATLAB-Photonics-master | PlotUpdate.m | .m | MATLAB-Photonics-master/Simulation Viewer/PlotUpdate.m | 2,325 | utf_8 | e774f8c5dc82915338c733574cef9af6 | function PlotUpdate
%This function updates the plot(s) by checking for which SimGroups are
%selected, importing any data as needed and replotting the results
global SimViewer_g
%Check if reflectance_h is valid
if(isempty(SimViewer_g.reflectance_h))
SimViewer_g.reflectance_h = figure; %Set handle
%Positio... |
github | sailorguy/MATLAB-Photonics-master | SimViewerMain.m | .m | MATLAB-Photonics-master/Simulation Viewer/SimViewerMain.m | 7,960 | utf_8 | 3c16b979a30260ee426db17ce48c837e | function varargout = SimViewerMain(varargin)
% SIMVIEWERMAIN MATLAB code for SimViewerMain.fig
% SIMVIEWERMAIN, by itself, creates a new SIMVIEWERMAIN or raises the existing
% singleton*.
%
% H = SIMVIEWERMAIN returns the handle to a new SIMVIEWERMAIN or the handle to
% the existing singleton*.
%
% ... |
github | sailorguy/MATLAB-Photonics-master | BandPlot.m | .m | MATLAB-Photonics-master/Simulation Viewer/BandPlot/BandPlot.m | 7,171 | utf_8 | 82befd318e311438bf07411668488686 | function varargout = BandPlot(varargin)
% BANDPLOT MATLAB code for BandPlot.fig
% BANDPLOT, by itself, creates a new BANDPLOT or raises the existing
% singleton*.
%
% H = BANDPLOT returns the handle to a new BANDPLOT or the handle to
% the existing singleton*.
%
% BANDPLOT('CALLBACK',hObject,ev... |
github | sailorguy/MATLAB-Photonics-master | BandPlotUpdate.m | .m | MATLAB-Photonics-master/Simulation Viewer/BandPlot/BandPlotUpdate.m | 10,571 | utf_8 | 6b3db8b8fc4a675b4013f12e19e75276 | function BandPlotUpdate(btnPress)
%This function updates the plot(s) by checking for which SimGroups are
%selected, importing any data as needed and replotting the results.
%If the newFigure flag is set, the plot is directed to a new figure to
%facilitate saving as an image
global SimViewer_g
%Update SimViewer_g with... |
github | sailorguy/MATLAB-Photonics-master | projectBandStructure.m | .m | MATLAB-Photonics-master/Simulation Viewer/BandPlot/projectBandStructure.m | 1,135 | utf_8 | f7e7882d01264d05939fc0f3c114794e | function projectBandStructure
global SimViewer_g
%Loop over all imported SimGroups
for k = 1:length(SimViewer_g.SimGroup)
%Check to see if the group is checked
if(SimViewer_g.SimGroup(k).checked)
%Check if simulation is an MPB simulation
if(strcmp(SimViewer_g.SimGroup(k).type,'MP... |
github | sailorguy/MATLAB-Photonics-master | ReflectancePlotUpdate.m | .m | MATLAB-Photonics-master/Simulation Viewer/ReflectionPlot/ReflectancePlotUpdate.m | 10,096 | utf_8 | dd665bfc760444c90c0f9d449565870f | function ReflectancePlotUpdate(btnPress)
%This function updates the plot(s) by checking for which SimGroups are
%selected, importing any data as needed and replotting the results.
%If the newFigure flag is set, the plot is directed to a new figure to
%facilitate saving as an image
global SimViewer_g
%Update SimViewer... |
github | sailorguy/MATLAB-Photonics-master | ReflectionPlot.m | .m | MATLAB-Photonics-master/Simulation Viewer/ReflectionPlot/ReflectionPlot.m | 12,777 | utf_8 | e1bafc8d0cf083e253969d2a4fc0266b | function varargout = ReflectionPlot(varargin)
% REFLECTIONPLOT MATLAB code for ReflectionPlot.fig
% REFLECTIONPLOT, by itself, creates a new REFLECTIONPLOT or raises the existing
% singleton*.
%
% H = REFLECTIONPLOT returns the handle to a new REFLECTIONPLOT or the handle to
% the existing singleton... |
github | sailorguy/MATLAB-Photonics-master | PlotControls.m | .m | MATLAB-Photonics-master/Simulation Viewer/Controls/PlotControls.m | 28,218 | utf_8 | 43bc4da3366ce752397e0713f1872f88 | function varargout = PlotControls(varargin)
% REFLECTIONPLOTCONTROLS MATLAB code for PlotControls.fig
% REFLECTIONPLOTCONTROLS, by itself, creates a new REFLECTIONPLOTCONTROLS or raises the existing
% singleton*.
%
% H = REFLECTIONPLOTCONTROLS returns the handle to a new REFLECTIONPLOTCONTROLS or the han... |
github | sailorguy/MATLAB-Photonics-master | createPlotElementTree.m | .m | MATLAB-Photonics-master/Simulation Viewer/Controls/createPlotElementTree.m | 10,453 | utf_8 | 47d1dc58fcc64ced20d303d4b4c57257 | function createPlotElementTree(controlsType)
global SimViewer_g
%Get handles to correct plot type
switch controlsType
case 'Reflectance'
%Get handles for reflectance controls window
handles = guihandles(SimViewer_g.reflectanceControls_h);
SimViewer_g.reflPlotControls = buildTr... |
github | sailorguy/MATLAB-Photonics-master | exportData.m | .m | MATLAB-Photonics-master/Simulation Viewer/Controls/exportData.m | 2,476 | utf_8 | e216b5e24d3f150e27cbf5404186ba38 | function exportData
global SimViewer_g
global data
global headers
global writtenXdata index
writtenXdata = false;
index = 1;
%Get export folder
exportFolder = SimViewer_g.reflPlotControls.exportFolder;
%Get indices for currently selected element
indices = SimViewer_g.reflPlotControls.indices;
%Preallocate data arr... |
github | nicost/micro-manager-main | StartMMStudio.m | .m | micro-manager-main/bindist/any-Windows/StartMMStudio.m | 13,242 | utf_8 | 74fb52a0f11495f0224769c16990f603 | function S = StartMMStudio(varargin)
% STARTMMSTUDIO Start MMStudio, setting up MATLAB's Java classpath as necessary
%
% STUDIO = STARTMMSTUDIO() Start MMStudio from the
% Micro-Manager installation where
% StartMMStudio.... |
github | mfopt/mf_pogs-master | pogs.m | .m | mf_pogs-master/matlab/pogs.m | 10,285 | utf_8 | 0cb145d08cd555edc0bf3df729862514 | function [x, y, factors, n_iter] = pogs(prox_f, prox_g, obj_fn, A, params, factors)
%%POGS Generic graph projection splitting solver.
% Solves problems in the form
%
% minimize f(y) + g(x),
% subject to y = Ax.
%
% where the proximal operators of the functions f and g are known.
%
% [x, factors] = po... |
github | inikhil/Financial-Engineering-lab-master | Lab_11_try.m | .m | Financial-Engineering-lab-master/Lab_11_try.m | 850 | utf_8 | 2ac3ef7db54c78c31363cce1be7b8aee | function output = Lab_11_try()
paramSets = {[5.9, 0.2, 0.3, 0.1], [3.9, 0.1, 0.3, 0.2], [0.1, 0.4, 0.11, 0.1]};
times = 0.5:0.5:5;
for i=1:length(paramSets)
for j=1:length(times)
yields(j) = computeVasicek(times(j), paramSets{i});
end
figure(i);
plot([0, times], [paramSets{i}(4), yield... |
github | inikhil/Financial-Engineering-lab-master | BSM_4.m | .m | Financial-Engineering-lab-master/Assignment 7/q4/BSM_4.m | 6,127 | utf_8 | 8dc55aec475e247b0e580de5ec81ebe2 | function [] = BSM_4()
clc;
figure_i = 1;
figure_name = 'Lab7_Q4-Figure';
% Parameters for classical BSM.
T = 1; K = 1; r = 0.05; sig = 0.6; t = 0; s = 0.5;
% Sensitivity of Call Options.
% Varying s.
s_vec = 0.5:0.01:1.5;
fig_name = ['Sensitivity of C with respect to S (S = ', num2s... |
github | vfitoolkit/VFIToolkit-matlab-master | discretizeLifeCycleAR1_FellaGallipoliPan.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/discretizeLifeCycleAR1_FellaGallipoliPan/discretizeLifeCycleAR1_FellaGallipoliPan.m | 7,877 | utf_8 | 90b2e6d716bbbf19aece7de2ad262d8d | function [z_grid_J, P_J,jequaloneDistz,otheroutputs] = discretizeLifeCycleAR1_FellaGallipoliPan(rho,sigma,znum,J,fellagallipolipanoptions)
% Please cite: Fella, Gallipoli & Pan (2019) "Markov-chain approximations for life-cycle models"
%
% Fella-Gallipoli-Pan discretization method for a 'life-cycle non-stationary AR(1)... |
github | vfitoolkit/VFIToolkit-matlab-master | discretizeAR1_TauchenHussey.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/discretizeAR1_TauchenHussey/discretizeAR1_TauchenHussey.m | 3,844 | utf_8 | e654c75cd1e53085f27850f08442d688 | function [z_grid,P] = discretizeAR1_TauchenHussey(mew,rho,sigma,znum,tauchenhusseyoptions)
% Create states vector, z_grid, and transition matrix, P, for the discrete markov process approximation
% of AR(1) process z'=mew+rho*z+e, e~N(0,sigma^2), by Tauchen-Hussey method
%
% Input:
% N scalar, number... |
github | vfitoolkit/VFIToolkit-matlab-master | discretizeLifeCycleAR1_FellaGallipoliPanTauchen.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/discretizeLifeCycleAR1_FellaGallipoliPanTauchen/discretizeLifeCycleAR1_FellaGallipoliPanTauchen.m | 7,405 | utf_8 | 5fe95380d8012cf82040aeb867041450 | function [z_grid_J, P_J,jequaloneDistz,otheroutputs] = discretizeLifeCycleAR1_FellaGallipoliPanTauchen(rho,sigma,znum,J,fellagallipolipanoptions)
% Please cite: Fella, Gallipoli & Pan (2019) "Markov-chain approximations for life-cycle models"
%
% Fella-Gallipoli-Pan discretization method for a 'life-cycle non-st... |
github | vfitoolkit/VFIToolkit-matlab-master | GaussianMixtureQuadrature.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/FTsubcodes/GaussianMixtureQuadrature.m | 2,222 | utf_8 | 560c865bff342ccf07f2b0aea49ce38d | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GaussianMixtureQuadrature
% (c) 2019 Alexis Akira Toda
%
% Purpose:
% compute the nodes and weights of Gaussian quadrature when the
% weighting function is a Gaussian mixture
% Usage:
% [x,w] = GaussianMixtureQuadrature(Coeff... |
github | vfitoolkit/VFIToolkit-matlab-master | entropyObjective.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/FTsubcodes/Core functionalities/entropyObjective.m | 1,840 | utf_8 | 3c41e2bcddb3336bab02c0eba2b4f38c | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% entropyObjective
% (c) 2016 Leland E. Farmer and Alexis Akira Toda
%
% Purpose:
% Compute the maximum entropy objective function used in
% discreteApproximation
%
% Usage:
% obj = entropyObjective(lambda,Tx,TBar,q)... |
github | vfitoolkit/VFIToolkit-matlab-master | discreteApproximation.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/FTsubcodes/Core functionalities/discreteApproximation.m | 3,163 | utf_8 | 2d84e0c7281080cec68c75afdccb0fa1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% discreteApproximation
% (c) 2016 Leland E. Farmer and Alexis Akira Toda
%
% Purpose:
% Compute a discrete state approximation to a distribution with known
% moments, using the maximum entropy procedure proposed in Tanaka an... |
github | vfitoolkit/VFIToolkit-matlab-master | legpts.m | .m | VFIToolkit-matlab-master/DiscretizationMethods/FTsubcodes/Subroutines/legpts.m | 9,971 | utf_8 | 97b3d3912f964d311f97915c74ad2088 | function [x w v] = legpts(n,int,meth)
%LEGPTS Legendre points and Gauss Quadrature Weights.
% LEGPTS(N) returns N Legendre points X in (-1,1).
%
% [X,W] = LEGPTS(N) returns also a row vector W of weights for Gauss quadrature.
%
% LEGPTS(N,D) scales the nodes and weights for the domain D. D can be
% either a... |
github | vfitoolkit/VFIToolkit-matlab-master | getFredData.m | .m | VFIToolkit-matlab-master/DataEtc/FRED/getFredData.m | 7,695 | utf_8 | a4855bcba0b6ad50330168d61a35cc23 | function [output] = getFredData(series_id, observation_start, observation_end, units, frequency, aggregation_method, ondate, realtime_end)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Connects to FRED database and retrieves the data series identified by series_id.
%
% Examples b... |
github | vfitoolkit/VFIToolkit-matlab-master | cmaes_vfitoolkit.m | .m | VFIToolkit-matlab-master/Optimization/CMAES/cmaes_vfitoolkit.m | 121,821 | utf_8 | 333b6a5030f6069c712d3a33e474be5a | function [xmin, ... % minimum search point of last iteration
fmin, ... % function value of xmin
counteval, ... % number of function evaluations done
stopflag, ... % stop criterion reached
out, ... % struct with various histories and solutions
beste... |
github | xiamenwcy/impSDM-master | mean_covariance_of_data.m | .m | impSDM-master/common/manifold/mean_covariance_of_data.m | 161 | utf_8 | eba64c3a6e320b95d72604e752d626d5 | %data has nx2
function [mu,cov] = mean_covariance_of_data ( data )
n = size(data,1);
mu = (1/n)*sum(data);
z = data - repmat(mu,n,1);
cov = (1/(n))*z'*z;
end
|
github | xiamenwcy/impSDM-master | load_all_data.m | .m | impSDM-master/common/io/load_all_data.m | 4,494 | utf_8 | f9010a3ebc8aa907fd59603f3bf24534 | function [Data] = load_all_data ( dbpath_img, dbpath_pts, options )
%% output format
%{
DATA.
- width_orig: the width of the original image.
- height_orig: the height of the original image.
- img_gray: the crop image.
- height: the height of crop image.
- wdith: the width of crop image.
- shape_gt: ground-truth landma... |
github | xiamenwcy/impSDM-master | load_all_data2.m | .m | impSDM-master/common/io/load_all_data2.m | 4,499 | utf_8 | a6fb5a9348c715501f0f39856aaf7a81 | function [Data] = load_all_data2 ( dbpath_img, dbpath_pts, options )
%% output format
%{
DATA.
- width_orig: the width of the original image.
- height_orig: the height of the original image.
- img_gray: the crop image.
- height: the height of crop image.
- wdith: the width of crop image.
- shape_gt: ground-truth landm... |
github | ZhuJunzhe/matlab-demos-2-master | rolloff_demo.m | .m | matlab-demos-2-master/rolloff_demo.m | 4,152 | utf_8 | 6fef0ec2d17cda75ce908c245b9889e2 | %% Cosine Rolloff Time vs. Frequency Domain
%
% Copyright 2007 Telecommunications Lab
% $Revision: 1.0 $ $Date: 2007/06/21 12:45:07 $
function rolloff_demo(action)
if nargin<1,
action='initialize';
end;
Fs = 5000; % Sampling frequency 5000 Hz
T = 1/100; %... |
github | ZhuJunzhe/matlab-demos-2-master | ofdm_mod.m | .m | matlab-demos-2-master/ofdm_mod.m | 6,199 | utf_8 | 8b8c19e28558cd4dd71f3c0c37aa72a7 | % ##############################################################################
% ## ofdm_mod.m : OFDM-Modulator ##
% ##############################################################################
%
% Aufruf: [s_sig,ofdm] = ofdm_mod(s_sym,ofdm);
%
% Eingabe: s_sy... |
github | YuejiangLIU/Optimal_Power_Flow-master | loadpred.m | .m | Optimal_Power_Flow-master/nonconvex_distributed_opf/loadpred.m | 704 | utf_8 | c060c7e99d378df248b71dc3e768e357 | function [p_pert,q_pert] = loadpred(net,pertmax)
% :: generate online demand profiles by perturbing the receding horizon
% demand prediction
DOPLOT = 0;
if net.Ncalc >= 1
for ii = 1:net.Ncalc
p_pert{ii} = pertfun(net.p_demand,ii,pertmax);
q_pert{ii} = pertfun(net.q_demand,ii,pertmax);
en... |
github | YuejiangLIU/Optimal_Power_Flow-master | main_penalty_method.m | .m | Optimal_Power_Flow-master/Penalty_Methods/main_penalty_method.m | 730 | utf_8 | 360bcf08d681fba59f67e8ebac01aba5 | % penalty method
function main()
clear all; clc;
mu = 0.1;
beta = 10;
epsilon = 1e-3;
x0 = [0;0];
% -----------------------------------
% obj: f(x) = x(1)^2 + 2*x(2)^2;
% const: g(x) = 1 - x1 - x2 == 0;
% penaly function: p(x) = (1-x1-x2)^2;
% h(x) = f(x) + mu * p(x)
% ------------------------------------
x = x0;... |
github | YuejiangLIU/Optimal_Power_Flow-master | loadpred.m | .m | Optimal_Power_Flow-master/Distributed_SOCP_AM/loadpred.m | 1,815 | utf_8 | bda5834de16fb0bb12053b6f5a2795cb | function loadpred = pred(load,npred,plotind,pertmin,pertmax)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Real-time Distributed Optimal Power Flow
% LA @ EPFL, Jul. 26, 2015
% Contact: yuejiang.liu@epfl.ch / liuyuejiang1989@gmail.com
% Prerequisite: YALMIP, Gurobi, (CVX)... |
github | YuejiangLIU/Optimal_Power_Flow-master | distributed_GS_controller.m | .m | Optimal_Power_Flow-master/Distributed_SOCP_AM/distributed_GS_controller.m | 18,993 | utf_8 | bde8260b0dd35e73657467d41df97309 | % opf case 7 centralized <- opf case 7 ori
function sol = storage_case7_truncated_dualupdate_controller(demandnew,demandold,B0,t0,bnow,mpc,rho,Niter,objTarget,Nmilestone)
yalmip('clear');
[Nbus,T] = size(demandnew);
% Rated Load
p_load_rated = - demandnew*mpc.pf;
q_load_rated = - demandnew*sqrt(1-mpc.pf^2);
% ... |
github | YuejiangLIU/Optimal_Power_Flow-master | distributed_homotopy_controller.m | .m | Optimal_Power_Flow-master/Distributed_SOCP_AM/distributed_homotopy_controller.m | 19,131 | utf_8 | 2622ab32cc0d45ea5bf3c09bb6cdec31 | % opf case 7 centralized <- opf case 7 ori
function sol = storage_case7_truncated_homotopy_controller(demandnew,demandold,B0,t0,bnow,mpc,rho,Niter,objTarget,Nmilestone)
yalmip('clear');
[Nbus,T] = size(demandnew);
% warm starting from last sampling time
x = mpc.x;
z = mpc.z;
lamda = mpc.lamda;
%waitname = strcat('P... |
github | YuejiangLIU/Optimal_Power_Flow-master | distributed_BCD_controller.m | .m | Optimal_Power_Flow-master/Distributed_SOCP_AM/distributed_BCD_controller.m | 19,122 | utf_8 | 6c9f2ac3063ae2b9a4d973451b79f217 | % opf case 7 centralized <- opf case 7 ori
function sol = distributed_BCD_controller(load,B0,t0,bnow,mpc,rho,Niter,objTarget)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Real-time Distributed Optimal Power Flow
% LA @ EPFL, Jul. 26, 2015
% Contact: yuejiang.liu@epfl.ch / liuy... |
github | perimosocordiae/ManifoldAlignment-master | CCATwo.m | .m | ManifoldAlignment-master/Alignment/CCATwo.m | 1,974 | utf_8 | 02ba048548c8011501199b735fd25df1 | %CCA: two domains
function [cca1, cca2]= CCATwo(X1, X2, W1, W2, W12, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%W1: M1*M1 matrix. weight matrix for each domain.
%W2: M2*M2 matrix
%W12: M1*M2 sparse matrix modeling the correspondence of X1 and X2.
%epsilon: precisio... |
github | perimosocordiae/ManifoldAlignment-master | CCAThree.m | .m | ManifoldAlignment-master/Alignment/CCAThree.m | 3,311 | utf_8 | 9181b08b264dcc17ad503bba38b2615f | %CCA: three domains
function [cca1, cca2, cca3]= CCAThree(X1, X2, X3, W1, W2, W3, W12, W13, W23, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%X3: P3*M3 matrix
%W1: M1*M1 matrix. weight matrix for each domain.
%W2: M2*M2 matrix
%W3: M3*M3 matrix
%W12: M1*M2 sparse ma... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralThreeInstance.m | .m | ManifoldAlignment-master/Alignment/wmapGeneralThreeInstance.m | 2,208 | utf_8 | 27aaade689ea4e763db8ca3e7077185b | %Instance-Level Manifold Projections. Three domains.
function [g1, g2, g3]= wmapGeneralThreeInstance(X1, X2, X3, W1, W2, W3, W12, W13, W23, epsilon, mu)
%X1: NOT USED. P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: NOT USED. P2*M2 matrix
%X3: NOT USED. P3*M3 matrix
%N1: M1*M1 matrix. weight matrix for ... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralTwo.m | .m | ManifoldAlignment-master/Alignment/wmapGeneralTwo.m | 2,243 | utf_8 | 414767934045ae346d6f61a233afce7b | %Feature-level Manifold Projections. Two domains.
function [map1, map2]= wmapGeneralTwo(X1, X2, W1, W2, W12, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%W1: M1*M1 matrix. weight matrix for each domain.
%W2: M2*M2 matrix
%W12: M1*M2 sparse matrix modeling the correspo... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralTwoInstance.m | .m | ManifoldAlignment-master/Alignment/wmapGeneralTwoInstance.m | 1,876 | utf_8 | c182cf963941ff975b5dc6688e3438b5 | %Instance-Level Manifold Projections. Two domains
function [g1, g2]= wmapGeneralTwoInstance(X1, X2, W1, W2, W12, epsilon, mu)
%X1: NOT USED. %P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: NOT USED. %P2*M2 matrix
%N1: M1*M1 matrix. weight matrix for each domain.
%N2: M2*M2 matrix
%W12: M1*M2 sparse ma... |
github | perimosocordiae/ManifoldAlignment-master | computeOptimalMatch.m | .m | ManifoldAlignment-master/Alignment/computeOptimalMatch.m | 1,389 | utf_8 | 575b0b69bd324378ff6393ddd0c13396 | %Consider the best match of two distance matrices
function dist=computeOptimalMatch(matrix1, matrix2)
k=size(matrix1,1);
P=getAllCombinations(k-1);
dist=10000000000;
for i=1:size(P,1)
tpmatrix2=switchRowandCollumn(matrix2,P(i,:));
tpdist=compareDistanceMatrices(matrix1, tpmatrix2);
if ... |
github | perimosocordiae/ManifoldAlignment-master | CCATwo.m | .m | ManifoldAlignment-master/Alignment/knn/CCATwo.m | 1,989 | utf_8 | 5443d60b8263d614626aec1819911875 | %CCA: two domains
function [cca1, cca2]= CCATwo(X1, X2, N1, N2, W12, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%N1: M1*k matrix. k nearest neighbours for each example.
%N2: M2*k matrix
%W12: M1*M2 sparse matrix modeling the correspondence of X1 and X2.
%epsilon: pr... |
github | perimosocordiae/ManifoldAlignment-master | CCAThree.m | .m | ManifoldAlignment-master/Alignment/knn/CCAThree.m | 2,340 | utf_8 | d0ced949a0dea4034fe62ef0dee06db8 | %CCA: three domains
function [cca1, cca2, cca3]= CCAThree(X1, X2, X3, N1, N2, N3, W12, W13, W23, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%X3: P3*M3 matrix
%N1: M1*k matrix. k nearest neighbours for each example.
%N2: M2*k matrix
%N3: M3*k matrix
%W12: M1*M2 spar... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralThreeInstance.m | .m | ManifoldAlignment-master/Alignment/knn/wmapGeneralThreeInstance.m | 2,538 | utf_8 | e35f1c73e4dc5a1210b6f492909dbbaf | %Instance-Level Manifold Projections. Three domains.
function [g1, g2, g3]= wmapGeneralThreeInstance(X1, X2, X3, N1, N2, N3, W12, W13, W23, epsilon, mu)
%X1: NOT USED. P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: NOT USED. P2*M2 matrix
%X3: NOT USED. P3*M3 matrix
%N1: M1*k matrix. k nearest neighbour... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralTwo.m | .m | ManifoldAlignment-master/Alignment/knn/wmapGeneralTwo.m | 2,480 | utf_8 | 07fdb3200e95773ae3a5b4d54f7a3091 | %Feature-level Manifold Projections. Two domains.
function [map1, map2]= wmapGeneralTwo(X1, X2, N1, N2, W12, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%N1: M1*k matrix. k nearest neighbours for each example.
%N2: M2*k matrix
%W12: M1*M2 sparse matrix modeling the co... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralTwoInstance.m | .m | ManifoldAlignment-master/Alignment/knn/wmapGeneralTwoInstance.m | 2,108 | utf_8 | a84e1f52177cbb24659ebb61c640293d | %Instance-Level Manifold Projections. Two domains
function [g1, g2]= wmapGeneralTwoInstance(X1, X2, N1, N2, W12, epsilon, mu)
%X1: NOT USED. %P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: NOT USED. %P2*M2 matrix
%N1: M1*k matrix. k nearest neighbours for each example.
%N2: M2*k matrix
%W12: M1*M2 spa... |
github | perimosocordiae/ManifoldAlignment-master | wmapGeneralThree.m | .m | ManifoldAlignment-master/Alignment/knn/wmapGeneralThree.m | 2,984 | utf_8 | 34af1501ed15cae05d21e8549ffc56ea | %Feature-Level Manifold Projections. Three domains.
function [map1, map2, map3]= wmapGeneralThree(X1, X2, X3, N1, N2, N3, W12, W13, W23, epsilon, mu)
%X1: P1*M1 matrix, M1 examples in a P1 dimensional space.
%X2: P2*M2 matrix
%X3: P3*M3 matrix
%N1: M1*k matrix. k nearest neighbours for each example.
%N2: M2*k ma... |
github | perimosocordiae/ManifoldAlignment-master | LaplacianEigenmaps.m | .m | ManifoldAlignment-master/Utility/LaplacianEigenmaps.m | 1,347 | utf_8 | f7d4dfe5a8b6a3c47a85a346dcf70479 | %Laplacian eigenmaps.
function [g1]= LaplacianEigenmaps(N1, epsilon)
%N1: n1*k matrix. k nearest neighbours for each example.
%~~~Default Parameters~~~
m=2000; %max dimensionality of the new space.
%construct weight matrix for each domain
n1=size(N1,1);
K=size(N1,2);
... |
github | perimosocordiae/ManifoldAlignment-master | knnsearch.m | .m | ManifoldAlignment-master/Utility/knnsearch.m | 4,137 | utf_8 | 40fbf8d0695309e13ce021d477c579c3 | function [idx,D]=knnsearch(varargin)
% KNNSEARCH Linear k-nearest neighbor (KNN) search
% IDX = knnsearch(Q,R,K) searches the reference data set R (n x d array
% representing n points in a d-dimensional space) to find the k-nearest
% neighbors of each query point represented by eahc row of Q (m x d array).
% The... |
github | perimosocordiae/ManifoldAlignment-master | cmpEmbedding.m | .m | ManifoldAlignment-master/Utility/cmpEmbedding.m | 737 | utf_8 | 6b13fe854862e83cb59c0185a3712976 | %Compare embedding results
function result=cmpEmbedding(X, Y, f, g)
%X: p*m matrix
%Y: q*m matrix
%X(:,i)<->Y(:,i)
%f: p*d matrix. Mapping function.
%g: q*d matrix. Mapping function.
Xn=f'*X;
Yn=g'*Y;
total=0;
n=min (size(X,2), size(Y,2));
result=zeros(n,1);
x=zeros(n,1);
y=zeros(n,1);
for i=1:n;
... |
github | perimosocordiae/ManifoldAlignment-master | LPP.m | .m | ManifoldAlignment-master/Utility/LPP.m | 2,673 | utf_8 | b8bb5dc24be78ebe3260d06b34c65950 | %LPP
function [map1]= LPP(X1, N1, epsilon)
%X1: P1*n1 matrix, M1 examples in a P1 dimensional space.
%N1: n1*k matrix. k nearest neighbours for each example.
%~~~Default Parameters~~~
% m=200; %max dimensionality of the new space.
global DimLatentSpace;
global SVDResolution;
K=size(N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.