I'm willing to use the global function to define some constant parameters in a structure. The written codes are as following
But according to the error reminder the current use of 'Biofilm' is inconsistent with the previous use or Definition. I couldn't understand this hint and still couldn't find the error. Could anyone help me with that? Thanks a lot!

댓글 수: 3

Guillaume
Guillaume 2018년 3월 13일
As a rule, don't use global variables.
Why does Biofilm need to be global? It is already defined as a normal variable since it is an output of the function. It looks like you either don't understand what global variables are, or how functions work.
Jacob Bean
Jacob Bean 2019년 4월 11일
Regardless of his level of understanding, people come here to ask questions. Not to be ridiculed.
Guillaume
Guillaume 2019년 4월 11일
@Jacob, I'm not sure who your comment is addressed to. Nobody was being ridiculed in my post. There was a piece of advice and a genuine question that would have helped answering the OP question, had that question been answered.

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

답변 (1개)

Krishna Bindumadhavan
Krishna Bindumadhavan 2018년 3월 13일

0 개 추천

You may have to remove Biofilm as the return argument, to make the function signature look like:
function setGlobalbiofilm()
As Biofilm is a global variable , it does not seem to be possible to declare it as a return value of a function. You can take a look at this documentation for further information.

카테고리

도움말 센터File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

태그

질문:

2018년 3월 1일

댓글:

2019년 4월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by