已解决


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

1 year 前

已解决


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

1 year 前

已解决


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

1 year 前

已解决


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

1 year 前

已解决


Positive Infinity
Round the array a towards positive infinity

1 year 前

已解决


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

1 year 前

已解决


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

1 year 前

已解决


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

1 year 前

已解决


factorial of a number x
Factorial of a number x

1 year 前

已解决


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

1 year 前

已解决


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

1 year 前

已解决


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

1 year 前

已解决


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

1 year 前

已解决


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

1 year 前

已解决


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

1 year 前

已解决


reverse string
input='rama' output='amar'

1 year 前

已解决


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

1 year 前

已解决


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

1 year 前

已解决


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

1 year 前

已解决


Narcissistic problem
How many likes has this problem?

1 year 前

已解决


angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input. Please pay attention, that 1 ...

1 year 前

已解决


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

1 year 前

已解决


Will there be a new leader?
Simply answer the title.

2 years 前

已解决


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

2 years 前

已解决


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

2 years 前

已解决


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

2 years 前

已解决


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

2 years 前

已解决


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

2 years 前

已解决


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

2 years 前

已解决


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

2 years 前

加载更多