Gelöst


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

etwa 5 Jahre vor

Gelöst


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

etwa 5 Jahre vor

Gelöst


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

etwa 5 Jahre vor

Gelöst


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


Divisible by 13
Write a function to determine if a number is divisible by 13. Similar to the number seven, this can be done by a few different m...

etwa 5 Jahre 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...

etwa 5 Jahre 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...

etwa 5 Jahre vor

Frage


Need help for Cody Problem 42409: Divisible by 7
Hi! I am new in Matlab programing. I try to learn this language through cody problem. But I couldn't solve this problem for a lo...

etwa 5 Jahre vor | 1 Antwort | 0

1

Antwort

Gelöst


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

etwa 5 Jahre vor

Gelöst


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

etwa 5 Jahre vor

Gelöst


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

etwa 5 Jahre vor

Gelöst


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

etwa 5 Jahre vor

Gelöst


Sum! Sum! Sum!
Calculate the sum of the sequence up to nth term >> a,aa,aaa,aaaa,... 2,22,222,2222,... [for a=2]

etwa 5 Jahre vor

Gelöst


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

etwa 5 Jahre vor

Gelöst


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

etwa 5 Jahre vor

Gelöst


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

etwa 5 Jahre vor

Gelöst


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

etwa 5 Jahre vor

Gelöst


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

etwa 5 Jahre vor

Gelöst


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

etwa 5 Jahre vor

Gelöst


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

etwa 5 Jahre vor

Gelöst


Find the sum of n squares
What is the sum of the squares of the first n integers?

etwa 5 Jahre vor

Gelöst


Find Logic 18

etwa 5 Jahre vor

Gelöst


Find Logic 19

etwa 5 Jahre vor

Gelöst


Total energy

etwa 5 Jahre vor

Gelöst


Potential energy calculation

etwa 5 Jahre vor

Gelöst


Kinetic energy calculation

etwa 5 Jahre vor

Gelöst


Laws of motion 6

etwa 5 Jahre vor

Gelöst


Laws of motion 5

etwa 5 Jahre vor

Gelöst


Laws of motion 4

etwa 5 Jahre vor

Mehr laden