Error using function: Too many input arguments.
이전 댓글 표시
Hello,
so i have a prediction model code, with 15 inputs, and one output, and the code is working perfectly,
and i have saved the net file of this prediction, then I am trying to call a function with this net.file
the function:
script:
function outputPower = predictPVOutput(inputData)
load('net')
outputPower = net(inputData);
end
command window:
predictPVOutput(4,40,277,7,0,0,0.16,-30,3.2,0,0,96.2,1020,271,4)
error:
Error using predictPVOutput
Too many input arguments.
So what how can i call this function?
I have 15 inputs not 1,
Thanks in advance
채택된 답변
추가 답변 (2개)
Taylor
2024년 1월 11일
0 개 추천
"net" is not configured for as many inputs as you are providing. You will either need to reduce your number of inputs or edit the network to accept 15 inputs.
Hassaan
2024년 1월 11일
function outputPower = predictPVOutput(inputData)
load('net'); % Load your neural network model
outputPower = net(inputData);
end
Now, you should create an array or matrix that contains your 15 input values and pass that array as a single input argument to the function. For example:
inputData = [4, 40, 277, 7, 0, 0, 0.16, -30, 3.2, 0, 0, 96.2, 1020, 271, 4];
output = predictPVOutput(inputData);
---------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
Feel free to contact me.
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!