From c5bb46c1846737e5410bb18de8c4a251ccfa7510 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 16 Jan 2020 11:49:29 +0100 Subject: [PATCH] Add flexibility to the sample --- simscape_subsystems/sample_environment.slx | Bin 26263 -> 27299 bytes src/initializeSample.m | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/simscape_subsystems/sample_environment.slx b/simscape_subsystems/sample_environment.slx index 0551b05d664e05314d248a51d3fa76123bc3c265..c47e500a69f8a6147ba0bbc01bdd169b11865297 100644 GIT binary patch delta 8826 zcmZWv1yodT)2B-&B0 z>-*hvo^xks<~K9H=Q(%Ixpy{m46$ey5m#Fs8HE@D0RaQyM3Yau7MB_c86y?ECOG>gmvc%%D8v!4(DE*%0J@KR8(P1Q%5Axg(54sU547fy;hg1n|WgNbTk z>973AKK=0{XnVGdt&_+}k1d;?FbaY^Vqgf7l;d4)?0#NQtMRf*pOA1SOm2-MDNwO> z`lQ?db&1qk(vb;g#~=cC&XCxyACEo@Gf!UJ8{A+$XW^F&;2e@M#tk5idBW9GmuM1W zrqG>3J!PGJI#MV8y-olk8bgSp;>w4K@h}(PCrn}OIZ~LediU3 zCPKdSY%|%99bipxZz(<(OZr&vTO?;>)nDOc#Le7mVDuWv^z}mjuZko8`BTOj;PLQK ziPhg{0oH7_9D<*WG9m&34g3!BLp}O^BGKEV)m zTLRN9r)3clBDxBw>y1X6+Wh+UICW?Da`c^bT)jW{SfCQ7_;&1KzFClD2*0AL#s->k zM}NkHZL$5jbFhH)hW`m?jG!G;?(krSCVMrV{Bwa1(Gc$9gWY~+@9k>iUh|E_j}UM6 zwa53csAGK!IT4X!)SItX`tv6_j*`6gCi)WGYszmr#}&$M>bPz{IYJ>hs^y%e-@S%& zlpK;MIb_9LPUS^v|Fw^R zn)*KwHJncW595lNKvPcC+mI?Ab3wx7g6$y@(YlPCR780fA3yMUdgWRf8bUT=61SUJ#v!Wc ziGr;Lud(ugzGB%+Ti*IhHI^q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yR|T#NC!c;>TtJ0Y>Q^Qp#!Qs^H1yj%mHrlhpU$-lewSrxoe}rOrgF%e$-JrA>E7zuyQWH*ZpQuEcFJ_kdjf zmx=M*{D)M^gNf1nFrfIRAD@2RVbkO%U}={71mMlHpFp8`>=WR$h<*Ys7Nt+X#&Y5b zh+4gP0m*9;KO0??9o*T zu_k>a{%yECGX5okkRORt*5uUxWHfZoKjOv)0PJu80HP<}zh_e@mJQ=0=h4u3kU4nh zOr-xleNyd)YT2+nO*Ghs49*jpWdnTFua5VWhCFbjkO2UOzg`h1hnkTyK~Zfn9*OzQ zCvlAr1j+|8<6lG!N+<^t9I}jiBykY|v}_r|R diff --git a/src/initializeSample.m b/src/initializeSample.m index 5755623..c2cc4fb 100644 --- a/src/initializeSample.m +++ b/src/initializeSample.m @@ -1,20 +1,21 @@ function [sample] = initializeSample(sample) arguments - sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100 - sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300 - sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 - sample.offset (1,1) double {mustBeNumeric} = 0 + sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100 % [mm] + sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300 % [mm] + sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg] + sample.freq (1,1) double {mustBeNumeric, mustBePositive} = 100 % [Hz] + sample.offset (1,1) double {mustBeNumeric} = 0 % [mm] sample.color (1,3) double {mustBeNumeric} = [0.45, 0.45, 0.45] end %% - sample.k.x = 1e8; + sample.k.x = sample.mass * (2*pi * sample.freq)^2; sample.c.x = 0.1*sqrt(sample.k.x*sample.mass); - sample.k.y = 1e8; + sample.k.y = sample.mass * (2*pi * sample.freq)^2; sample.c.y = 0.1*sqrt(sample.k.y*sample.mass); - sample.k.z = 1e8; + sample.k.z = sample.mass * (2*pi * sample.freq)^2; sample.c.z = 0.1*sqrt(sample.k.z*sample.mass); %% Save