Triple function composition - MATLAB Cody - MATLAB Central

Problem 5387. Triple function composition

Difficulty:Rate

Given three functions f,g and h, create the composed function y=f(g(h)).

Example

 f = @(x) x+1
 g = @(x) x/2
 h = @(x) x^2

And x1=8; x2=10; x3=1;

 y(x1) = 33
 y(x2) = 51
 y(x3) = 1.5

Solution Stats

45.22% Correct | 54.78% Incorrect
Last Solution submitted on Jun 27, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
3
3

Problem Recent Solvers47

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!