Dot indexing is not supported for variables of this type.

3 visualizaciones (últimos 30 días)
SOUKAINA JAAFARI
SOUKAINA JAAFARI el 23 de Feb. de 2024
Editada: Torsten el 23 de Feb. de 2024
Why do I get that error? I am using the AI-mag FEM/ANN Code but when it comes to plotting the outcome, I get this error
  3 comentarios
SOUKAINA JAAFARI
SOUKAINA JAAFARI el 23 de Feb. de 2024
@Torsten does this help now?
% Initialize the variable structure
var_inp = {};
% Add variables based on the model type
if any(strcmp(model_type, {'ht', 'mf'}))
% Inner radius
var_inp{end+1} = struct('name', 'rin', 'var_trf', 'none', 'var_norm', 'none', 'min', 0.75, 'max', 0.75); % Fixed value
% Number of turns
var_inp{end+1} = struct('name', 'N', 'var_trf', 'none', 'var_norm', 'none', 'min', 35, 'max', 35); % Fixed value
% Wire width
var_inp{end+1} = struct('name', 'wire_width', 'var_trf', 'none', 'var_norm', 'none', 'min', 4, 'max', 4); % Fixed value
% Distance between turns
var_inp{end+1} = struct('name', 'turn_distance', 'var_trf', 'none', 'var_norm', 'none', 'min', 4, 'max', 4); % Fixed value
% Air gap length (variable)
var_inp{end+1} = struct('name', 'airgap', 'var_trf', 'none', 'var_norm', 'min_max', 'min', 50, 'max', 250);
Torsten
Torsten el 23 de Feb. de 2024
Editada: Torsten el 23 de Feb. de 2024
You don't have a substructure with name "var_norm.min". All structure elements are at the same (first) level.
var_inp{1} = struct('name', 'rin', 'var_trf', 'none', 'var_norm', 'none', 'min', 0.75, 'max', 0.75); % Fixed value
var_inp{end}
ans = struct with fields:
name: 'rin' var_trf: 'none' var_norm: 'none' min: 0.7500 max: 0.7500
var_inp{end}.var_norm
ans = 'none'
var_inp{end}.min
ans = 0.7500
var_inp{end}.var_norm.min
Dot indexing is not supported for variables of this type.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by