Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


factorial of a number x
Factorial of a number x

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


Narcissistic problem
How many likes has this problem?

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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.

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Mehr laden