Error message on titled layout code
Mostrar comentarios más antiguos
I would like to print all graphs together. For that I use the following code.
titledlayout(6,1)
% First plot - exponential vs. normal distribution
ax1 = nexttile;
qqplot(ax1, expo_r, normal_r)
title (ax1, 'Q- Q Plot for Exponential Dist. vs Normal Dist.')
xlabel (ax1, 'Exponential Dist.')
ylabel (ax1, 'Normal Dist.')
% Second plot - exponential vs. lognormal distribution
ax2 = nexttile;
qqplot(ax2, expo_r, lognormal_r)
title (ax2, 'Q- Q Plot for Exponential Dist. vs Logormal Dist.')
xlabel (ax2, 'Exponential Dist.')
ylabel (ax2, 'Logormal Dist.')
% Third plot - exponential vs. Gamma distribution
ax3 = nexttile;
qqplot(ax3, expo_r, gamma_r)
title (ax3, 'Q- Q Plot for Exponential Dist. vs Gamma Dist.')
xlabel (ax3, 'Exponential Dist.')
ylabel (ax3, 'Gamma Dist.')
% Fourth plot - Normal vs. Lognormal distribution
ax4 = nexttile;
qqplot(ax4, normal_r, lognormal_r)
title (ax4, 'Q- Q Plot for Normal Dist. vs Lognormal Dist.')
xlabel (ax4, 'Normal Dist.')
ylabel (ax4, 'Lognormal Dist.')
% Fifth plot - Normal vs. Gamma distribution
ax5 = nexttile;
qqplot(ax5, normal_r, gamma_r)
title (ax5, 'Q- Q Plot for Normal Dist. vs Gamma Dist.')
xlabel (ax5, 'Normal Dist.')
ylabel (ax5, 'Gamma Dist.')
% Sixth plot - Lognormal vs. Gamma distribution
ax6 = nexttile;
qqplot(ax6, lognormal_r, gamma_r)
title (ax6, 'Q- Q Plot for Lognormal Dist. vs Gamma Dist.')
xlabel (ax6, 'Logormal Dist.')
ylabel (ax6, 'Gamma Dist.')
However, I get the following error message and I cannot see graphs
Undefined function or variable 'titledlayout'.
Error in example_work_file (line 75)
titledlayout(6,1)
How can I correct my code? Please help me. Thanks a lot.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Gamma Distribution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!