Resuelto


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

casi 9 años hace

Resuelto


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

casi 9 años hace

Resuelto


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

casi 9 años hace

Resuelto


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

casi 9 años hace

Resuelto


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

casi 9 años hace

Resuelto


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

casi 9 años hace

Resuelto


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

casi 9 años hace

Resuelto


Potential Energy
Calculate the potential energy of a rock.

casi 9 años hace

Resuelto


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

casi 9 años hace

Resuelto


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

casi 9 años hace

Resuelto


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

casi 9 años hace

Resuelto


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

casi 9 años hace

Resuelto


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

casi 9 años hace

Resuelto


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

casi 9 años hace

Resuelto


Positive Infinity
Round the array a towards positive infinity

casi 9 años hace

Resuelto


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

casi 9 años hace

Resuelto


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

casi 9 años hace

Resuelto


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

casi 9 años hace

Resuelto


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

casi 9 años hace

Resuelto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

casi 9 años hace

Resuelto


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

casi 9 años hace

Resuelto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

casi 9 años hace

Resuelto


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

casi 9 años hace

Resuelto


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

casi 9 años hace

Resuelto


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

casi 9 años hace

Resuelto


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

casi 9 años 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...

casi 9 años hace

Resuelto


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

casi 9 años hace

Resuelto


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

casi 9 años hace

Resuelto


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

casi 9 años hace

Cargar más