Borrar filtros
Borrar filtros

Undefined function or method 'ge' for input arguments of type 'struct'.

4 visualizaciones (últimos 30 días)
This is my code,
clear all; close all; clc;
A = load('180-1-10001.mat')
M = 10001;
t = 0.2;
for i = 1:M,
for j = 1:M,
if A(i,j)>=t,
A(i,j)=A(i,j)*1;
elseif A(i,j)<=-t,
A(i,j)=A(i,j)*-1
elseif A(i,j)<=abs(t),
A(i,j)=A(i,j)*0;
end
end
end
Everytime I run it, I get the error message - "Undefined function or method 'ge' for input arguments of type 'struct'.".
I am not using any functions and dont have any variables/function with the name 'ge'. The .mat file that I am loading and the file I am working on are in the same directory. Please help.
Thanks, Rohan

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Abr. de 2013
When you use
A = load('something.mat')
then the result is a structure with one field for each variable that was stored in the .mat file. You can use fieldnames(A) to see what the names of the variables were.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by