Community Profile

# Doddy Kastanya

580 2017 年以降の合計貢献数

#### Doddy Kastanya's バッジ

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

8ヶ月 前

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

1年以上 前

Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

1年以上 前

Square a Number
Given an input x, return y, which is equal to the square of x.

1年以上 前

y equals x divided by 2
function y = x/2

1年以上 前

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

1年以上 前

03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

1年以上 前

Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

1年以上 前

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

1年以上 前

generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

1年以上 前

Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

1年以上 前

Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

1年以上 前

Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

1年以上 前

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

1年以上 前

Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

1年以上 前

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

1年以上 前

matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

1年以上 前

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

1年以上 前

Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

1年以上 前

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

1年以上 前

row removal
Consider a matrix and remove the first row of the matrix.

1年以上 前

Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

1年以上 前

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

1年以上 前

Second Diagonal
Transpose the matrix from it's second diagonal.

1年以上 前

Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

1年以上 前

Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

1年以上 前

Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

1年以上 前

Perfect square.
Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

1年以上 前

Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

1年以上 前

basic matrix operations: rotate and find sum of diagonal elements of the resultant matrix
For given input matrix a, rotate it by 90 degrees and find the sum of the diagonals. Example: Input: a = 1 ...

1年以上 前