1,362 total contributions since 2016

Professional Interests: Model-Based Design

Solved

Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.

--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

12 days ago

Solved

Solve a System of Linear Equations

*Example*: If a system of of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _xS...

14 days ago

Solved

Calculate a Damped Sinusoid

The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

14 days ago

Solved

Crop an Image

A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. The element values ...

14 days ago

Solved

Find the Best Hotels

Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

14 days ago

Solved

Convert from Fahrenheit to Celsius

Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

15 days ago

Solved

Repeat elements of a vector

Repeat each elements of a given vector according to their values. say x=[1,2,1,3] y=[1,2,2,1,3,3,3]

15 days ago

Solved

Given a vector x, return vector y with all negative elements from the vector x.

Given a vector x, return vector y with all negative elements from the vector x if x has negative elements. Otherwise return 0. ...

16 days ago

Solved

Takuzu row

Takuzu row is one row in a logic puzzle of a rectangular grid. The rules are as follows: (1) The row is filled with 1s and 0s...

18 days ago

Solved

Remove element(s) from cell array

You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

23 days ago

Solved

Create a "+" flag

Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

25 days ago

Solved

create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last row's elements are the summation of the elements of all the other rows; where 'n' is the size of the input matrix 'x'.

for example x=[1 2 3;4 5 6;7 8 9] then y=[1 2 3 6; 4 5 6 15; 7 8 9 24; 12 15 18 45]

25 days ago

Solved

Check prime numbers

Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

27 days ago

Solved

the average value of the elements

Calculate the average value of the elements in the array

27 days ago

Solved

Write a code to give student grade

Write a code to give student ' pass' grade if he/she gets more than 49 in the exam, and 'fail' grade otherwise. ''Many of lif...

5 months ago