Resuelto


y equals x divided by 2
function y = x/2

10 meses hace

Resuelto


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

10 meses hace

Resuelto


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

10 meses hace

Resuelto


Spherical Volume
Calculate the volume of a sphere.

10 meses hace

Resuelto


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

10 meses hace

Resuelto


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

10 meses hace

Resuelto


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

10 meses hace

Resuelto


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

10 meses hace

Resuelto


square root
Find the square root (y) of an input (x).

10 meses hace

Resuelto


Find the minimum of the column-maximums of a matrix
Given a matrix A, find the maximum value of each column, then return the smallest of those maximum values (ie return the minimum...

10 meses hace

Resuelto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

11 meses hace

Resuelto


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

11 meses hace

Resuelto


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

11 meses hace

Resuelto


Square a Number
Given an input x, return y, which is equal to the square of x.

11 meses hace

Resuelto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

11 meses hace

Resuelto


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

11 meses hace

Resuelto


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

11 meses hace

Resuelto


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

11 meses hace

Resuelto


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

11 meses hace

Resuelto


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

11 meses hace

Resuelto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

11 meses hace

Resuelto


frame of the matrix
Given the matrix M, return M without the external frame.

11 meses hace

Resuelto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

11 meses hace

Resuelto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

11 meses hace

Resuelto


Draw a '0' in a one matrix!

11 meses hace

Resuelto


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

11 meses hace

Resuelto


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

11 meses hace

Resuelto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

11 meses hace

Resuelto


Force and Motion 2
Two robots are pulling on an object in opposite directions. One robot pulls with a force of F1 Newtons and the other with a forc...

11 meses hace

Resuelto


surface of a spherical planet
you just discovered its circumference, that is the input.

11 meses hace

Cargar más