Hi 9times6,
From what I understand, the goal is to work on with six independent parameters as you used the MATLAB command “ccdesign(6, 'type', 'circumscribed')” to generate a design of experiment. However, the values obtained from “ccdesign” do not match the range of your actual independent variables.
To replace these generated values with your actual values, you need to map the generated values to the desired range of each independent variable. One approach is to use scaling and shifting to transform the values.
Here's an example of how you can perform scaling and shifting:
- Generate the initial matrix using “ccdesign”:
matrix = ccdesign(6, 'type', 'circumscribed');
- Define the desired range for each independent variable. For example, if the speed of flow varies from 0 to 10:
flow_speed_range = [0, 10];
- Calculate the scaling factor and shifting factor for each variable. The scaling factor is given by:
scaling_factor = (flow_speed_range(2) - flow_speed_range(1)) / (max(matrix(:, i)) - min(matrix(:, i)));
The shifting factor is given by:
shifting_factor = flow_speed_range(1) - (min(matrix(:, i)) * scaling_factor);
- Iterate through each column of the generated matrix and apply the scaling and shifting factors to obtain the corresponding actual values for your independent variables:
for i = 1:size(matrix, 2)
actual_values(:, i) = (matrix(:, i) * scaling_factor) + shifting_factor;
end
Attached below are some documentation links that you may find helpful:
- Interpolation - MATLAB & Simulink (mathworks.com)
- Feature scaling - Wikipedia
- Data Pre Processing Techniques You Should Know | by Maneesha Rajaratne | Towards Data Science
Hope this helps!
Karan Singh Khati