Dot indexing is not supported for variables of this type.

3 visualizzazioni (ultimi 30 giorni)
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 Commenti
SOUKAINA JAAFARI
SOUKAINA JAAFARI il 23 Feb 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 il 23 Feb 2024
Modificato: Torsten il 23 Feb 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.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by