Function to calculate two different output variables

2 views (last 30 days)
So originally I started with a code like this:
apples=sweet(core,hot,chicken)
pie=crust(taste,bake,rim)
apples.outside=sweet(core2,hot2,chicken2)
pie.outside=crust(taste2,bake2,rim2)
They both use the functions sweet and crust but and have the same number of input variables. What I want to do is combine them into one function. Here's what I tried to do
First=core,hot,chicken
First_out=taste,bake,rim
Second=core2,hot2,chicken2
Second_out=taste2,bake2,rim2
apples=sweet(first,second)
pie=crust(First_out,Second_out)
So instead of using the function two separate times, I use it once and calculate the input variables at the same time.

Answers (0)

Community Treasure Hunt

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

Start Hunting!