MATLAB, SimulinkでGitを有効に活用す​る方法

本サンプルモデルでは、MATLABスクリプト作成作業、Simulinkモデルを使ったモデリング、開発業務を円滑に進めるための、Git機能の活用方法について紹介します。
19 Downloads
Updated 9 Dec 2022

MATLAB, SimulinkでGitを有効に活用する方法

本サンプルモデルでは、MATLABスクリプト作成作業、Simulinkモデルを使ったモデリング、開発業務を円滑に進めるための、Git機能の活用方法について紹介します。

本デモモデルでは、特に重要な機能に絞って説明しています。より詳細について知りたい場合は、「プロジェクトのソース管理」をご確認ください。

必要なツールボックス

本モデルでは、以下のツールボックスを利用します。

  • MATLAB®
  • Simulink®

必要な外部ツール

  • Git™

初期化

最初にこのコマンドを実行してください。

root_directory = pwd;
addpath(genpath('efficient_work'));
addpath(genpath('with_Project'));
addpath(genpath('without_Project'));

ワークフロー

1. リモートリポジトリを作成

以下のコマンドを実行し、開いたライブスクリプトの内容に従って作業を進めます。

cd('without_Project/work_1/');
edit('create_remote_repository');

2. Simulinkモデルの変更点をGitで管理

以下のコマンドを実行し、開いたライブスクリプトの内容に従って作業を進めます。

cd('without_Project/work_2/');
edit('manage_Simulink_dif_with_git');

3. スクリプトの変更点をGitで管理

以下のコマンドを実行し、開いたライブスクリプトの内容に従って作業を進めます。

cd('without_Project/work_3/');
edit('manage_script_dif_with_git');

4. プロジェクト機能を使って複数ファイルを効率的に管理

以下のコマンドを実行し、開いたライブスクリプトの内容に従って作業を進めます。

cd('with_Project/');
edit('workflow_with_project');

5. Gitを使って効率的に仕事を進める工夫

以下のコマンドを実行し、開いたライブスクリプトの内容に従って作業を進めます。

cd('efficient_work/');
edit('efficient_workflow_and_tools');

Copyright 2022 The MathWorks, Inc.

Cite As

Toshinobu Shintai (2024). MATLAB, SimulinkでGitを有効に活用する方法 (https://github.com/mathworks/how-to-use-matlab-simulink-with-git-efficiently/releases/tag/v1.0.1), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with R2022b
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

efficient_work

without_Project/work_3

Version Published Release Notes
1.0.1

1.0.0.0

See release notes for this release on GitHub: https://github.com/mathworks/how-to-use-matlab-simulink-with-git-efficiently/releases/tag/v1.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.