Resuelto


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

3 meses hace

Resuelto


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

3 meses hace

Resuelto


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

3 meses hace

Resuelto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

3 meses hace

Resuelto


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

3 meses hace

Resuelto


Who Holds the Lord Ned Challenge Shield?
During the Nedball Premier League regular season, each of the n teams plays each of the other (n-1) teams twice, once at home an...

3 meses hace

Resuelto


Sum of first n positive integers
Given n, find the sum of first n positive integers Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55

3 meses hace

Resuelto


factorial of a number x
Factorial of a number x

3 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

3 meses hace

Resuelto


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

3 meses hace

Resuelto


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

3 meses hace

Resuelto


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

3 meses hace

Resuelto


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

3 meses hace

Resuelto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

3 meses hace

Resuelto


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

3 meses hace

Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

3 meses hace

Resuelto


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

3 meses hace

Resuelto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

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

3 meses hace

Resuelto


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

3 meses hace

Resuelto


Weighted moving average
x1=[1 2 1]; y1=[1 2 2 4 5 6 6 8]; Make function for weighted moving average. z(i)=(x1(i)*y1(i)+x1(i+1)*y1(i+1)+x1(i+2)*y1...

3 meses hace

Resuelto


Solve the system of linear equations
4x - 2y +6z=8 2x + 8y +2z=4 6x + 10y +3z=0 Input is each coefficient of polynomial. For example, a=[4 ...

3 meses hace

Resuelto


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

3 meses hace

Resuelto


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

3 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

3 meses hace

Resuelto


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cornelius...

3 meses hace

Resuelto


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

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

3 meses hace

Resuelto


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

3 meses hace

Resuelto


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

3 meses hace

Cargar más