필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
Rohan Repale
Rohan Repale 2013년 4월 4일
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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 4월 4일
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.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by