필터 지우기
필터 지우기

matlab syntax (parentheses and functions)

조회 수: 3 (최근 30일)
Sameer
Sameer 2014년 5월 12일
댓글: Star Strider 2014년 5월 12일
Does anyone see anything wrong with the MATLAB syntax? k are variables for the loops I created in my main program.
Any help would be greatly appreciated. Thanks. I am running a 5000 iteration loop, but the syntax is troubling me. Thanks.
  댓글 수: 5
Image Analyst
Image Analyst 2014년 5월 12일
Very Sorry! I must not have noticed your answer. But I am voting for most of your posts as consolation prize.
Star Strider
Star Strider 2014년 5월 12일
I deleted my answer to the previous question as soon as I saw this one and verified that the question was essentially the same. That question and my answer were still up at the time I looked it up to verify it, then I deleted my answer as redundant.
I sort of wish there were negative reputation points or something for duplicate posts or new posts rather than following up threads of previous posts. I believe we’ve all been burned by that practice at least once.
Thanks!
You can delete this comment as well if you wish, since it’s just my frustrated rant!

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

채택된 답변

James Tursa
James Tursa 2014년 5월 12일
Your function signature should have whole variable names, not subscripted names. That is, you might be passing in PQMatx(k,1) and PQMatx(k,2) in the calling routine, but in the function itself you shouldn't have subscripts here. You should have unique names like PQMatx1 and PQMatx2 (or whatever you want), but no subscripts in the argument list itself.
  댓글 수: 1
Image Analyst
Image Analyst 2014년 5월 12일
And the semicolon at the end of the line is not needed, as the red squiggly underline indicates.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by