Running a Function of 3 Variables

1 回表示 (過去 30 日間)
Scott Telford
Scott Telford 2014 年 10 月 25 日
コメント済み: Rick Rosson 2014 年 10 月 25 日
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 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 10 月 25 日
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 2014 年 10 月 25 日
Yes, please post your code.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by