diff --git a/Models/Models23a/Models23a/BuildRefrigerator.mlx b/Models/Models23a/BuildRefrigerator.mlx similarity index 100% rename from Models/Models23a/Models23a/BuildRefrigerator.mlx rename to Models/Models23a/BuildRefrigerator.mlx diff --git a/Models/Models23a/Models23a/Condenser_2Pass.slx b/Models/Models23a/Condenser_2Pass.slx similarity index 100% rename from Models/Models23a/Models23a/Condenser_2Pass.slx rename to Models/Models23a/Condenser_2Pass.slx diff --git a/Models/Models23a/Models23a/ModelFridge.slx b/Models/Models23a/ModelFridge.slx similarity index 100% rename from Models/Models23a/Models23a/ModelFridge.slx rename to Models/Models23a/ModelFridge.slx diff --git a/Models/Models23a/Models23a/ModelFridgeCompressor.slx b/Models/Models23a/ModelFridgeCompressor.slx similarity index 100% rename from Models/Models23a/Models23a/ModelFridgeCompressor.slx rename to Models/Models23a/ModelFridgeCompressor.slx diff --git a/Models/Models23a/Models23a/ModelFridgeCondenser.slx b/Models/Models23a/ModelFridgeCondenser.slx similarity index 100% rename from Models/Models23a/Models23a/ModelFridgeCondenser.slx rename to Models/Models23a/ModelFridgeCondenser.slx diff --git a/Models/Models23a/Models23a/ModelFridgeEvapCompCond.slx b/Models/Models23a/ModelFridgeEvapCompCond.slx similarity index 100% rename from Models/Models23a/Models23a/ModelFridgeEvapCompCond.slx rename to Models/Models23a/ModelFridgeEvapCompCond.slx diff --git a/Models/Models23a/Models23a/ModelFridgeEvaporator.slx b/Models/Models23a/ModelFridgeEvaporator.slx similarity index 100% rename from Models/Models23a/Models23a/ModelFridgeEvaporator.slx rename to Models/Models23a/ModelFridgeEvaporator.slx diff --git a/Models/Models23a/Models23a/ModelFridge_WithQuality.slx b/Models/Models23a/ModelFridge_WithQuality.slx similarity index 100% rename from Models/Models23a/Models23a/ModelFridge_WithQuality.slx rename to Models/Models23a/ModelFridge_WithQuality.slx diff --git a/Models/Models23a/Models23a/Model_Fridge.mlx b/Models/Models23a/Model_Fridge.mlx similarity index 100% rename from Models/Models23a/Models23a/Model_Fridge.mlx rename to Models/Models23a/Model_Fridge.mlx diff --git a/Models/Models23a/Models23a/ValveHarness.slx b/Models/Models23a/ValveHarness.slx similarity index 100% rename from Models/Models23a/Models23a/ValveHarness.slx rename to Models/Models23a/ValveHarness.slx diff --git a/Models/Models23a/Models23a/Work_demo.slx b/Models/Models23a/Work_demo.slx similarity index 100% rename from Models/Models23a/Models23a/Work_demo.slx rename to Models/Models23a/Work_demo.slx diff --git a/Models/Models23a/Models23a/step1_EvaporatorHarness.slx b/Models/Models23a/step1_EvaporatorHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step1_EvaporatorHarness.slx rename to Models/Models23a/step1_EvaporatorHarness.slx diff --git a/Models/Models23a/Models23a/step2_CompressorHarness.slx b/Models/Models23a/step2_CompressorHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step2_CompressorHarness.slx rename to Models/Models23a/step2_CompressorHarness.slx diff --git a/Models/Models23a/Models23a/step3_CondenserHarness.slx b/Models/Models23a/step3_CondenserHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step3_CondenserHarness.slx rename to Models/Models23a/step3_CondenserHarness.slx diff --git a/Models/Models23a/Models23a/step4_EvapCompCondHarness.slx b/Models/Models23a/step4_EvapCompCondHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step4_EvapCompCondHarness.slx rename to Models/Models23a/step4_EvapCompCondHarness.slx diff --git a/Models/Models23a/Models23a/step5_ValveHarness.slx b/Models/Models23a/step5_ValveHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step5_ValveHarness.slx rename to Models/Models23a/step5_ValveHarness.slx diff --git a/Models/Models23a/Models23a/step6_ClosedLoopHarness.slx b/Models/Models23a/step6_ClosedLoopHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step6_ClosedLoopHarness.slx rename to Models/Models23a/step6_ClosedLoopHarness.slx diff --git a/Models/Models23a/Models23a/step7_ClosedLoopFixDensityHarness.slx b/Models/Models23a/step7_ClosedLoopFixDensityHarness.slx similarity index 100% rename from Models/Models23a/Models23a/step7_ClosedLoopFixDensityHarness.slx rename to Models/Models23a/step7_ClosedLoopFixDensityHarness.slx diff --git a/Utilities/ProjectShutdown.m b/Utilities/ProjectShutdown.m new file mode 100644 index 0000000..08d02d5 --- /dev/null +++ b/Utilities/ProjectShutdown.m @@ -0,0 +1,35 @@ +function ProjectShutdown +% Open the overview file + +% Set up check for version number +proj = currentProject; +myPath = fullfile(proj.RootFolder,"Models"); +if isMATLABReleaseOlderThan("R2023b") + cd(proj.RootFolder) + try + if exist(fullfile("Utilities","OldVersions","MainMenuNew.mlx"),"file") + movefile("MainMenu.mlx", fullfile("Utilities","OldVersions","MainMenuOld.mlx")) + movefile(fullfile("Utilities","OldVersions","MainMenuNew.mlx"),fullfile(proj.RootFolder,"MainMenu.mlx")) + end + catch + disp("Failed to move MainMenu.mlx.") + end + try + if exist(fullfile("Utilities","Oldersions","READMENew.mlx"),"file") + movefile("README.mlx", fullfile("Utilities","OldVersions","READMEOld.mlx")) + movefile(fullfile("Utilities","Oldersions","READMENew.mlx"),fullfile(proj.RootFolder,"README.mlx")) + end + catch + disp("Failed to move README.mlx.") + end + if isMATLABReleaseOlderThan("R2022b") + % Nothing to change + elseif isMATLABReleaseOlderThan("R2023a") + rmpath(fullfile(myPath,"Models22b")) + else + rmpath(fullfile(myPath,"Models23a")) + end +else + rmpath(fullfile(myPath,"Models23a")) +end +end \ No newline at end of file diff --git a/Utilities/StartupScript.m b/Utilities/Startup.m similarity index 91% rename from Utilities/StartupScript.m rename to Utilities/Startup.m index e14c4db..fbe4575 100644 --- a/Utilities/StartupScript.m +++ b/Utilities/Startup.m @@ -27,16 +27,16 @@ if isMATLABReleaseOlderThan("R2022b") disp(str + " so it may not run this example which was built in R2022b.") elseif isMATLABReleaseOlderThan("R2023a") - addpath(myPath+filesep+"Models22b") + addpath(fullfile(myPath,"Models22b")) else % Fix path to run R2023a files - addpath(myPath+filesep+"Models23a") + addpath(fullfile(myPath,"Models23a")) end else % Fix path to run R2023a files, for now? disp(str + " and this was designed using R2022b.") disp("If you find errors, please report them to onlineteaching@mathworks.com") - addpath(myPath+filesep+"Models23a") + addpath(fullfile(myPath,"Models23a")) end StartUpFcn end \ No newline at end of file diff --git a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/NtYHK68HKCj2dObF23GaX4B3z68d.xml b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/NtYHK68HKCj2dObF23GaX4B3z68d.xml deleted file mode 100644 index 89b9021..0000000 --- a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/NtYHK68HKCj2dObF23GaX4B3z68d.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/NtYHK68HKCj2dObF23GaX4B3z68p.xml b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/NtYHK68HKCj2dObF23GaX4B3z68p.xml deleted file mode 100644 index 9d2da56..0000000 --- a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/NtYHK68HKCj2dObF23GaX4B3z68p.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/SkoAdqI2Fh9TocZ55aP1wbz4t8gd.xml b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/SkoAdqI2Fh9TocZ55aP1wbz4t8gd.xml new file mode 100644 index 0000000..e862667 --- /dev/null +++ b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/SkoAdqI2Fh9TocZ55aP1wbz4t8gd.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/SkoAdqI2Fh9TocZ55aP1wbz4t8gp.xml b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/SkoAdqI2Fh9TocZ55aP1wbz4t8gp.xml new file mode 100644 index 0000000..e697e75 --- /dev/null +++ b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/SkoAdqI2Fh9TocZ55aP1wbz4t8gp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/jrDcN-cJxOIYLwTjafDBwWvhO20d.xml b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/jrDcN-cJxOIYLwTjafDBwWvhO20d.xml new file mode 100644 index 0000000..a1ed4ba --- /dev/null +++ b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/jrDcN-cJxOIYLwTjafDBwWvhO20d.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/jrDcN-cJxOIYLwTjafDBwWvhO20p.xml b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/jrDcN-cJxOIYLwTjafDBwWvhO20p.xml new file mode 100644 index 0000000..3291884 --- /dev/null +++ b/resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/jrDcN-cJxOIYLwTjafDBwWvhO20p.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/L27GnRVudTeNT9LngGtGhVPDrdUp.xml b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/L27GnRVudTeNT9LngGtGhVPDrdUp.xml deleted file mode 100644 index cddb3da..0000000 --- a/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/L27GnRVudTeNT9LngGtGhVPDrdUp.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/L27GnRVudTeNT9LngGtGhVPDrdUd.xml b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/ZTr3GAe6p03ZVs2FdKKE0JsiFMQd.xml similarity index 100% rename from resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/L27GnRVudTeNT9LngGtGhVPDrdUd.xml rename to resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/ZTr3GAe6p03ZVs2FdKKE0JsiFMQd.xml diff --git a/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/ZTr3GAe6p03ZVs2FdKKE0JsiFMQp.xml b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/ZTr3GAe6p03ZVs2FdKKE0JsiFMQp.xml new file mode 100644 index 0000000..31a64a5 --- /dev/null +++ b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/ZTr3GAe6p03ZVs2FdKKE0JsiFMQp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/laEXQ8S8ZfculNP7NEgbVD64dicd.xml b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/laEXQ8S8ZfculNP7NEgbVD64dicd.xml new file mode 100644 index 0000000..7a6326b --- /dev/null +++ b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/laEXQ8S8ZfculNP7NEgbVD64dicd.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/laEXQ8S8ZfculNP7NEgbVD64dicp.xml b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/laEXQ8S8ZfculNP7NEgbVD64dicp.xml new file mode 100644 index 0000000..7db4175 --- /dev/null +++ b/resources/project/iMwdHOXOBiBXhnA_li8gtEJVTjc/laEXQ8S8ZfculNP7NEgbVD64dicp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file