Solved


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

mer än 3 år ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

mer än 3 år ago

Solved


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

mer än 3 år ago

Solved


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

mer än 3 år ago

Solved


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

mer än 3 år ago

Solved


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

mer än 3 år ago

Solved


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

mer än 3 år ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

mer än 3 år ago

Solved


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

mer än 3 år ago

Solved


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

mer än 3 år ago

Solved


Saving MATLAB session to a file
How to save MATLAB session to a file?

mer än 3 år ago

Solved


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


Find supported functions
Given a function name, return true if that function is supported by the toolboxes that are installed with MATLAB on this machine...

mer än 3 år ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

mer än 3 år ago

Solved


Will there be a new leader?
Simply answer the title.

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


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

mer än 3 år ago

Solved


Where is she?
Given the numbers 12, 3, 6, 9 Tell where the girl is located. That is: Look to your 3 o'clock = look right Example ...

mer än 3 år ago

Solved


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

mer än 3 år ago

Solved


Remove the Zero
Given an array n, remove all zeros

mer än 3 år ago

Solved


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

mer än 3 år ago

Solved


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

mer än 3 år ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

mer än 3 år ago

Load more