Running a Function of 3 Variables

3 Ansichten (letzte 30 Tage)
Scott Telford
Scott Telford am 25 Okt. 2014
Kommentiert: Rick Rosson am 25 Okt. 2014
Hi all,
I currently have written a piece of code in which 3 variables are run through a series of equations and a final value at the end is determined. For information, the 3 variables are:
Thickness, Height and Channel Gap.
I am wanting my function to include every single combination of these 3 variables. For each variable there are 20 values, so this is a large number of combinations. Ideally at the end of the function, a graph will be plotted which shows the final value at the end of the function compared to each combination. This will enable me to find the most efficient design for the component I am producing.
I am fairly inexperienced with Matlab and have tried to use the 'For x1 = 1:20 For x2 = 1:20 For x3 = 1:20' command however I cannot get this to work correctly.
I can provide a copy of the code if this will help you to answer my question. Please don't hesitate to ask any questions.
Thanks in advance!
  2 Kommentare
Geoff Hayes
Geoff Hayes am 25 Okt. 2014
Scott - you mentioned that you tried to use three for loops, and it didn't work correctly. Please elaborate and describe what the problem is. Was there a particular error or..?
Rick Rosson
Rick Rosson am 25 Okt. 2014
Yes, please post your code.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by