Undefined function or method 'ge' for input arguments of type 'struct'.
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Walter Roberson
on 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.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!