residue error message

조회 수: 2 (최근 30일)
Mohammed
Mohammed 2012년 6월 3일
Hi,
I'm try to use residue function, I get the following error message
[R,P,K] = residue(M.b,M.f); Attempt to reference field of non-structure array. Error in rfdemo (line 171) [R,P,K] = residue(M.b,M.f);
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 6월 3일
The error means that M is a known variable but is not a structure.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2012년 6월 3일
Set a breakpoint there at that line (learn how to use the debugger if you don't know already). Then, when it stops, type M in the command window and hit enter. See what it says. If M is a structure, it will list something like this:
M =
b: 10
f: 'c:\abcdef'
If you see something else (which you probably will), then M is not a structure and you can't do things like M.b and M.f.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by