Memuat
Memuat
PCA (pca) for Robotics and Mechatronics
0 views
Build PCA model to predict the activity type from the X-axis acceleration and Y-axis angular rate features on synthetic data. pca reduces dimensionality by transforming correlated variables into uncorrelated principal components ordered by variance. It is used to summarise many variables, reduce multicollinearity, and visualise multivariate data.

Build PCA model to predict the activity type from the X-axis acceleration and Y-axis angular rate features on synthetic data.
| Role | Variable | Unit |
|---|---|---|
| Main | Activity type | - |
| Supporting 1 | X-axis acceleration | m/s² |
| Supporting 2 | Y-axis angular rate | rad/s |
Two principal components explain 89.2% of the variance (PC1 57.2%, PC2 31.9%) across five variables including Activity type, X-axis acceleration and Y-axis angular rate; 3 components are needed to reach 90%.
Computed from illustrative synthetic data, not from a real study.
pca reduces dimensionality by transforming correlated variables into uncorrelated principal components ordered by variance. It is used to summarise many variables, reduce multicollinearity, and visualise multivariate data.
Report the variance explained by each component, the number retained, and the main loadings. Name components by their dominant variables, taking care not to over-interpret.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
rng(9);
n = 300;
f1 = randn(n, 1); f2 = randn(n, 1);
x_axis_acceleration = f1 + 0.3*randn(n, 1);
y_axis_angular_rate = f1 + 0.3*randn(n, 1);
x3 = f2 + 0.3*randn(n, 1);
x4 = f2 + 0.3*randn(n, 1);
x5 = randn(n, 1);
activity_type = [x_axis_acceleration y_axis_angular_rate x3 x4 x5];
Z = zscore(activity_type);
[coeff, score, latent, ~, explained] = pca(Z);
cum = cumsum(explained);
fprintf('Explained (%%): %s\n', mat2str(explained', 3));
fprintf('Cumulative (%%): %s\n', mat2str(cum', 3));
k = find(cum >= 90, 1);
fprintf('Components for 90%%: %d\n', k);
disp(array2table(coeff(:, 1:2), 'VariableNames', {'PC1', 'PC2'}, ...
'RowNames', {'x1', 'x2', 'x3', 'x4', 'x5'}));
figure;
subplot(1,2,1); plot(explained, '-o'); xlabel('Component'); ylabel('Variance explained (%)');
subplot(1,2,2); biplot(coeff(:, 1:2), 'Scores', score(:, 1:2), 'VarLabels', {'x1', 'x2', 'x3', 'x4', 'x5'});Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$19
excl. 11% VAT
Duration: 3 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$56
excl. 11% VAT
Duration: 7 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$122
excl. 11% VAT
Duration: 12-15 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. PCA (pca) is commonly used at this level in Robotics and Mechatronics. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output MATLAB gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$19, Package 2 (your data analysis and interpretation) US$56 and Package 3 (full guidance) US$122, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. MATLAB is a trademark of The MathWorks, Inc.
Back to MATLAB portfolio