Resuelto


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

casi 8 años hace

Resuelto


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

casi 8 años hace

Resuelto


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

casi 8 años hace

Resuelto


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

casi 8 años hace

Resuelto


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

casi 8 años hace

Resuelto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

casi 8 años hace

Resuelto


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

casi 8 años hace

Resuelto


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

casi 8 años hace

Resuelto


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

casi 8 años hace

Resuelto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

casi 8 años hace

Resuelto


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): Once a mont...

casi 8 años hace

Resuelto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

casi 8 años hace

Resuelto


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

casi 8 años hace

Resuelto


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

casi 8 años hace

Resuelto


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

casi 8 años hace

Resuelto


Binary Coder
Take an input number and print the binary value of this number.

casi 8 años hace

Resuelto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

casi 8 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 8 años hace

Resuelto


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

casi 8 años hace

Resuelto


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

casi 8 años hace

Resuelto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

casi 8 años hace

Resuelto


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

casi 8 años hace

Resuelto


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

casi 8 años hace

Resuelto


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

casi 8 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 8 años hace

Resuelto


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

casi 8 años hace

Resuelto


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

casi 8 años hace

Resuelto


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

casi 8 años hace

Cargar más