Community Profile

photo

Heena Divecha


Last seen: 2 Monate ago
49 total contributions since 2019

Heena Divecha's Badges

  • Community Group Solver
  • Introduction to MATLAB Master
  • Solver

View details...

Contributions in
View by

Solved


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

7 Monate ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

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

8 Monate ago

Solved


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

8 Monate ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

8 Monate ago

Solved


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

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

8 Monate ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

8 Monate ago

Solved


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

11 Monate ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

12 Monate ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

12 Monate ago

Solved


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

etwa ein Jahr 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...

etwa ein Jahr ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

etwa ein Jahr ago

Solved


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

etwa ein Jahr ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

etwa ein Jahr ago

Solved


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

etwa ein Jahr ago

Solved


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

etwa ein Jahr 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.

etwa ein Jahr ago

Solved


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

etwa ein Jahr ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

etwa ein Jahr ago

Solved


Find max
Find the maximum value of a given vector or matrix.

etwa ein Jahr ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

etwa ein Jahr ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

etwa ein Jahr ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

etwa ein Jahr ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

etwa ein Jahr ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

etwa ein Jahr ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

etwa ein Jahr ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

etwa ein Jahr 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...

etwa ein Jahr ago

Load more