필터 지우기
필터 지우기

Trouble with my functio out

조회 수: 2 (최근 30일)
Annbritt Karlsdottir
Annbritt Karlsdottir 2024년 4월 20일
답변: Sulaymon Eshkabilov 2024년 4월 20일
I am trying to solve my extendet DMP model, which includes the the individuals option to commit crime. In my "function out DMP_steadystate(xx.... ) lacks input in the vaiable I, which is the income from crime. The MatLab error says that the function lacks input, and my question is where does this function receive its input from?

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2024년 4월 20일
If understood your question correctly, you are asking about input arguments of a function, right? If so, here a couple simple examples with Inputs and without Inputs, but with outputs:
a1 = 1;
b1 = 2;
[Out1, Out2] = Simple_IN(a1, b1)
Out1 = 3
Out2 = 2
[OUT1, OUT2] = Simple_NO
OUT1 = 3
OUT2 = 2
function [C, D] = Simple_IN(IN1, IN2)
C = IN1+IN2;
D = IN1*IN2;
end
function [S, M] = Simple_NO()
A = 1;
B = 2;
S = A+B;
M = A*B;
end
In the above shown Simple_IN, the function requires two (user) input arguments, and the other one - Simple_NO requires no input arguments.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by