Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

7 years ago

Solved


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

7 years ago

Solved


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

7 years ago

Solved


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

7 years ago

Solved


only input
Return the output without writing any code into the function.

7 years 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];

7 years ago

Solved


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

7 years ago

Solved


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

7 years ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

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

7 years ago

Answered
randomly divide a matrix
Hello Dear, Use this code. I've generated a random matrix of the same order that you want. I have randomized all the rows of ...

7 years ago | 3

Answered
compare and calculate two excel sheet
Hello Huitian Mao, I hope this will be helpful. I've attached a sample excel sheet of gender and income too. Change the locat...

7 years ago | 2

| accepted

Answered
Plotting Animation Help Needed
Hello Dear, Use this code. If you want make necessary changes as per your requirements. clc; close all; clear all; a...

7 years ago | 1

| accepted

Submitted


Sliding Box Animation
A simple demonstration of animation in matlab

7 years ago | 1 download |

Thumbnail

Solved


what is sin of 0
what is sin of 0

7 years ago

Solved


Area of square
find the area of the square, whose length of diagonal is given as x.

7 years ago

Answered
Adding new values to an array using a loop
Hello Dear, I have modified your code. Now it is working as per your requirement. n_axles = input('define amount of axl...

7 years ago | 1

| accepted

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

7 years ago

Answered
How can i match a value in variable with data stored in database?
Hello Dear, Use this code with some changes as per your requirement: clc; clear all X = [1 323 2 44 3 66 77 88 2 1 2 3 ...

7 years ago | 1

| accepted

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

7 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

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

7 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

7 years ago

Solved


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

7 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

7 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

7 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

7 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

7 years ago

Answered
How can I remove the boundary(only) of this image?
Hello Dear, As you mentioned that you already know about loop warping on all sides, have a look at my approach. I hope you wi...

7 years ago | 2

Load more