View latex_multi_version_example.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% This is a working example to demonstrate use of switches to maintain multiple | |
% versions of a single document | |
% | |
% Uses the IEEEtran class: https://www.ctan.org/pkg/ieeetran | |
% | |
% Created 2016-10-30 by Adam Noel | |
% Define the switch here using "newif" and start its name with "if" | |
% Here, NAME_OF_SWITCH == "OneCol" | |
\newif\ifOneCol |
View matlab_plot_wrapper_use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
numPlotPoints = 50; | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); |
View matlab_plot_wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [hFig, hAxes, hCurve] = my_plot_function(hAxes, ... | |
xData, yData, myFigProp, myAxesProp, myCurveProp, xStr, yStr) | |
% A plotting wrapper function. Designed to plot one curve per call. | |
% | |
% INPUTS | |
% hAxes - handle to existing axes (set to 0 to create new figure and axes) | |
% xData - x data to plot (set to [] to not plot) | |
% yData - y data to plot (set to [] to not plot) | |
% myFigProp - structure of figure properties to change from defaults. See | |
% subfunction buildFigureStruct for defaults. Ignored if hAxes == 0. Set |
View matlab_plot_take6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numPlotPoints = 50; | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); | |
% Noisy curves |
View matlab_removeLegendLines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% This script removes the selected lines from a figure's legend. The lines | |
% must be selected BEFORE calling this script | |
% | |
% Created June 6, 2014, by Adam Noel | |
% | |
function removeLegendLines() | |
a = findobj('Selected', 'on'); | |
for i = 1:length(a) | |
hasbehavior(a(i), 'legend', false); | |
end |
View matlab_plot_take5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numPlotPoints = 50; | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); | |
% Noisy curves |
View matlab_plot_take4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Plotting take 4 | |
numPlotPoints = 50; | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); |
View matlab_plot_take3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Plotting take 3 | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); | |
% Noisy curves | |
n = length(x); |
View matlab_plot_take2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Plotting take 2 | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); | |
% Noisy curves | |
n = length(x); |
View matlab_plot_take1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Plotting take 1 | |
x = 1e-2:1e-2:100; | |
% Smooth curves | |
y1 = exp(-x); | |
y2 = 1-exp(-x); | |
% Noisy curves | |
n = length(x); |
NewerOlder