Memuat
Memuat
Linear Regression with fitlm for Civil and Structural Engineering
0 views
Model concrete compressive strength as a function of water-cement ratio and concrete age with Linear Regression with fitlm. fitlm builds a linear regression model from a data table and provides coefficients, significance tests, R2, and residual diagnostics. It suits theses that test the effect of several predictors on one response.

Model concrete compressive strength as a function of water-cement ratio and concrete age with Linear Regression with fitlm.
| Role | Variable | Unit |
|---|---|---|
| Main | concrete compressive strength | MPa |
| Supporting 1 | water-cement ratio | - |
| Supporting 2 | concrete age | hari |
Linear regression of concrete compressive strength on water-cement ratio and concrete age yields an R-squared of 0.943 (adjusted 0.943) and RMSE 0.401; the coefficients are water-cement ratio=1.792 and concrete age=-1.596 with 95% confidence intervals excluding zero.
Computed from illustrative synthetic data, not from a real study.
fitlm builds a linear regression model from a data table and provides coefficients, significance tests, R2, and residual diagnostics. It suits theses that test the effect of several predictors on one response.
Report coefficients with standard errors, p-values, confidence intervals, adjusted R2, and the model F test. Discuss assumption violations and influential observations (Cook's distance) if any.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
rng(1);
n = 150;
water_cement_ratio = 50 + 10*randn(n, 1);
concrete_age = 20 + 5*randn(n, 1);
concrete_compressive_strengt = 5 + 0.8*water_cement_ratio - 1.2*concrete_age + 4*randn(n, 1);
tbl = table(water_cement_ratio, concrete_age, concrete_compressive_strengt, 'VariableNames', {'water_cement_ratio', 'concrete_age', 'concrete_compressive_strengt'});
mdl = fitlm(tbl, 'concrete_compressive_strengt ~ water_cement_ratio + concrete_age');
disp(mdl);
fprintf('R2 = %.3f, adjusted R2 = %.3f, RMSE = %.3f\n', ...
mdl.Rsquared.Ordinary, mdl.Rsquared.Adjusted, mdl.RMSE);
disp(coefCI(mdl));
disp(anova(mdl, 'summary'));
[~, pSW] = lillietest(mdl.Residuals.Raw);
fprintf('Residual normality (Lilliefors) p = %.3f\n', pSW);
figure;
subplot(1,3,1); plotResiduals(mdl, 'probability');
subplot(1,3,2); plotResiduals(mdl, 'fitted');
subplot(1,3,3); plot(mdl.Fitted, tbl.concrete_compressive_strengt, '.'); hold on; refline(1, 0);
xlabel('Fitted'); ylabel('Actual');Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$22
excl. 11% VAT
Duration: 3 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$63
excl. 11% VAT
Duration: 7 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$141
excl. 11% VAT
Duration: 12-15 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Linear Regression with fitlm is commonly used at this level in Civil and Structural Engineering. 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$22, Package 2 (your data analysis and interpretation) US$63 and Package 3 (full guidance) US$141, 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