8 years, 2 days

## How to get multiple outputs from a proce...

Maple

What is the best way to export/update multiple values from a single procedure? As far as I understand, a procedure does not let you update global values (the inputs), and it returns the value for the last step performed. Let's say for example, I had a procedure like this:

proc(a,b,c)

local x,y;

*series of steps that use a,b, and c to calculate x and y*

end proc

How do I get the results for x and y out of the procedure?

Thanks

## Hourly simulation using iterative series...

Maple 2015

I am trying to do an hourly simulation of a solar-thermal system. The method I am using requires an inital guess for a value which is used in a series of equations. That variable is then back calculated, and checked against the initial guess. If it is too far off, the back calculated value is used as the new guess and so on...

My question is twofold. First, is there a way to create a sort of module that can execute a number of steps when called upon (i.e. the iterative process described above). Second, how can I run this for each hour of the year (the weather inputs for each hour will change) without manually executing each one, one at a time. So far my guess is to make a matrix with the weather inputs for each hour, and then have some sort of loop read the rows (hours) one at a time, pull the data from it, run the series of steps, and then store the output for that hour in a new matrix. Is this the best way to do this? If so, which functions/tools in Maple should I look into that can do this for me?

Thanks.

 Page 1 of 1
﻿