フィルターのクリア

Error: Attempt to add (variable) to a static workspace,

40 ビュー (過去 30 日間)
B.E.
B.E. 2019 年 12 月 31 日
コメント済み: B.E. 2019 年 12 月 31 日
My function
function Densite
load x;
load h
if ...........................
.................
elseif ........................
........................
end
end
error
Error using ===> load
Attempt to add "x" to static workspace
Errr in ===> Densite
load x;

採用された回答

Max Murphy
Max Murphy 2019 年 12 月 31 日
Try
function Densite
% load x;
% load h
in = load('x.mat','x'); % If these were together in one file, like 'data.mat'
x = in.x; % then you could load both at once
in = load('h.mat','h');
h = in.h;
if ...........................
.................
elseif ........................
........................
end
end
error
Error using ===> load
Attempt to add "x" to static workspace
Errr in ===> Densite
load x;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStandard File Formats についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by