Community Profile

photo

Suhan Gui

MathWorks

Last seen: 2 mesi ago Active since 2021

Statistics

  • Commenter
  • Promoter
  • Solver

View badges

Content Feed

View by

Solved


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

2 mesi ago

Solved


Convert radians to degrees
Given input in radians, output to degrees

2 mesi ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

2 mesi ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

2 mesi ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

2 mesi ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

2 mesi ago

Solved


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

2 mesi ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

2 mesi ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

2 mesi ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

2 mesi ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

2 mesi ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

2 mesi ago

Solved


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

2 mesi ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

2 mesi ago

Solved


Spherical Volume
Calculate the volume of a sphere.

2 mesi ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

3 mesi ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

3 mesi ago

Solved


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

3 mesi ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

3 mesi ago

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

3 mesi ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

3 mesi ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

3 mesi ago

Solved


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

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

3 mesi ago

Solved


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

3 mesi ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

3 mesi ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

3 mesi ago

Solved


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

3 mesi ago

Solved


Return area of square
Side of square=input=a Area=output=b

3 mesi ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

3 mesi ago

Load more