已解决


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

3 years 前

已解决


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

3 years 前

已解决


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


Area of rhombus
Calculate the rhombus area

3 years 前

已解决


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

3 years 前

已解决


ASCii Code
Using Matlab get the ASCii for '?'

3 years 前

已解决


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

3 years 前

已解决


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

3 years 前

已解决


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

3 years 前

已解决


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

3 years 前

已解决


convert matrix to single column
given any matrix, convert it to single column

3 years 前

已解决


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

3 years 前

已解决


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

3 years 前

已解决


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

3 years 前

已解决


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

3 years 前

已解决


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

3 years 前

已解决


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

3 years 前

已解决


convert between ascii and characters
I have seen multiple problems like this but none of them have a robust test suite associated with them. The first input C is ...

3 years 前

已解决


Brain Teaser Solver
Write an algorithm to solve this brain teaser: You have a square that is broken into four triangles, the area of three of tho...

3 years 前

已解决


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

3 years 前

已解决


Can the given sides form a triangle?
Can the three given sides form a triangle?

3 years 前

已解决


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

3 years 前

已解决


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

3 years 前

已解决


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

3 years 前

已解决


Calculate volume of box
Calculate the volume of box,hiven its sides

3 years 前

已解决


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

3 years 前

已解决


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

3 years 前

已解决


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

3 years 前

加载更多