Borrar filtros
Borrar filtros

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

40 visualizaciones (últimos 30 días)
B.E.
B.E. el 31 de Dic. de 2019
Comentada: B.E. el 31 de Dic. de 2019
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;

Respuesta aceptada

Max Murphy
Max Murphy el 31 de Dic. de 2019
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;

Más respuestas (0)

Categorías

Más información sobre Standard File Formats en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by