A résolu


Squares
Find the square of x.

2 mois il y a

A résolu


Addition
Add together the values of a and b.

2 mois il y a

A résolu


Addition II
find a+b+c+d

2 mois il y a

A résolu


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

2 mois il y a

A résolu


Draw '\'
Can you draw the sign '\' by zeros and ones? NOTICE: Be x-by-x matrix.

2 mois il y a

Problème


Draw '\'
Can you draw the sign '\' by zeros and ones? NOTICE: Be x-by-x matrix.

2 mois il y a | 0 | 14 solveurs

A résolu


Divisible by 5
Pursuant to the first problem in this series, this one involves checking for divisibility by 5. Write a function to determine i...

2 mois il y a

A résolu


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

2 mois il y a

A résolu


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

2 mois il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

2 mois il y a

A résolu


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

2 mois il y a

A résolu


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

2 mois il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

2 mois il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

2 mois il y a

A résolu


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

2 mois il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

2 mois il y a

A résolu


only input
Return the output without writing any code into the function.

2 mois il y a

A résolu


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

2 mois il y a

A résolu


Negative matrix
Change the sign of all elements in given matrix.

2 mois il y a

A résolu


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

2 mois il y a

A résolu


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

2 mois il y a

A résolu


Is my wife right?
Regardless of input, output the string 'yes'.

2 mois il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

2 mois il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

2 mois il y a

A résolu


Draw a '0' in a one matrix!

2 mois il y a

A résolu


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

2 mois il y a

A résolu


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

2 mois il y a

A résolu


Determine if a number is prime
Given a positive integer n, return 1 if it is prime, 0 otherwise. Example: is_prime(7) returns 1, is_prime(4) returns 0

2 mois il y a

A résolu


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

2 mois il y a

A résolu


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

2 mois il y a

Charger plus