Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Walter Roberson
Walter Roberson il 4 Apr 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.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by