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 | jlian/matlab-particle-tracker-master | user_string.m | .m | matlab-particle-tracker-master/lib/export_fig/user_string.m | 2,462 | utf_8 | dd1a7fa5b4f2be6320fc2538737a2f3e | %USER_STRING Get/set a user specific string
%
% Examples:
% string = user_string(string_name)
% saved = user_string(string_name, new_string)
%
% Function to get and set a string in a system or user specific file. This
% enables, for example, system specific paths to binaries to be saved.
%
% IN:
% string_name - ... |
github | jlian/matlab-particle-tracker-master | export_fig.m | .m | matlab-particle-tracker-master/lib/export_fig/export_fig.m | 30,967 | utf_8 | c81b5d5134f3055b5118fe29010730bf | %EXPORT_FIG Exports figures suitable for publication
%
% Examples:
% im = export_fig
% [im alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -transparent
% export_fig ... -native
% export_fig ... -m<val>
% export_fig... |
github | jlian/matlab-particle-tracker-master | ghostscript.m | .m | matlab-particle-tracker-master/lib/export_fig/ghostscript.m | 5,169 | utf_8 | 6c4ddcf9e83cbc0d50d5ecd1921a1350 | %GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path
% is stored for future reference.
% ... |
github | gkaran/hsfa-master | HSFA.m | .m | hsfa-master/HSFA.m | 2,018 | utf_8 | b73d7f3c37ec5cd5709178b127e5a37c | function [best] = HSFA(n, keep, maxGeneration)
[~, ~, HMCR, PAR, bw, alpha, gamma, beta0, delta] = get_variables();
Minimize = should_minimize();
[MinBounds, MaxBounds, f, D] = get_objective_function();
[ffLoc, I] = initialize_fa_population(f, MinBounds, MaxBounds, n);
[x, y, z] = plot_3d_funct... |
github | gkaran/hsfa-master | HS.m | .m | hsfa-master/HS.m | 1,657 | utf_8 | 414c4f3ad5b95624a5c6535c0ff8b281 | function [best] = HS
[HMS, MAXIT, HMCR, PAR, bw, ~, ~, ~, ~] = get_variables();
Minimize = should_minimize();
[MinBounds, MaxBounds, f, D] = get_objective_function();
plot_3d_function(f, MinBounds, MaxBounds);
[HM, HF, HMN] = initialize(MinBounds, MaxBounds, HMS, D, f);
[WorstFit, WorstLoc] = ... |
github | gkaran/hsfa-master | get_objective_function.m | .m | hsfa-master/get_objective_function.m | 1,738 | utf_8 | 45f10ab855f1fc01363587ad8db82467 | function [MinBounds, MaxBounds, f, D] = get_objective_function
% D is the problem dimension - Currently only 2D problems are supported
D = 2; % Problem dimension
[MinBounds, MaxBounds, strFunction] = get_ackleys();
f = vectorize(inline(strFunction));
end
function [MinBounds, MaxBounds, strFunction] = get_... |
github | Jonamon23/VFH_for_ThorPro-master | getStageLidar.m | .m | VFH_for_ThorPro-master/ROS_Callback_Functions/getStageLidar.m | 428 | utf_8 | 0fb2e6d3df0592e16d9924afe96c46ee | % Lidar Callback
function getStageLidar(lidar_msg)
global lidar;
lidar.ranges = lidar_msg.getRanges; % Read received data and store to ranges
lidar.ranges = lidar.ranges(1:1080);
lidar.ranges(lidar.ranges>lidar.threshold) = lidar.threshold; % prevent infite values
lidar.min_angle = (180*lidar_msg.getAngleMin)/pi... |
github | golnazghiasi/hpm-detection-code-master | DemoLfw.m | .m | hpm-detection-code-master/DemoLfw.m | 4,174 | utf_8 | db072f970e153207a1eea81662e6aa9a | %%%%% Note: for more info about some of the parameters, check the comments
%%%%% of Demo.m and DemoCofw.m files.
function demo_lfw()
init;
% Loads pre-trained HPM model for localization.
load('cache/HPM_final');
% Visualizes the model
disp('Model visualization ...');
VisualizeModel(model);
options = [];
options.occ... |
github | golnazghiasi/hpm-detection-code-master | DemoCofw.m | .m | hpm-detection-code-master/DemoCofw.m | 7,130 | utf_8 | 9696d59f447e339ff96418ad5dbed355 | %%%%% Note: for more info about some of the parameters, check the comments
%%%%% of Demo.m file.
function DemoCofw()
init;
% Loads pre-trained HPM model for localization.
load('cache/HPM_final.mat');
% Visualizes the model
disp('Model visualization ...');
VisualizeModel(model);
options = [];
options.occ_bias_inc = ... |
github | golnazghiasi/hpm-detection-code-master | multipie_eval_landmark.m | .m | hpm-detection-code-master/evaluation/multipie_eval_landmark.m | 1,392 | utf_8 | 307324883fed9f13e59399c03f37d5bf | function [err] = multipie_eval_landmark(boxes,test)
% number of test images
N = length(test);
% mean error
err = nan(N,1);
for i = 1:N % loop over all test images
% ground truth
pts = test(i).pts;
% face size
w = test(i).bbox(3) - test(i).bbox(1);
h = test(i).bbox(4) - test(i).bbox(2);
s... |
github | golnazghiasi/hpm-detection-code-master | DetectGivendet.m | .m | hpm-detection-code-master/detection/DetectGivendet.m | 12,836 | utf_8 | 77e61b08484d0f14f18d3ea00acbbcdc | function boxes = DetectGivendet(input, model, box, overlap, ...
keypointsubset, rot, limited_level, min_level)
if(~exist('rot', 'var'))
rot = [];
end
if(~exist('limited_level', 'var'))
limited_level = true;
end
if(~exist('min_level', 'var'))
min_level = 1;
end
if(size(input,3)==1)
input = repmat(i... |
github | golnazghiasi/hpm-detection-code-master | LocalizationsWRotation.m | .m | hpm-detection-code-master/detection/LocalizationsWRotation.m | 1,487 | utf_8 | 127950ff637d58731afc1f6ae1e2b601 | function boxes = LocalizationsWRotation(test, model, options)
filename = BoxesFilename(options);
try
load(filename);
catch
save_boxes_add = [options.cachedir 'boxes_' filename(7 : end) '/'];
if(~exist(save_boxes_add, 'dir'))
mkdir(save_boxes_add);
end
startmatlabpool();
for i = 1: length(test)
fprintf('... |
github | golnazghiasi/hpm-detection-code-master | TestLocalization.m | .m | hpm-detection-code-master/detection/TestLocalization.m | 3,106 | utf_8 | 0683fee12f65afc9a66d379b95daab6f | function bs = TestLocalization( ...
model, im, bbox, keypoint_subset, min_overlap, ...
limited_level, min_level, rotation_step, ...
min_rotation_range, max_rotation_range, pad_ratio, ...
rot_center)
tic
[im_crop, bbcrop, offset] = croppos(im, bbo... |
github | golnazghiasi/hpm-detection-code-master | FlipBoxesOfFlippedComp.m | .m | hpm-detection-code-master/detection/FlipBoxesOfFlippedComp.m | 2,809 | utf_8 | a6b58c815eb09890217114855f021e96 | function boxes = FlipBoxesOfFlippedComp(boxes, flip_component, size_im, opts)
% Flips the detection results of the components that their parameters
% are shared with the component with their flip viewpoint.
flipmaps = cell(1,0);
for i = 1 : length(opts.mixture)
flipmap = [];
if length(opts.mixture(i).pa) == 78
num_... |
github | golnazghiasi/hpm-detection-code-master | DetectDetect.m | .m | hpm-detection-code-master/detection/DetectDetect.m | 11,434 | utf_8 | e6163df7b2bf9f9e5f75de72a6891c77 | function boxes = DetectDetect(input, model, min_level)
if(~exist('min_level', 'var'))
min_level = 1;
end
if(size(input,3) == 1)
input = repmat(input, [1 1 3]);
end
BOXCACHESIZE = 100000;
cnt = 0;
boxes.s = 0;
boxes.c = 0;
boxes.xy = 0;
boxes.level = 0;
boxes.m = 0;
boxes(BOXCACHESIZE) = boxes;
% Computes t... |
github | golnazghiasi/hpm-detection-code-master | LocalizationsWORotation.m | .m | hpm-detection-code-master/detection/LocalizationsWORotation.m | 1,423 | utf_8 | 26e56a049b693fc29c68e40111fec163 | function boxes = LocalizationsWORotation(test, model, options)
% This method uses the ground-truth locations (validation data) of the
% eyes to find the rotation of the face and rotates the image so that the
% face be vertical. Then, it performs the landmark localization.
filename = BoxesFilename(options);
try
loa... |
github | golnazghiasi/hpm-detection-code-master | VisualizeLocalizationRes.m | .m | hpm-detection-code-master/visualization/VisualizeLocalizationRes.m | 2,877 | utf_8 | 626ff8cd76370bb1575f9009ae823ea8 | function [] = VisualizeLocalizationRes( ...
boxes, pts_name, occ_name, test, testname, figdir, ...
crop_images, show_groundtruth, show_keypoint_num, errors, ...
max_to_show)
if(~exist('max_to_show', 'var') || max_to_show > length(test))
max_to_show = length(test);
end
fprintf(['Visualizing landmark locali... |
github | golnazghiasi/hpm-detection-code-master | VisualizeModel.m | .m | hpm-detection-code-master/visualization/VisualizeModel.m | 6,033 | utf_8 | dddc876205f2507904217b9a54a07da9 | function VisualizeModel(model, num_instances)
if nargin < 2
num_instances = 1;
end
for compid = 1 : length(model.components)
if(model.flip_image(compid))
% This component shares its parameters with the component for opposite viewpoint.
continue;
end
c = model.components{compid};
numparts = length(c)... |
github | golnazghiasi/hpm-detection-code-master | distinguishable_colors.m | .m | hpm-detection-code-master/visualization/distinguishable_colors.m | 5,690 | utf_8 | 29cb8b46833e83a68dccb08f8b14d9fd | function colors = distinguishable_colors(n_colors,bg,func)
% DISTINGUISHABLE_COLORS: pick colors that are maximally perceptually distinct
%
% When plotting a set of lines, you may want to distinguish them by color.
% By default, Matlab chooses a small set of colors and cycles among them,
% and so if you have more than ... |
github | golnazghiasi/hpm-detection-code-master | ApplyRegression.m | .m | hpm-detection-code-master/utility/ApplyRegression.m | 1,265 | utf_8 | bb5c22cf4a68436efd51e03b9f626e71 | function det = ApplyRegression(box, reg_coef, I)
% Applys linear regression to map 68 keypoint to size(reg_coef, 2) keypoints.
det = [];
if(~isempty(box))
if exist('I', 'var')
figure(10);
clf; imagesc(I); axis 'equal'; hold on;
plot(box.det68(:,1), box.det68(:,2), '.r');
end
% We learn the linear regression ... |
github | golnazghiasi/hpm-detection-code-master | LearnRegression.m | .m | hpm-detection-code-master/utility/LearnRegression.m | 4,557 | utf_8 | e597e8fbbb6b248fb0026fa2dc9760df | function reg_coef = LearnRegression(test, boxes, errors, model, ...
mapping_2_hpm_parts)
% errors: some estimation of the errors (e.g. errors for a simple mapping).
% mapping_2_hpm_parts: a matrix that shows the corresponding hpm part number
% (e.g. nose, eye, upper lip) for each key... |
github | golnazghiasi/hpm-detection-code-master | RotateAround.m | .m | hpm-detection-code-master/utility/RotateAround.m | 2,371 | utf_8 | 9cdeda531c9a216efe2aca026e4d410f | function output = RotateAround(image, pointY, pointX, angle)
output = image;
if abs(angle)<eps
return;
end
method = 'bicubic';
output(:,:,1) = rotateAround1(image(:,:,1), pointY, pointX, angle, method);
if(size(output,3)>1)
output(:,:,2) = rotateAround1(image(:,:,2), pointY, pointX, angle, ...
... |
github | golnazghiasi/hpm-detection-code-master | Evaluate.m | .m | hpm-detection-code-master/UCI_OFD/Evaluate.m | 3,520 | utf_8 | 4ccca4eb431476632f87f1361af04fd2 | % This method computes Precision-Recall curves of face detection on (a) all the faces,
% (b) ovisible subset, (c) ccluded subset and (d) significant occluded subset.
% This method computes Precsion-Recall curves for all faces, visible
% faces, occluded faces and significant occluded faces subsets of the dataset.
% ... |
github | kkarrancsu/fecapi-master | CmlDegreeDist.m | .m | fecapi-master/cml_matlab/module/chan_code/ldpc/decoder/supp/CmlDegreeDist.m | 4,094 | utf_8 | ed68bfe1cb899784c1b44f71991746ae | % DegreeDist.m
% Computes valid LDPC degree distributions under the following
% assumptions:
%
% Distinct variable node degrees D = 3
% d_v1 = 2
%
% Inputs
% d_v2_r range of requested d_v2 values
% d_v3_r range of requested d_v3 values
% d_c check node degree
% N LDPC codewor... |
github | kkarrancsu/fecapi-master | CmlAlistToHrowsHcols.m | .m | fecapi-master/cml_matlab/module/chan_code/ldpc/decoder/supp/CmlAlistToHrowsHcols.m | 2,203 | utf_8 | 9f0285e27d52cd63869193ae8893f7da | % CmlAlistToHrowsHcols converts alist files to H_rows, H_cols format
%
% The calling syntax is:
% [ H_rows H_cols ] = CmlAlistToHrowsHcols( tmp_path, pcm_prefix )
%
% Inputs
% alist_path path containing alist file
% pcm_prefix prefix of parity check data file
%
% Output:
% H_... |
github | kkarrancsu/fecapi-master | PostProcessH.m | .m | fecapi-master/cml_matlab/module/chan_code/ldpc/decoder/src/PostProcessH.m | 2,105 | utf_8 | 032d23e938b52ce59861d461366a4323 | % PostProcessH.m
% Convert parity check matrix in H_rows, H_cols form to format suitable
% for CML LDPC decoder.
%
% Inputs
% sim_param CML structure containing general simulation parameters
% code_param CML structure containing channel_coding parameters
%
% row_one Parity check matr... |
github | kkarrancsu/fecapi-master | CreateLdpcDecoder.m | .m | fecapi-master/cml_matlab/module/chan_code/ldpc/decoder/src/CreateLdpcDecoder.m | 2,899 | utf_8 | a460c54289d562e862b9115e199881fa | % CreateLdpcDecoder.m
% Create an LDPC decoder object given CML sim_param and code_param.
%
% Inputs
% sim_param CML structure containing general simulation parameters
% code_param CML structure containing channel_coding parameters
%
% Last updated on 3/8/2013
%
% Copyright (C) 2013, Terry Ferrett and M... |
github | kkarrancsu/fecapi-master | make.m | .m | fecapi-master/cml_matlab/module/chan_code/ldpc/decoder/src/mexsrc/make.m | 2,966 | utf_8 | a36c246ccb1ad5c7b0388869bc199e59 | % make.m
% makefile for LDPC module
%
%
% Usage:
% - Place makefile in directory containing module c-mex source files
% - Specify target directory. Default is '../mex/<arch>'
% - Specify any desired compiler flags in the variable 'flags'
% - Within MATLAB, switch to this directory and execute 'make'
%... |
github | kkarrancsu/fecapi-master | GetHmatType.m | .m | fecapi-master/cml_matlab/mat/GetHmatType.m | 1,751 | utf_8 | 6cb6aca24c3dc949dc304a8c7ce8507d | % GetHmatType.m
% Determine the parity check matrix file format.
%
% Inputs
% pcm filename of parity check matrix stored in
% <cml_root>/data/ldpc
%
% Last updated on 2/13/2013
%
% Copyright (C) 2012, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bo... |
github | kkarrancsu/fecapi-master | CmlCreateHmatLocal.m | .m | fecapi-master/cml_matlab/mat/CmlCreateHmatLocal.m | 11,746 | utf_8 | 1c5468db5df3c5275f43feb32b1de832 | % CmlCreateHmatLocal creates a parity check matrix for use with
% LDPC decoding.
%
% The calling syntax is:
% [ sim_param code_param ] = CmlCreateHmatLocal( sim_param, code_param, cml_home )
%
% Input
% sim_param
% code_param
% cml_home
%
% Output
% sim_param
% code_param
%
% ... |
github | kkarrancsu/fecapi-master | SimulateMod.m | .m | fecapi-master/cml_matlab/mat/SimulateMod.m | 14,526 | utf_8 | 49be8d6fe0d109c174feec627e73008f | function sim_state = SimulateMod( sim_param, sim_state, code_param )
% SimulateMod runs a single coded/uncoded modulation simulation scenario
%
% The calling syntax is:
% sim_state = SimulateMod( sim_param, sim_state )
%
% sim_param = A structure containing simulation parameters.
% sim_state = A stru... |
github | kkarrancsu/fecapi-master | SimulateCapacity.m | .m | fecapi-master/cml_matlab/mat/SimulateCapacity.m | 9,842 | utf_8 | 7a48679f8e98f60caefe99726e57ba34 | function sim_state = SimulateCapacity( sim_param, sim_state, code_param )
% SimulateCapacity runs a single of capacity simulation.
%
% The calling syntax is:
% sim_state = SimulateCapacity( sim_param, sim_state, code_param )
%
% sim_param = A structure containing simulation parameters.
% sim_state = ... |
github | kkarrancsu/fecapi-master | CmlInit.m | .m | fecapi-master/cml_matlab/mat/CmlInit.m | 4,580 | utf_8 | 4b1c715f063ac2d5ded332b6feca4eb9 | % CmlInit.m
% Initialize the MATLAB environment to execute CML
%
% Inputs
% cml_home path to CML source root
% SimLocation execution location of code - 'local' or 'clusterworker'
%
% Local and cluster operation are differentiated by the manner in
% in which CmlHome.mat is saved in the function ... |
github | kkarrancsu/fecapi-master | SingleRead.m | .m | fecapi-master/cml_matlab/mat/SingleRead.m | 23,180 | utf_8 | 68bc82cbf6bc7481b58959cf466d805f | function [sim_param_out, sim_state] = SingleRead( sim_param_in )
% CodedRead reads a single coded simulation from a file.
%
% The calling syntax is:
% [sim_param, sim_state] = SingleRead( sim_param )
%
% Required inputs/outputs:
% sim_param = A structure containing simulation parameters.
%
% Re... |
github | kkarrancsu/fecapi-master | CmlWorker.m | .m | fecapi-master/cml_matlab/mat/CmlWorker.m | 5,323 | utf_8 | 3df2a97b2a79d39eff32e79d03fbfa91 | % CmlWorker is the task entry function for cluster-parallelized CML.
%
% The calling syntax is:
% TaskState = CmlWorker( InputParam )
%
% Output:
% TaskState = A structure containing the simulation state.
% Note: See readme.txt for a description of the structure formats.
%
% Required inputs... |
github | kkarrancsu/fecapi-master | CmlDecode.m | .m | fecapi-master/cml_matlab/mat/CmlDecode.m | 11,305 | utf_8 | 6c597b03547eee6e9e540c0d1f1e048a | function [detected_data, errors, ldpc_decoder] = CmlDecode( symbol_likelihood, data,...
sim_param, code_param, ldpc_decoder)
% CmlDecode demaps and decodes a single received codeword
%
% The calling syntax is:
% [detected_data, errors] = CmlDecode( symbol_likelihood, data, max_iterations, sim_param, code... |
github | kkarrancsu/fecapi-master | ReadScenario.m | .m | fecapi-master/cml_matlab/mat/ReadScenario.m | 4,466 | utf_8 | 079dd77a6a4df41ab88c54567e13bc13 | function [sim_param_output, sim_state_output] = ReadScenario( varargin )
% ReadScenario reads simulation parameters from a list of scenario files and the simulation
% results from the corresponding stored data files
%
% The calling syntax is:
% [sim_param, sim_state] = ReadScenario( scenario_filename, cases [,... |
github | kkarrancsu/fecapi-master | InitializeWiMaxLDPC.m | .m | fecapi-master/cml_matlab/mat/InitializeWiMaxLDPC.m | 7,446 | utf_8 | 6df9b34e9df57bfdcb2570737eea62b1 | % File: InitializeWiMaxLDPC.m
%
% Description: Initializes the WiMax LDPC encoder/decoder
%
% The calling syntax is:
% [H_rows, H_cols, P] = InitializeWiMaxLDPC( rate, size, ind )
%
% Where:
% H_rows = a M-row matrix containing the indices of the non-zero rows of H excluding the dual-d... |
github | kkarrancsu/fecapi-master | PlotExitCurves.m | .m | fecapi-master/cml_matlab/mat/plot/PlotExitCurves.m | 2,629 | utf_8 | bbfbb7ed1653e6bb857501c1d98060d3 | function [FigHandle, FigNumber] = PlotExitCurves(sim_param, sim_state, FigHandle, FigNumber, SnrPoint)
% Plot exit curves.
for i=1:length(sim_param)
% get snr points.
[ return_data_or_plot, CurrentSnrPoint ] = process_exit_input(sim_param(i), SnrPoint);
% if strcmp( return_data_or_plot, 'plot')... |
github | kkarrancsu/fecapi-master | CmlWebRetrieve.m | .m | fecapi-master/cml_matlab/mat/parallel/web/CmlWebRetrieve.m | 1,356 | utf_8 | bd0c6b86381090bf427297cbe083320f | % CmlWebRetrieve.m
% Translate completed WebCML job files in jobs/JobOut to CML output files.
%
% Inputs
% none
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
function CmlWebRetrieve( )
[cml_home] =... |
github | kkarrancsu/fecapi-master | CmlWebSubmit.m | .m | fecapi-master/cml_matlab/mat/parallel/web/CmlWebSubmit.m | 1,340 | utf_8 | ba2411174df5a62f9e9543f2b2cbc768 | % CmlWebSubmit.m
% Creates job file for WebCML web-interface submission
%
% Inputs
% scenario CML scenario name
% records record list
%
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file... |
github | kkarrancsu/fecapi-master | GetDirectoryListing.m | .m | fecapi-master/cml_matlab/mat/parallel/common/GetDirectoryListing.m | 1,228 | utf_8 | eab3619d6ceb0bbe302a91655d424e01 | % GetDirectoryListing.m
% Get list of .mat files in a specified directory
%
% Inputs
% directory directory containing .mat files
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
% get listing of ... |
github | kkarrancsu/fecapi-master | SetSimLocationLocal.m | .m | fecapi-master/cml_matlab/mat/parallel/common/SetSimLocationLocal.m | 1,214 | utf_8 | 8bba7a0a53722c54199585be2de66f47 | % SetSimLocationLocal.m
% Set simulation location to local in save_param
%
% Inputs
% save_param Simulation parameters
%
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
% Set simulation locatio... |
github | kkarrancsu/fecapi-master | CmlJobSubMRunLocation.m | .m | fecapi-master/cml_matlab/mat/parallel/common/CmlJobSubMRunLocation.m | 1,476 | utf_8 | 2ceddb602262baaab2ff269d9a018dcf | % CmlJobSubmRunLocation.m
% Determine run location for the purposes of job submission.
%
% Outputs
% RunLoc - 'clusterlocal' or 'local'
% 'clusterlocal' - user running cml in their own
% linux account
% 'local' user running cml on local machine
%
... |
github | kkarrancsu/fecapi-master | ReadScenarioNameAndRecord.m | .m | fecapi-master/cml_matlab/mat/parallel/common/ReadScenarioNameAndRecord.m | 1,755 | utf_8 | c99c769d487b42ee433ec43d0bda2a95 | % ReadScenarioNameAndRecord.m
% Read scenario name and record from underscore delimited string
%
% Inputs
% name_record underscore delimited string containing scenarion and
% record
%
% Example
% name_record = 'FskScenarios_1'
% -scenario_name becomes 'FskScenarios'
% -record bec... |
github | kkarrancsu/fecapi-master | MoveJobOutToCmlOut.m | .m | fecapi-master/cml_matlab/mat/parallel/common/MoveJobOutToCmlOut.m | 1,662 | utf_8 | a65fc7214a2fc9906061683f485d9eae | % MoveJobOutToCmlOut
% Move job from output queue to CML output directory.
%
% Inputs
% job_file full path to job file
% scenario_name cml scenario name
% record record number
%
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright... |
github | kkarrancsu/fecapi-master | CreateJob.m | .m | fecapi-master/cml_matlab/mat/parallel/common/CreateJob.m | 1,664 | utf_8 | e709d4b870ecf3f2a082916e0f9f6de6 | % CreateJob.m
% Creates job file for execution.
%
% Inputs
% scenario CML scenario name
% record Record within scenario
% JobParam simulation parameters
% JobState simulation state
% job_input_queue path to job input queue
%
%
% Last updated on 2/11/2013
%
% Cop... |
github | kkarrancsu/fecapi-master | CreateJobs.m | .m | fecapi-master/cml_matlab/mat/parallel/common/CreateJobs.m | 1,755 | utf_8 | 391639ced5d4dbc0d21e72bc0b62fa7e | % CreateJobs.m
% Read simulation parameters for jobs given a scenario and set of records.
%
% Inputs
% scenario CML scenario name
% records Records within scenario
% job_root Root of job directories
%
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matth... |
github | kkarrancsu/fecapi-master | ConsumeOutputQueue.m | .m | fecapi-master/cml_matlab/mat/parallel/common/ConsumeOutputQueue.m | 1,512 | utf_8 | b6bd39c5b5fa1a5dd45b1813851a00b2 | % ConsumeOutputQueue.m
% Move job files from job output queue to cml output directory.
%
% Inputs
% output_queue path to output queue
% listing directory listing of output queue
%
%
% Last updated on 2/11/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright... |
github | kkarrancsu/fecapi-master | ReadProjectRoot.m | .m | fecapi-master/cml_matlab/mat/parallel/cluster/ReadProjectRoot.m | 1,555 | utf_8 | 5ec18f19d4780a528c84648606fac431 | % ReadProjectRoot.m
%
% Read cluster CML job queue root.
%
% Inputs
%
% Last updated on 2/11/2013
%
% Copyright (C) 2012, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
function [ project_root ] = ReadProjectRoot()
% add path to file reading utility
uti... |
github | kkarrancsu/fecapi-master | GetProjCf.m | .m | fecapi-master/cml_matlab/mat/parallel/cluster/GetProjCf.m | 1,239 | utf_8 | 25e33807acbf6db0b51d21a320fcba7f | % GetProjCf.m
% Get the location of the CML project config file for this user.
%
% Inputs
% no inputs
%
% Last updated on 2/11/2013
%
% Copyright (C) 2012, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
% get path to cml project configuration file for... |
github | kkarrancsu/fecapi-master | CmlClusterSubmit.m | .m | fecapi-master/cml_matlab/mat/parallel/cluster/CmlClusterSubmit.m | 5,265 | utf_8 | 943e9ede8856e2b461f62f69b65cfd95 | % CmlClusterSubmit.m
% Submit CML scenarios for simulation using the WCRL cluster.
%
% Inputs
% scenario CML scenario name
% records record list
%
%
% Last updated on 2/11/2013
%
% Copyright (C) 2012, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom o... |
github | kkarrancsu/fecapi-master | CmlClusterStop.m | .m | fecapi-master/cml_matlab/mat/parallel/cluster/CmlClusterStop.m | 3,481 | utf_8 | b9893d7015bd9a002d777d0d8438e90d | % CmlClusterStop.m
% Stop running CML cluster jobs.
%
% If no inputs are given, all currently running jobs are stopped.
%
% Giving a scenario and set of records as input stops only the jobs
% specified.
%
% Inputs
%
% Input case 1
% scenario CML scenario name Ex: 'FskScenarios'
% records ... |
github | kkarrancsu/fecapi-master | GetCurrentUser.m | .m | fecapi-master/cml_matlab/mat/parallel/cluster/GetCurrentUser.m | 1,303 | utf_8 | c8b3032cd2f65fbc53fb8fe9dd7ed34f | % GetCurrentUser.m
% Get the username of the current Linux user.
%
% Inputs
% no inputs
%
% Last updated on 2/11/2013
%
% Copyright (C) 2012, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
% get the username of the current Linux user
function user = G... |
github | kkarrancsu/fecapi-master | CmlClusterRetrieve.m | .m | fecapi-master/cml_matlab/mat/parallel/cluster/CmlClusterRetrieve.m | 7,626 | utf_8 | 9532e0cc1b43e68799c71a069d346a7a | % CmlClusterRetrieve.m
% Retrieve CML scenarios completed by PCS.
%
% Inputs
% No arguments Retrieve all completed jobs
%
% scenario CML scenario name
% records record list
%
%
% Running on the cluster retrieves completed jobs, converts them to
% CML output files, and places the output fi... |
github | kkarrancsu/fecapi-master | CmlTwrcRelayChannel.m | .m | fecapi-master/cml_matlab/mat/twrc/CmlTwrcRelayChannel.m | 3,135 | utf_8 | eb80696b5ac378883144bcd56ec00f0f | function [ r a_1 a_2 ] = CmlTwrcRelay( s_1, s_2, code_param, EsNo )
% CmlTwrcRelay simulates transmission of symbols from both sources
% to the relay.
%
% r = channel-corrupted received signal vector
% s_1 = symbols transmitted by source 1
% s_2 = symbols transmitted by source 2%
% code_param = A... |
github | kkarrancsu/fecapi-master | SimulateTwrc.m | .m | fecapi-master/cml_matlab/mat/twrc/SimulateTwrc.m | 18,639 | utf_8 | 601a28e345a9e276a6f5b97465469da8 | function sim_state = SimulateTwrc( sim_param, sim_state, code_param )
% SimulateTWRC runs a single coded/uncoded modulation simulation scenario
% in the two-way relay channel environment
%
% The calling syntax is:
% sim_state = SimulateTWRC( sim_param, sim_state )
%
% sim_param = A structure containing ... |
github | kkarrancsu/fecapi-master | CmlTwrcRelayDecode.m | .m | fecapi-master/cml_matlab/mat/twrc/CmlTwrcRelayDecode.m | 11,764 | utf_8 | 811895db8fbd04e7e02fc88ce2a29005 | function [ detected_data, errors, ex_llr ] = CmlTwrcRelayDecode( input_decoder_c,...
nc_data, sim_param, code_param, errors, decoder_iterations,...
bicmid_iter, ldpc_decoder )
% CmlTwrcRelayDecode performs a single iteration of iterative decoding at
% the relay.
%
% The calling syntax is:
% [detected... |
github | kkarrancsu/fecapi-master | SimulateCapacityTwrc.m | .m | fecapi-master/cml_matlab/mat/twrc/SimulateCapacityTwrc.m | 10,982 | utf_8 | 34444f9cf84ac1939829fe5c5a99d6f0 | function sim_state = SimulateCapacityTwrc( sim_param, sim_state, code_param )
% SimulateCapacity runs a single of capacity simulation.
%
% The calling syntax is:
% sim_state = SimulateCapacity( sim_param, sim_state, code_param )
%
% sim_param = A structure containing simulation parameters.
% sim_stat... |
github | kkarrancsu/fecapi-master | CmlReadAccountInfo.m | .m | fecapi-master/cml_matlab/mat/acct/CmlReadAccountInfo.m | 1,792 | utf_8 | ed601a9fd8b2862e1c1da3d74bb1bd12 | % CmlReadAccountInfo.m
% Read user's PCS account info.
%
% Inputs
% None.
%
% Outputs
% user Username
% remote_cmlroot Location of CML on cluster
% remote_projroot Location of user project directory on cluster
%
% Last updated on 1/24/2013
%
% Copyright (C) 2012, Terry Ferrett and Matthew C. ... |
github | kkarrancsu/fecapi-master | CmlCfgEx.m | .m | fecapi-master/cml_matlab/mat/acct/CmlCfgEx.m | 1,358 | utf_8 | 404c9ede61bae068b67810fd8792b953 | % CmlCfgEx.m
% Check for existence of webcml configuration file.
%
% Inputs
%
%
% Outputs
% WebCML configuration file in <cml_root>/cfg/webcml
%
%
% Last updated on 1/24/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
functi... |
github | kkarrancsu/fecapi-master | CmlSetupAccount.m | .m | fecapi-master/cml_matlab/mat/acct/CmlSetupAccount.m | 2,636 | utf_8 | 76d109ecc49568eef48cfdc589336fd5 | % CmlSetupAccount.m
% Creates configuration file for WebCML
%
% Inputs
%
%
% Outputs
% WebCML configuration file in <cml_root>/cfg/webcml
%
%
% Last updated on 1/24/2013
%
% Copyright (C) 2013, Terry Ferrett and Matthew C. Valenti
% For full copyright information see the bottom of this file.
function Cm... |
github | kkarrancsu/fecapi-master | FindExitThreshold.m | .m | fecapi-master/cml_matlab/mat/exit/FindExitThreshold.m | 2,681 | utf_8 | fa1c9787066733f13972e74890935913 | % FindExitThreshold.m
% Given a CML scenario and record for EXIT analysis, FindExitThreshold finds the largest EsNo point for
% which the VND and CND curves touch.
%
% Referenced work
% [J23] M.C. Valenti and X. Xiang, “Constellation shaping for bit-interleaved LDPC coded APSK,” IEEE Transactions on Communications
... |
github | kkarrancsu/fecapi-master | SimExit.m | .m | fecapi-master/cml_matlab/mat/exit/SimExit.m | 3,654 | utf_8 | f9936697dab66fd9de71ba5f7ede3d0c | function exit_state_diff = SimExit( topology, exit_param, symbol_likelihood, codeword, sim_param )
% SimExit simulates detector mutual information metrics
%
% The calling syntax is:
% exit_state_diff = SimExit( exit_param, symbol_likelihood, codeword )
%
% Inputs
% exit_param = exit analysis parameters
% ... |
github | kkarrancsu/fecapi-master | FindBestExitFits.m | .m | fecapi-master/cml_matlab/mat/exit/FindBestExitFits.m | 2,049 | utf_8 | 0be845142febb6772bf98bc7d67ab0e6 | % FindBestFits.m
% Given an EXIT scenario file and range of records, find best curve fits
% based on SNR threshold.
%
% The calling syntax is:
% [ best_thresh best_records ] = FindExitThreshold( scenario,...
% candidate_records,...
% ... |
github | kkarrancsu/fecapi-master | FindBestBerCurves.m | .m | fecapi-master/cml_matlab/mat/exit/FindBestBerCurves.m | 4,184 | utf_8 | 6019a424e80e671e215e2d968fd79970 | % FindBestBerCurves.m
% Given a set of CML BER records, find and sort the N best performing
% curves at a specified operating point.
%
% The calling syntax is:
% [ best_records ] = FindBestBerCurves( scenario,...
% candidate_records,...
% ... |
github | kkarrancsu/fecapi-master | genTPCEncoderTestFiles.m | .m | fecapi-master/cml_matlab/oot_matlab/genTPCEncoderTestFiles.m | 3,762 | utf_8 | 01caf2c6312f7cff102de7ec8e22081a | % Generates Test Inputs and Outputs for the TPC GnuRadio block in Octave
% using the CML library
function [] = genTPCEncoderTestFiles()
clear;
clc;
% add the correct directories to the path so we can call the functions
addpath(fullfile(pwd, '..', 'mat'));
addpath(fullfile(pwd, '..', 'mex'));
% define all the genera... |
github | kkarrancsu/fecapi-master | genTPCEncoderWithNoiseTestFiles.m | .m | fecapi-master/cml_matlab/oot_matlab/genTPCEncoderWithNoiseTestFiles.m | 1,847 | utf_8 | 6f74181075bc74287928bbaaca7085e2 | % Generates Test Inputs and Outputs for the TPC GnuRadio block in Octave
% using the CML library
function [] = genTPCEncoderTestFiles()
clear;
clc;
% add the correct directories to the path so we can call the functions
addpath(fullfile(pwd, '..', 'mat'));
addpath(fullfile(pwd, '..', 'mex'));
% define all the genera... |
github | kkarrancsu/fecapi-master | genBerCurve_BTC.m | .m | fecapi-master/cml_matlab/oot_matlab/genBerCurve_BTC.m | 2,480 | utf_8 | 79f8b566d9f7e547df5f48eb5f0de424 | % Attempts to generate the BER curve for the BTC
function [bers, avgActualIters, llrVec] = genBerCurve_BTC(Eb_N0_dB, grows, gcols, k_per_row, k_per_col, B, Q, decoderType, ...
numTurboIter, EARLY_EXIT_MODE)
% decoderType
% 0 - linear LOG-MAP
% 1 - MAX-LOG-MAP approximation
% 2 - Constant LOG-MAP
% 3 - ... |
github | kkarrancsu/fecapi-master | testBTCDecode_llrCompute.m | .m | fecapi-master/cml_matlab/oot_matlab/testBTCDecode_llrCompute.m | 3,324 | utf_8 | 45d2347343439e7a7566a0d59114aabc | % Script which attempts to characterize the LLR's over different noise levels
% to see if we can exit early in the BTC decode process
function [] = testBTCDecode_llrCompute(Eb_N0_dB, grows, gcols, k_per_row, k_per_col, B, Q, decoderType, numTurboIter)
% decoderType
% 0 - linear LOG-MAP
% 1 - MAX-LOG-MAP approxim... |
github | adigolo/Major-I-master | oct2ml.m | .m | Major-I-master/oct2ml.m | 21,082 | utf_8 | e30add5341b067b00b9a31a86fc0bcb3 | function [filestr]=oct2ml(filename,varargin)
%oct2ml('filename')
% Call with the full function name, including extension.
tt1=cputime;
%Load keywords and function words.
r=char(10);
fs_good=[];
formats=cell(0,2); extwords=cell(0);
%First read the function into funstr.
[filename_funname,temp2,temp3]=fileparts(filename... |
github | xiayan/linc_target_pred-master | unifiedTreeBagger.m | .m | linc_target_pred-master/src/unifiedTreeBagger.m | 5,460 | utf_8 | 2ac55cc7e266632ed479c36789436ff3 | function [AllResult, forest] = unifiedTreeBagger
load('./drugAllFeatures.mat');
% Do 10-fold cross validation
numDrugs = numel(drugFeatures);
partition = 1 : round(numDrugs/10) : numDrugs;
partition(end) = numDrugs;
global cellLines;
cellLines = {'MCF7', 'HA1E', 'A549', 'HT29', 'VCAP', 'A37... |
github | nbbncsu/smithCode-master | input_sigma.m | .m | smithCode-master/smartSystems/matlab/smartCh5/input_sigma.m | 546 | utf_8 | ee20ed262cabe63e4c6c35c437589460 | % Jordan E. Massad
% Oct 18, 2004
% Stress Input
%
%
%INPUT_SIGMA
%sigma = input_sigma(t)
%Input
% t - time value/vector.
%Output
% sigma - stress value/vector.
function sigma = input_sigma(t)
rate = 4/3; %Stress Rate [MPa/s]
sigmax = 200; %Stress Amplitide [MPa]
cycper = 2*... |
github | nbbncsu/smithCode-master | input_J.m | .m | smithCode-master/smartSystems/matlab/smartCh5/input_J.m | 851 | utf_8 | 46a1307d8d71df783a776d2b4bc64697 | % Jordan E. Massad
% Oct 18, 2004
% External Joule Heating Input
%
%
%INPUT_J
%QJ = input_J(t)
%Input
% t - time value/vector.
%Output
% QJ - Joule heating density rate [W/m^3].
function Qj = input_J(t)
% I = 28e-1; %Constant Amperage [A]
% Xa = 8e-6*0.1778e-2; %Cross-sectional area [m^2]
% R = ... |
github | nbbncsu/smithCode-master | matparam.m | .m | smithCode-master/smartSystems/matlab/smartCh5/matparam.m | 2,017 | utf_8 | 7cdca661f22a0a4550a8f95a8926e7a8 | % Jordan E. Massad
% Oct 18, 2004
% Define Model Material Parameters
%
%
%MATPARAM
%[mparams, cparams] = matparam(cs)
%Input
% n - null input.
%Output
% mparams - material parameters (see below)
function mparams = matparam(n)
mparams = zeros(19,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | nbbncsu/smithCode-master | sawtooth.m | .m | smithCode-master/smartSystems/matlab/smartCh5/sawtooth.m | 510 | utf_8 | f840e25ad9760cde692ee688e64e19f3 | % Jordan E. Massad
% Oct 18, 2004
% Sawtooth Stress/Temperature Input
%
%
%SAWTOOTH
%sigma = sawtooth(peak,cycper,t)
%Input
% peak - cycle amplitude.
% cycper - cycle period.
% t - time value/vector.
%Output
% sigma - stress value/vector.
function sigma = sawtooth(peak,cycper,t)
rate = peak/cycper*2... |
github | nbbncsu/smithCode-master | mepsv.m | .m | smithCode-master/smartSystems/matlab/smartCh5/mepsv.m | 3,182 | utf_8 | 9d0d5f8c08556364aa9e4bbcb6c8883a | % Jordan E. Massad
% Oct 18, 2004
% Macroscopic Strain Averages
% Vectorized Routine (It's Fast!!)
% 2003 Changes 1)T<Tc behavior 2)No sig>sigM|sigA. 3)Use erfcx. 4)Fix epA.
%
%MEPSv
%[epA,epMplus,epMminus] = mepsv(sig,T,mparams,cparams)
%Input
% sig - stress vector
% T - temperature vector
% mparams - ... |
github | nbbncsu/smithCode-master | rateODE.m | .m | smithCode-master/smartSystems/matlab/smartCh5/rateODE.m | 2,189 | utf_8 | 8dd93a76653e3a8db2dfb872c24c5f1a | % Jordan E. Massad
% Oct 18, 2004
% Phase Fraction Rate Law (all temperatures)
%
%RATEODE
%dx = rateODE(t,xfrac,mparams,cparams)
%Input
% t - time point/vector.
% xfrac - phase fractions/temperature vector.
% mparams - material parameters.
% cparams - computed parameters.
%Output
% dx(1) - rate of... |
github | nbbncsu/smithCode-master | gnodes.m | .m | smithCode-master/smartSystems/matlab/smartCh5/gnodes.m | 777 | utf_8 | ef893c8ee1f49505ff08fd2e1e1391d3 | % Jordan E. Massad
% Oct 18, 2004
% Composite 4-pt Gauss-Legendre Quadrature Nodes
% Equilength Subintervals on [a,b]
%
%GNODES
%xj = gnodes(jsub,numsub,a,b)
%Input
% jsub - index of jth subinterval.
% numsub - number of subintervals.
% a - start of main interval
% b - end of main interval
%Output
% ... |
github | nbbncsu/smithCode-master | sigAfunv.m | .m | smithCode-master/smartSystems/matlab/smartCh5/sigAfunv.m | 1,561 | utf_8 | 5fc36dff5d81913990b78911ac1bc10f | % Jordan E. Massad
% Oct 18, 2004
% Compute Transformation Stresses (Vectorized)
%
%
%SIGAFUNv
%sigA = sigAfunv(T,mparams,cparams)
%Input
% T - temperature point/vector
% mparams - material parameters:
% cparams - computed parameters.
%Output
% sigA - A-M transition stress
function sigA = sigAfunv(... |
github | nbbncsu/smithCode-master | plotFun.m | .m | smithCode-master/smartSystems/matlab/smartCh5/plotFun.m | 1,289 | utf_8 | 05cdb2d18918555fc1c31796caae4bc2 | % Jordan E. Massad
% Oct 18, 2004
% Plotting Function
%
%
%PLOTFUN
%[] = plotFun(t,ep,T,xm,xp)
%Input
% t - input time vector
% sig - input stress vector
% Te - input external temperature vector
% ep - strain output vector
% T - internal temperature vector
% xm - M- phase fraction vector
% xp - M+ ph... |
github | nbbncsu/smithCode-master | pFuns.m | .m | smithCode-master/smartSystems/matlab/smartCh5/pFuns.m | 1,646 | utf_8 | e30a3dfa6ac37afc6f3562e4fb518598 | % Jordan E. Massad
% Oct 18, 2004
% Compute Transformation Likelihoods (all temperatures)
%
%
%PFUNS
%[Pm,Pp,pAm,pAp] = pFuns(sig,T,mparams,cparams)
%Input
% sig - input stress point.
% T - temperature point.
% mparams - material parameters.
% cparams - computed parameters.
%Output
% Pm,Pp,pAm,pAp ... |
github | nbbncsu/smithCode-master | input_Te.m | .m | smithCode-master/smartSystems/matlab/smartCh5/input_Te.m | 876 | utf_8 | cefad95ef1375ad279809ab6d16b51d5 | % Jordan E. Massad
% Oct 18, 2004
% External Temperature Input
%
%
%INPUT_TE
%Te = input_Te(t)
%Input
% t - time value/vector.
% Tini - initial environment temperature [K].
%Output
% Te - external temperature value/vector [K].
function Te = input_Te(t)
Tini = 403; %Initial Temperature [K] ... |
github | nbbncsu/smithCode-master | polyFun.m | .m | smithCode-master/smartSystems/matlab/smartCh5/polyFun.m | 1,592 | utf_8 | 4f0392e530599277d8dd22f585668316 | % Jordan E. Massad
% Oct 18, 2004
% Compute Single-crystal Quantities for Polycrystal Integrations
%
%
%POLYFUN
%[ep,T,xm,xp] = polyFun(tspan,Tini,mparams,cparams)
%Input
% tspan - input time vector
% Tini - initial temperature point
% mparams - material parameters:
% cparams - computed parameters.
%... |
github | nbbncsu/smithCode-master | polycryst.m | .m | smithCode-master/smartSystems/matlab/smartCh5/polycryst.m | 5,353 | utf_8 | 94d96d982d30fbfb989a73c97858b9a3 | % Jordan E. Massad
% Oct 18, 2003
% Polycrystal/Homogenization SMA Model
%
%
%POLYCRYST
%[sig,ep,T,xm,xp,tspan] = polycryst(tspan,Tini,mparams,cparams)
%Input
% tspan - input time vector
% Tini - initial temperature point
% mparams - material parameters (see matparam.m).
% cparams - computed parameters (... |
github | nbbncsu/smithCode-master | Tsig.m | .m | smithCode-master/smartSystems/matlab/smartCh5/Tsig.m | 1,925 | utf_8 | 0959afd193f2855e3f1557af40a169a5 | % Jordan E. Massad
% Oct 18, 2004
% Compute Stress-dependent Transformation Temperatures
%
%
%TSIG
%[Tminsig, T_Msig, T_Asig, ] = Tsig(sig,mparams,cparams)
%Input
% mparams - material parameters
% cparams - computed parameters
%Output
% T_Msig - A-M transformation temperature
% T_Asig - M-A transforma... |
github | nbbncsu/smithCode-master | comparam.m | .m | smithCode-master/smartSystems/matlab/smartCh5/comparam.m | 5,047 | utf_8 | cd70c0c883c929ec007f061e2998e5f1 | % Jordan E. Massad
% Oct 18, 2004
% Computed Model Parameters
%
%
%COMPARAM
%[cparams] = comparam(mparams)
%Input
% mparams - material parameters (see matparam.m).
%Output
% cparams - computed parameters (see below).
function [cparams] = comparam(mparams)
cparams = zeros(12,1);
eT=mparams(3); d... |
github | nbbncsu/smithCode-master | gweights.m | .m | smithCode-master/smartSystems/matlab/smartCh5/gweights.m | 325 | utf_8 | 6fc312f2640e932f5ac0b6d079c45283 | % Jordan E. Massad
% Oct 18, 2004
% 4-pt Gauss-Legendre Quadrature Weights
%
%GWEIGHTS
%gw = gnodes(jsub,numsub,a,b)
%Input
% NULL
%Output
% gw - 4 quadrature weights.
function gw = gweights
%Standard weights:
w1 = 1/2 + sqrt(30)/36;
w2 = 1/2 - sqrt(30)/36;
gw = [w2;w1;w1;w2];
% End gweights... |
github | nbbncsu/smithCode-master | phase_ini.m | .m | smithCode-master/smartSystems/matlab/smartCh5/phase_ini.m | 1,284 | utf_8 | 774f230c8c3d418e8c859d16de6732ee | % Jordan E. Massad
% Oct 18, 2004
% Initial Phase Fraction Computation
%
%
%PHASE_INI
%[xplus0, xminus0] = phase_ini(tspan,Tini,mparams,cparams)
%Input
% Tini - initial environment temperature [K].
% mparams - material parameters.
% cparams - computed parameters.
%Output
% xplus0,xminus0 - initial M... |
github | nbbncsu/smithCode-master | sigAfun.m | .m | smithCode-master/smartSystems/matlab/smartCh5/sigAfun.m | 1,400 | utf_8 | 2a48812e86d16389e590460bdc92229e | % Jordan E. Massad
% Oct 18, 2004
% Compute Transformation Stresses
%
%
%SIGAFUN
%sigA = sigAfun(T,mparams,cparams)
%Input
% T - temperature point/vector
% mparams - material parameters:
% cparams - computed parameters.
%Output
% sigA - A-M transition stress
function sigA = sigAfun(T,mparams,cparam... |
github | SYSU-Jmiao/CVX-master | cvx_version.m | .m | CVX-master/cvx_version.m | 14,444 | utf_8 | 2cdcdd7387d8c9c9e179b1b37b0a7b42 | function varargout = cvx_version( varargin )
% CVX_VERSION Returns version and environment information for CVX.
%
% When called with no arguments, CVX_VERSION prints out version and
% platform information that is needed when submitting CVX bug reports.
%
% This function is also used internally to return use... |
github | SYSU-Jmiao/CVX-master | make.m | .m | CVX-master/examples/make.m | 23,756 | utf_8 | c82aef30a6a97533a232e958096b146f | function make( varargin )
%
% Determine the base path
%
odir = pwd;
base = mfilename('fullpath');
base = fileparts( base );
%
% Check the force and runonly flags
%
args = varargin;
is_octave = exist( 'OCTAVE_VERSION', 'builtin' );
if is_octave,
force = true;
runonly = true;
indexonly = ... |
github | SYSU-Jmiao/CVX-master | cantilever_beam_plot.m | .m | CVX-master/examples/cvxbook/Ch04_cvx_opt_probs/cantilever_beam_plot.m | 1,050 | utf_8 | e8c8c9e1b601e4102f96e0436649d132 | % Plots a cantilever beam as a 3D figure.
% This is a helper function for the optimal cantilever beam example.
%
% Inputs:
% values: an array of heights and widths of each segment
% [h1 h2 ... hN w1 w2 ... wN]
%
% Almir Mutapcic 01/25/06
function cantilever_beam_plot(values)
N = length(values)/2;
for k ... |
github | SYSU-Jmiao/CVX-master | simple_step.m | .m | CVX-master/examples/circuit_design/simple_step.m | 248 | utf_8 | ce47b4b6778bdb78f1098a2f2dc06205 | % Computes the step response of a linear system
function X = simple_step(A,B,DT,N)
n = size(A,1);
Ad = expm( full( A * DT ) );
Bd = ( Ad - eye(n) ) * B;
Bd = A \ Bd;
X = zeros(n,N);
for k = 2 : N,
X(:,k) = Ad*X(:,k-1)+Bd;
end
|
github | SYSU-Jmiao/CVX-master | spectral_fact.m | .m | CVX-master/examples/filter_design/spectral_fact.m | 1,292 | utf_8 | 014eebfa2dfbbd038c1383ff2ef97b0e | % Spectral factorization using Kolmogorov 1939 approach.
% (code follows pp. 232-233, Signal Analysis, by A. Papoulis)
%
% Computes the minimum-phase impulse response which satisfies
% given auto-correlation.
%
% Input:
% r: top-half of the auto-correlation coefficients
% starts from 0th element to end of the au... |
github | SYSU-Jmiao/CVX-master | polar_plot_ant.m | .m | CVX-master/examples/antenna_array_design/polar_plot_ant.m | 1,149 | utf_8 | 34a08a3bc75c474d61e01ea58b16e54e | % Plot a polar plot of an antenna array sensitivity
% with lines denoting the target direction and beamwidth.
% This is a helper function used in the broadband antenna examples.
%
% Inputs:
% X: an array of abs(y(theta)) where y is the antenna array pattern
% theta0: target direction
% bw: total beamw... |
github | SYSU-Jmiao/CVX-master | spectral_fact.m | .m | CVX-master/examples/antenna_array_design/spectral_fact.m | 1,385 | utf_8 | 570e7ae2165d19abd477494c52e609f8 | % Spectral factorization using Kolmogorov 1939 approach
% (code follows pp. 232-233, Signal Analysis, by A. Papoulis)
%
% Computes the minimum-phase impulse response which satisfies
% given auto-correlation.
%
% Input:
% r: top-half of the auto-correlation coefficients
% starts from 0th element to end of the aut... |
github | SYSU-Jmiao/CVX-master | plotgraph.m | .m | CVX-master/examples/graph_laplacian/plotgraph.m | 3,172 | utf_8 | a46b1d761798c492e96a5b9504aea9aa | function plotgraph(A,xy,weights)
% Plots a graph with each edge width proportional to its weight.
%
% Edges with positive weights are drawn in blue; negative weights in red.
%
% Input parameters:
% A --- incidence matrix of the graph (size is n x m)
% (n is the number of nodes and m is the number of e... |
github | SYSU-Jmiao/CVX-master | disp.m | .m | CVX-master/lib/@cvxprob/disp.m | 5,405 | utf_8 | 308868023e62c32fac37cc6621ed8af5 | function disp( prob, prefix )
if nargin < 2, prefix = ''; end
global cvx___
p = cvx___.problems( prob.index_ );
if isempty( p.variables ),
nvars = 0;
else
nvars = length( fieldnames( p.variables ) );
end
if isempty( p.duals ),
nduls = 0;
else
nduls = length( fieldnames( p.duals ) );
end
neqns = ( len... |
github | SYSU-Jmiao/CVX-master | apply.m | .m | CVX-master/lib/@cvxtuple/apply.m | 505 | utf_8 | b8d18946eb97e640bab87ef5e3256e8c | function y = apply( func, x )
y = do_apply( func, x.value_ );
function y = do_apply( func, x )
switch class( x ),
case 'struct',
y = cell2struct( do_apply( func, struct2cell( x ) ), fieldnames( x ), 1 );
case 'cell',
y = cellfun( func, x, 'UniformOutput', false );
otherwise,
y = fev... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.