MatLab Subroutine Capabilities for Calculations
2 ビュー (過去 30 日間)
古いコメントを表示
I would like to create a program and would like to know if MatLab can be programmed to do what I require.
If so, what is the best way to achieve the desired calculations that interact at different stages with one another.
Example Values:
Data Set 1
1.1 = 18.556732
1.2 = 25.433254
1.3 = 81.151712
1.4 = 96.304015
Data Set 2
2.1 = 18.556854
2.2 = 25.433242
2.3 = 81.152563
2.4 = 96.314000
Data Set 3
3.1 = 18.556844
3.2 = 25.433333
3.3 = 85.000000
3.4 = 96.313025
Desired Calculation:
Step 1 : Have the GUI ask the user the number of values in the first data set
- The user inputs 4
Step 2 : The GUI asks for the alphabetical level of precision required ("A", "B" or "C")
- The user inputs a letter
- That letter references conditions to be met and those conditions are assessed during the input of each data set.
Eg. The user inputs level "A"
Level "A" requires the following
- - The running SD (the SD is recalculated during the run time) for each relative input (1.1, 2.1, 3.1, etc)<= 1.5 .
- - The Maximum range between respective values of the datasets be <= 2
- - The number of data sets required be >= 10.
This is required for every instance of a new data set of values.
5 件のコメント
Walter Roberson
2018 年 3 月 9 日
Specifics are not code. Unless you have gone to the trouble of doing a complete functional breakdown with flow charts and careful interface definitions and data dictionaries and schemas, then your requirements probably do not need to be private.
採用された回答
Walter Roberson
2018 年 3 月 9 日
Prompting for values is not difficult in MATLAB.
Generating random values according to specifications is not necessarily difficult, but a lot depends on the kinds of constraints needed. Some kinds of constraints can be a bit tricky to do fairly, such as generating a list of numbers fairly under the condition that the list sums to a particular fixed value. Fairly choosing random permutations of fixed sets can require some work when the set size gets large enough that the entire class of choices does not fit in memory.
6 件のコメント
Walter Roberson
2018 年 3 月 9 日
Unzip this into a convenient directory and cd there in MATLAB. run the function named driver . This will give you a menu of options. script 1 is an example of a script calling a script. script 2 is a script called directly. function 1 is an example of a function calling a function. function 2 is an example of a function being called directly. function 3 is an example of a function calling a script (which is script 1, so it in turn invokes script 2).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!