Code output in other codes

5 ビュー (過去 30 日間)
armin m
armin m 2021 年 11 月 27 日
コメント済み: armin m 2021 年 11 月 28 日
Hi. I have a code which it,s output includes 4 large matrices. I wanna use these matrixes from the code without copy paste it 8n new codes. How can i do that?TNx
  1 件のコメント
dpb
dpb 2021 年 11 月 28 日
Have the needed variables in the argument list in the new routines.
Build a control script function that calls the desired routines in whatever order needed...

サインインしてコメントする。

採用された回答

Yusuf Suer Erdem
Yusuf Suer Erdem 2021 年 11 月 28 日
編集済み: Yusuf Suer Erdem 2021 年 11 月 28 日
Hi Armin, check the codes below please;
clc; clear; close all;
x1 = randi([1, 25], [20,20])
y1 = randi([1, 25], [20,20])
z1 = randi([1, 25], [20,20])
t1 = randi([1, 25], [20,20])
% we are creating .mat file and saving it to current directory.
save largematrices.mat x1 y1 z1 t1
% with this code we are calling largematrices.mat file back to our workspace
% but note that you should call it from correct directory
load('largematrices.mat')
  1 件のコメント
armin m
armin m 2021 年 11 月 28 日

Tnx alot

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by