Risolto


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

circa 3 anni fa

Risolto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

circa 3 anni fa

Risolto


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

circa 3 anni fa

Risolto


Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...

circa 3 anni fa

Risolto


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

circa 3 anni fa

Risolto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

circa 3 anni fa

Risolto


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

circa 3 anni fa

Risolto


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

circa 3 anni fa

Risolto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

circa 3 anni fa

Risolto


Reverse a matrix
Its simple. You have to reverse a given matrix.

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

circa 3 anni fa

Risolto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

circa 3 anni fa

Risolto


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

circa 3 anni fa

Risolto


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

circa 3 anni fa

Risolto


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

circa 3 anni fa

Risolto


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

circa 3 anni fa

Risolto


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

circa 3 anni fa

Risolto


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

circa 3 anni fa

Risolto


Determine the square root
Determine the square root of the value the user has entered, n.

circa 3 anni fa

Risolto


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

circa 3 anni fa

Risolto


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

circa 3 anni fa

Risolto


Log of a number
Write a script that will give the log of x as output.

circa 3 anni fa

Risolto


Square root of a number
Write a code that will output the square root of x.

circa 3 anni fa

Risolto


Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

circa 3 anni fa

Risolto


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

circa 3 anni fa

Risolto


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

circa 3 anni fa

Carica altro