Solved


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

más de 1 año ago

Solved


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

más de 1 año ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

más de 1 año ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

más de 1 año ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

más de 1 año ago

Question


How to combine the result of for loop?
Here is a very simple line of code: x = 3; A = 1:x; for i = 1:length(A) y = repelem(A(:,i),i); Y = y(1,:) end I w...

más de 1 año ago | 1 answer | 0

1

answer

Solved


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

más de 1 año ago

Solved


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

más de 1 año ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

más de 1 año ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

más de 1 año ago

Problem


Basic Operation with the middle number of odd matrix
# Take an odd matrix *like* 3-by-3 # Access the *middle element* of the matrix i.e in case of 3-by-3 matrix the index of the pa...

más de 1 año ago | 1 | 18 solvers

Question


Sum and Difference across row and column
Let say there is square matrix of order n-by-n, and n is odd integer A = rand(3) A = 0.4218 0.9595 0.8491 0...

más de 1 año ago | 2 answers | 0

2

answers

Solved


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

más de 1 año ago

Solved


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

más de 1 año ago

Solved


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

más de 1 año ago

Solved


Add two numbers
Add two numbers (For beginners)

más de 1 año ago

Solved


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

más de 1 año ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

más de 1 año ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

más de 1 año ago

Solved


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

más de 1 año ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

más de 1 año ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

más de 1 año ago

Solved


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

más de 1 año ago

Solved


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

más de 1 año ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

más de 1 año ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

más de 1 año ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

más de 1 año ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

más de 1 año ago

Solved


Return area of square
Side of square=input=a Area=output=b

más de 1 año ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

más de 1 año ago

Load more