Solved

MATLAB Basic: rounding IV

Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

2 months ago

Solved

MATLAB Basic: rounding III

Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

2 months ago

Solved

MATLAB Basic: rounding II

Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

2 months ago

Solved

MATLAB Basic: rounding

Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

2 months ago

Solved

Apply Function to Each Field of a Structure Array: Part 2

The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

2 months ago

Solved

Flexible Anonymous Function

Given a function handle, return a handle to a function that would accept an arbitrary number of inputs, applies the function to ...

2 months ago

Solved

Implement a counter

Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

2 months ago

Solved

Function composition - harder

Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

2 months ago

Solved

function on a moving window

Create a function that applies an operation (such as @sum, @mean, @std, @norm etc) to a moving window of the data. First exam...

2 months ago

Solved

Make an anonymous function that has variable output

Make a anonymous function that has variable output. f = @(x)... the following equation→equation(s) as followed has(ve) ...

2 months ago

Solved

Apply Function to Each Field of a Structure Array: Part 1

The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

2 months ago

Solved

First use of arrayfun() and anonymous function @(x)

Create an anonymous function using @(x) for a parabola equation for the given coefficients stored in s with s(1)x2 + s(2)x + s(...

2 months ago

Solved

Create a function handle that reverses the input arguments of another function handle

Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

2 months ago

Solved

Define the operators of function_handles

Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...

2 months ago

Solved

Two-output anonymous function?

Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

2 months ago

Solved

Handle to an array of functions

Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...

2 months ago

Solved

Apply a function array to an array of numbers

It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

2 months ago

Solved

Function composition

Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

2 months ago

Solved

Construct the Seidel-Entringer-Arnold triangle

Several problems in Cody ask us to construct part or all of triangles in which entries follow a pattern. Cody Problems <https://...

2 months ago