Area total area Function
显示 更早的评论
Hello guys, Matlab rookie here
How can I make a function with 2 variables that will give me total area.
I am aware, there is no need for this function when I can get my answer by using simply Totalweight=dot(Area,Lenght); , reason I want it to work as a function is I am writing a ga(genetic algorithm) function and this will be my Objective function.
this is what I got so far:
function Totalweight(Area,Lenght)
Lenght=[110 110 110 110 110 155 155 110 155 155]; Area=[110 110 110 110 110 155 155 110 155 155];
Totalweight=dot(Area,Lenght); end
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Pulse and Transition Metrics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!