Community Profile

# Maryam Majidi

##### Last seen: 約2ヶ月 前
477 2018 年以降の合計貢献数

#### Maryam Majidi's バッジ

Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

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

Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

0<=x<=pi?
Check whether the given angle is between zero and pi. Return logical true or false.

Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

Sum two matrices
Take two incoming matrices, and sum them

N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n Ex: input = [1 2 3 4 5...

Make an identity matrix whose diagonal elements are 1:n
For a given input n, make an n by n identity matrix that contains the elements 1:n along its diagonal. For example, if input=5: ...

Take two incoming vectors and output the sum of the two vectors

Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

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

06 - Matrix Equations 3
Define the matrices _aMat_, _bMat_, and _cMat_: <<http://samle.dk/STTBDP/Assignment1_3a.png>> ( _aMat_ = 9x9 matrix full o...