MatLab Subroutine Capabilities for Calculations

1 view (last 30 days)
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
  1. - The running SD (the SD is recalculated during the run time) for each relative input (1.1, 2.1, 3.1, etc)<= 1.5 .
  2. - The Maximum range between respective values of the datasets be <= 2
  3. - The number of data sets required be >= 10.
This is required for every instance of a new data set of values.
Walter Roberson
Walter Roberson on 9 Mar 2018
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.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 9 Mar 2018
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.
Jay on 11 Mar 2018
Thank you for taking the time to write that up for me Walter.
It is greatly appreciated.
I will mark the post as answered and try to use the examples given to be used as subroutines.

Sign in to comment.

More Answers (0)


Find more on Install Products in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!