문제를 풀었습니다


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

거의 4년 전

문제를 풀었습니다


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

거의 4년 전

문제를 풀었습니다


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


Rounding
Round 10.67 and make 'y' equal to that number.

거의 4년 전

문제를 풀었습니다


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

거의 4년 전

문제를 풀었습니다


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

거의 4년 전

문제를 풀었습니다


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

거의 4년 전

문제를 풀었습니다


Complex number
For complex number c=a+bi, write code that will add a and b together.

거의 4년 전

문제를 풀었습니다


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

질문


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

거의 4년 전 | 답변 수: 1 | 0

1

답변

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제


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

거의 4년 전 | 1 | 솔버 수: 26

질문


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

거의 4년 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


Add two numbers
Add two numbers (For beginners)

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


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

거의 4년 전

더 보기