Gelöst


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

3 Monate vor

Gelöst


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

3 Monate vor

Gelöst


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

3 Monate vor

Gelöst


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

3 Monate vor

Gelöst


Divisible by 16
Write a function to determine if a number is divisible by 16. This can be done by a few different methods. Here are two: # If...

3 Monate vor

Gelöst


Find the position of planet in solarsystem
Write a funtion named *nthplanet* which takes name of the planet as input string and provides the position of the planet, starti...

3 Monate vor

Gelöst


Find smallest integer type to accommodate your number
MATLAB supports 1-, 2-, 4-, and 8-byte storage for integer data. Find the smallest integer type to accomodate a scalar integer. ...

3 Monate vor

Gelöst


How many points lie within the rectangle and how many aren't?
Suppose, you are given the coordinates of bottom-left and top-right corners of a rectangle as *input-1, R* i.e *R=[Bottom-left c...

3 Monate vor

Gelöst


Find The Difference
Vector x is given.calculate the difference between the biggest and the smallest number that we can create from elements of x. fo...

3 Monate vor

Gelöst


Count the non-zero elements along the diagonals that are immediately next to the main diagonal
Suppose, you are being told to write a matrix, *a* as input in MATLAB with having the possibility of containing zero and non-zer...

3 Monate vor

Gelöst


Parse string and identify specific string sequence in algebraic equation
Given a string S that defines an algebraic expression such as: S= 'X= A1 + A2*(Y1 + A3*Y3)*exp( A4*Y12 + Y1) ;' return a...

3 Monate vor

Gelöst


Find smallest number to leave a remainder of 1
given a vector of numbers, find the smallest number to be divisible by all of them with a remainder of 1. Note: input numbers wi...

3 Monate vor

Gelöst


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

3 Monate vor

Gelöst


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

3 Monate vor

Gelöst


Write a code to implement the improved Euler's method to integrate a simple function
Euler's method approximates the solution to a differential equation as where . It's possible to improve on Euler's method by ...

3 Monate vor

Gelöst


normalize group of numbers to integers
Hi guys! I have a group of 4 numbers x,y,z,w which comes from 4 integers multiplied with a common factor. [x,y,z,w] = c [i,j,k,l...

3 Monate vor

Gelöst


ICFP2024 001: Lambdaman 6
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...

3 Monate vor

Gelöst


Cycling — Normalized Power
In cycling, a power meter is an indispensable tool to record power output (in Watts) and measure fitness gains and performance m...

3 Monate vor

Gelöst


Bleed non-zeros to the right using REGEXP, and that sort of cheatcodess...
This one is quite similar to <http://www.mathworks.nl/matlabcentral/cody/problems/1998-bleed-non-zeros-to-the-right>. But thi...

3 Monate vor

Gelöst


String vowel manipulation
Given a string, find all the vowels and shift them to the end of the string in the same order as they are found.

3 Monate vor

Gelöst


Cell Source Index
Suppose that C is a cell array whose elements consist of row vectors of elements of the same type. For example, C could be a ce...

3 Monate vor

Gelöst


Backward Substitution
Solve a upper triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

3 Monate vor

Gelöst


Wind outward from the center ...
Create an n-by-n matrix with elements ranging from 1 to n^2 in a rectangular spiral pattern. Example if n = 5 : 21 ...

3 Monate vor

Gelöst


The average of the second largest values
Given a matrix, find the average of the second largest values in each row. The same value does not exist on a row. Example: ...

3 Monate vor

Gelöst


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

3 Monate vor

Gelöst


Divisible by 12
Write a function to determine if a number is divisible by 12. Similar to the number six, this can be done by checking for divisi...

3 Monate vor

Gelöst


Divisible by 15
Write a function to determine if a number is divisible by 15. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

3 Monate vor

Gelöst


Divisible by 14
Write a function to determine if a number is divisible by 14. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

3 Monate vor

Gelöst


Divisible by 8
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

3 Monate vor

Gelöst


Divisible by 9
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

3 Monate vor

Mehr laden