Resuelto


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

10 meses hace

Resuelto


Toeplitize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

10 meses hace

Resuelto


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

10 meses hace

Resuelto


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

10 meses hace

Resuelto


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

10 meses hace

Resuelto


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

10 meses hace

Resuelto


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

10 meses hace

Resuelto


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

10 meses hace

Resuelto


frame of the matrix
Given the matrix M, return M without the external frame.

10 meses hace

Resuelto


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

10 meses hace

Resuelto


A Binary Search
One way to locate a target value in a sorted array, is to use a binary search algorithm. Here, you test if the midpoint in the a...

10 meses hace

Resuelto


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

10 meses hace

Resuelto


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

10 meses hace

Resuelto


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

10 meses hace

Resuelto


Interpolated Value Between Two Points
Given two points, and , a new location x, and a method "linear" or "cubic", return the value of a linear or cubic interpolant t...

10 meses hace

Resuelto


Taylor Series
You can use a Taylor series to approximate common functions. The Taylor series for sin(x) is Using only the first several te...

10 meses hace

Resuelto


Calculate Angle From Axis
Given coordinates x and y, an axis ("X" or "Y"), and a direction ("cw" or "ccw", meaning clockwise and counterclockwise, respect...

10 meses hace

Resuelto


Generate Pascal's Triangle Matrix
Pascal's triangle is an arrangement of numbers where each value is the sum of the values adjacent to it in the previous row: ...

10 meses hace

Resuelto


Estimating Euler's (Oi-ler-z) Number
Euler's number is an irrational constant given by Starting with x=0, count the number of times you can add a uniformly distrib...

10 meses hace

Resuelto


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

10 meses hace

Resuelto


Where the Four Corners Am I? (Vectorized)
NOTE: this problem is intended to build on problem #55960 ("Where the Four Corners Am I?"). You may wish to solve that problem f...

10 meses hace

Resuelto


Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

10 meses hace

Resuelto


Generate Tribonacci Sequence
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

10 meses hace

Resuelto


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 exampl...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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)) ...

10 meses hace

Resuelto


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 ...

10 meses hace

Resuelto


String Logic 18
Examples: 'DIG' --> 'DG' 'IMPORTANT' --> 'IPRAT' 'DEAL' --> 'DA' 'LIMB' --> 'LM' 'MOSTLY' --> 'MSL'

10 meses hace

Resuelto


Calculate Lift Force on an Airfoil
Write a MATLAB function to calculate the lift force acting on an airfoil given the air density, wing area, velocity of the airfl...

10 meses hace

Cargar más