Skip to content

Commit

Permalink
Initial commit R2018a
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed Oct 21, 2019
1 parent 84830b5 commit 777e86a
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Optim/obj_sm_four_bar_optim_match_path.m
@@ -1,6 +1,6 @@
function F = obj_sm_four_bar_optim_match_path(mdl,param_v,x_data_des,y_data_des,map_h)
% Objective function to optimize trajectory of four-bar linkage
% Copyright 2017 The MathWorks, Inc.
% Copyright 2017-2018 The MathWorks, Inc.

load_system(mdl);

Expand Down
2 changes: 1 addition & 1 deletion Optim/sm_four_bar_optim_match_path.m
@@ -1,5 +1,5 @@
% Optimization tune four-bar linkage to follow a desired trajectory
% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

% Set up model
mdl = 'sm_four_bar_optim';
Expand Down
2 changes: 1 addition & 1 deletion Optim/sm_four_bar_optim_plottraj.m
@@ -1,6 +1,6 @@
function sm_four_bar_optim_plottraj(ref,orig,final,fig_h)
% Plot desired, initial, and final trajectories
% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

figure(fig_h)
if(~isempty(ref))
Expand Down
2 changes: 1 addition & 1 deletion Optim/sm_four_bar_optim_test_cost.m
@@ -1,5 +1,5 @@
% Script for testing cost functions
% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

% Fixed Parameters
c = 0.2; % m
Expand Down
2 changes: 1 addition & 1 deletion README.txt
@@ -1,5 +1,5 @@
Four-Bar Linkage Optimization
Copyright 2017 The MathWorks, Inc.
Copyright 2017-2018 The MathWorks, Inc.

Models a four-bar linkage in Simscape Multibody. The lengths
of the links are parameterized using MATLAB variables. Adjusting
Expand Down
2 changes: 1 addition & 1 deletion Scripts_Data/sm_four_bar_optim_center_plot.m
@@ -1,5 +1,5 @@
function sm_four_bar_optim_center_plot(ax_h,factor)
% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

% Extend range of axes by (current range*factor)
% and leave plot centered
Expand Down
2 changes: 1 addition & 1 deletion Scripts_Data/sm_four_bar_optim_param.m
@@ -1,5 +1,5 @@
% Parameters for sm_four_bar_optim
% Copyright 2017 The MathWorks, Inc.
% Copyright 2017-2018 The MathWorks, Inc.

% Fixed lengths
c = 0.2; % m
Expand Down
2 changes: 1 addition & 1 deletion Scripts_Data/sm_four_bar_optim_param_sweep_plot.m
@@ -1,7 +1,7 @@
% Script to plot possible trajectories of end effector as
% linkage lengths are varied

% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

% Create figure
if ~exist('h2_sm_four_bar_optim', 'var') || ...
Expand Down
2 changes: 1 addition & 1 deletion Scripts_Data/sm_four_bar_optim_param_sweep_run.m
@@ -1,5 +1,5 @@
% Parameter sweep for four-bar linkage to see possible trajectories
% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

% Fixed lengths
c = 0.2; % m
Expand Down
2 changes: 1 addition & 1 deletion Scripts_Data/sm_four_bar_optim_plot1path.m
Expand Up @@ -5,7 +5,7 @@
% linkage. Varying the lengths of the bars will change the trajectory of
% this point.
%
% Copyright 2017 The MathWorks, Inc.
% Copyright 2017-2018 The MathWorks, Inc.

% Generate simulation results if they don't exist
if ~exist('simlog_sm_four_bar_optim', 'var')
Expand Down
2 changes: 1 addition & 1 deletion Scripts_Data/sm_four_bar_optim_vistraj.m
@@ -1,6 +1,6 @@
function sm_four_bar_optim_vistraj(model,showhide)
% Shows or hides initial trajectory for optimization in sm_four_bar_optim
% Copyright 2017 The MathWorks, Inc.
% Copyright 2017-2018 The MathWorks, Inc.

spl_h = find_system(model,'RegExp','on','IncludeCommented','on','LookUnderMasks','all','FollowLinks','on','ReferenceBlock','.*Spline');

Expand Down
32 changes: 16 additions & 16 deletions html/html/sm_four_bar_optim.html
Expand Up @@ -6,7 +6,7 @@
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Four-Bar Linkage Optimization</title><meta name="generator" content="MATLAB 9.3"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2017-09-06"><meta name="DC.source" content="sm_four_bar_optim.m"><style type="text/css">
--><title>Four-Bar Linkage Optimization</title><meta name="generator" content="MATLAB 9.4"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2018-02-10"><meta name="DC.source" content="sm_four_bar_optim.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

html { min-height:100%; margin-bottom:1px; }
Expand Down Expand Up @@ -71,27 +71,27 @@
Iter Func-count f(x) MeshSize Method
0 1 0.383738 0.215
1 1 0.383738 0.05375 Refine Mesh
2 2 0.00661577 0.1075 Successful Poll
3 2 0.00661577 0.02687 Refine Mesh
4 5 0.00272638 0.05375 Successful Poll
5 9 0.000112722 0.1075 Successful Poll
6 11 0.000112722 0.02687 Refine Mesh
7 15 2.0582e-05 0.05375 Successful Poll
8 19 2.0582e-05 0.01344 Refine Mesh
9 23 1.67334e-06 0.02687 Successful Poll
10 27 1.67334e-06 0.006719 Refine Mesh
11 31 1.47731e-07 0.01344 Successful Poll
12 35 1.47731e-07 0.003359 Refine Mesh
13 39 1.47731e-07 0.0008398 Refine Mesh
2 2 0.00661575 0.1075 Successful Poll
3 2 0.00661575 0.02687 Refine Mesh
4 5 0.00272637 0.05375 Successful Poll
5 9 0.000112725 0.1075 Successful Poll
6 11 0.000112725 0.02687 Refine Mesh
7 15 2.05831e-05 0.05375 Successful Poll
8 19 2.05831e-05 0.01344 Refine Mesh
9 23 1.67366e-06 0.02687 Successful Poll
10 27 1.67366e-06 0.006719 Refine Mesh
11 31 1.47636e-07 0.01344 Successful Poll
12 35 1.47636e-07 0.003359 Refine Mesh
13 39 1.47636e-07 0.0008398 Refine Mesh
Optimization terminated: mesh size less than options.MeshTolerance.
Elapsed Time = 25.6766
Elapsed Time = 55.0108
Link Initial Final
____ ________ ________

'a' '0.1800' '0.1195'
'b' '0.2500' '0.2651'

</pre><img vspace="5" hspace="5" src="sm_four_bar_optim_04.png" alt=""> <img vspace="5" hspace="5" src="sm_four_bar_optim_05.png" alt=""> <img vspace="5" hspace="5" src="sm_four_bar_optim_06.png" alt=""> <p class="footer">Copyright 2017 The MathWorks, Inc.<br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2017b</a><br></p></div><!--
</pre><img vspace="5" hspace="5" src="sm_four_bar_optim_04.png" alt=""> <img vspace="5" hspace="5" src="sm_four_bar_optim_05.png" alt=""> <img vspace="5" hspace="5" src="sm_four_bar_optim_06.png" alt=""> <p class="footer">Copyright 2017-2018 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2018a</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Four-Bar Linkage Optimization
%
Expand All @@ -110,7 +110,7 @@
% are tuned using MATLAB optimization algorithms until the resulting
% trajectory is within tolerances of the desired trajectory.
%
% Copyright 2017 The MathWorks, Inc.
% Copyright 2017-2018 The MathWorks, Inc.
%% Model
Expand Down
Binary file modified html/html/sm_four_bar_optim.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/html/sm_four_bar_optim_01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/html/sm_four_bar_optim_02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/html/sm_four_bar_optim_03.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/html/sm_four_bar_optim_04.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/html/sm_four_bar_optim_05.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/html/sm_four_bar_optim_06.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion html/sm_four_bar_optim.m
Expand Up @@ -15,7 +15,7 @@
% are tuned using MATLAB optimization algorithms until the resulting
% trajectory is within tolerances of the desired trajectory.
%
% Copyright 2017 The MathWorks, Inc.
% Copyright 2017-2018 The MathWorks, Inc.


%% Model
Expand Down
Binary file modified sm_four_bar_optim.slx
Binary file not shown.
2 changes: 1 addition & 1 deletion startup_sm_four_bar_optim.m
@@ -1,5 +1,5 @@
% Startup script for sm_four_bar_optim
% Copyright 2017 MathWorks, Inc.
% Copyright 2017-2018 MathWorks, Inc.

addpath(pwd)
addpath([pwd filesep 'Images']);
Expand Down

0 comments on commit 777e86a

Please sign in to comment.