Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Accessing a SINGLE Output from Several Function Files into a Single Script or Function File
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi I have a beginning script file that calls 9 seperate function files, each of these are an individual file. Now I wish to callup a single output or variable from each of these function files and pass these into a new script or function file. There is several calculations in each function but im just after the one output. Now I dont have an issue with the beginning script and the function files themselves but when I pass the required output(s) to a new terminating script/function file then the resulting output variable is the same no matter what I put in as inputs into the new function. I would expect 9 outputs but only get 1 result. The values are correct but i cannot manipulate the one output value in this case (lc) as per below, no matter how many inputs/outputs i put into the terminating function.
function [lc, gc, gc3]= Final_MD_Total_Calc(atl, atg, atg3)
lc=atl
end
A snippet of the above code produces the below output in the command window. I can put in a any number of [ ] and ( ) it still produces the below code. When i put additonal outputs in such as more than lc in the body such as gc=atg of the function it returns an "not enough input arguments error". Inputs is not an issue just the outputs. Is there a way i can manipulate all of the below lc values such as to sum, max, divide etc in the new terminating script or function file or produce unique output variables for each of the 9 functions.
The HIGHEST Lighting Contribution of Amps Per Phase from the Lighting and Exhaust Fans as Per Appendix C of AS-3000 Load Group A (i or ii) is 19.65 A.
lc =
19.6522
The HIGHEST GPO Contribution of Amps Per Phase from all Socket Ratings as Per Appendix C of AS-3000 Load Group B (i or ii) is 60.43 A.
lc =
60.4348
The HIGHEST Amps Per Phase for ALL 3-Phase GPOs as Per Appendix C of AS-3000 Load Group B(iii) is 205.50 A.
lc =
205.5000
The HIGHEST Appliances Contribution of Amps Per Phase from the Appliances as Per Appendix C of AS-3000 Load Group C (i) is 19.83 A.
lc =
19.8261
The HIGHEST Motors Contribution of Amps Per Phase for ALL Motors as Per Appendix C of AS-3000 Load Group D is 142.28 A.
lc =
142.2824
The HIGHEST Lifts Contribution of Amps Per Phase for ALL Lifts as Per Appendix C of AS-3000 Load Group E is 389.30 A.
lc =
389.3004
The HIGHEST Contribution of Amps Per Phase for ALL Fuel Dispensing Units as Per Appendix C of AS-3000 Load Group F is 278.64 A.
lc =
278.6432
The HIGHEST Contribution of Amps Per Phase from the Heating Elements 1-Phase as Per Appendix C of AS-3000 Load Group G is 3.48 A.
lc =
3.4783
The HIGHEST Contribution of Amps Per Phase from the Heating Elements 3-Phase as Per Appendix C of AS-3000 Load Group G is 2.67 A.
lc =
2.6711
Any help appreciated.
Frank
1 commentaire
Stephen23
le 27 Août 2020
Déplacé(e) : Stephen23
le 29 Jan 2023
@Frank Lehmann : most likely you have not defined or called the functions correctly. But because we do not have these functions and scripts, we cannot debug them. If you want further help, please upload your code by clicking the paperclip button.
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!