Running a Function of 3 Variables

1 visualizzazione (ultimi 30 giorni)
Scott Telford
Scott Telford il 25 Ott 2014
Commentato: Rick Rosson il 25 Ott 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 Commenti
Geoff Hayes
Geoff Hayes il 25 Ott 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 il 25 Ott 2014
Yes, please post your code.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by