Community Profile

# Jiang Senmiao

##### Last seen: etwa ein Monat ago
458 total contributions since 2021

Shanghai, Athens, Orjestad. Passed the exam by solving a lot of problems on Cody.

View details...

Contributions in
View by

Solved

Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

etwa ein Monat ago

Solved

Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

etwa ein Monat ago

Solved

Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

etwa ein Monat ago

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

etwa ein Monat ago

Solved

Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

etwa ein Monat ago

Solved

Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

etwa ein Monat ago

Solved

Divide pi
Divide pi by x!

etwa ein Monat ago

Solved

Multiply pi
Multiply pi with x!

etwa ein Monat ago

Solved

Find the distance traveled by a car given velocity and time.
A car is traveling at a constant velocity for a specific amount of time. The function should use the two inputs, velocity and ti...

etwa ein Monat ago

Solved

Speed of car travelling x meters in y seconds
What is the speed of a car if the car travelled x meters in y seconds? Supply the answer in m/s.

etwa ein Monat ago

Solved

A Simple Tide Gauge with MATLAB
*&#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767* You are standing in a few inches of sea water on a beach. You a...

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

etwa ein Monat ago

Solved

Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

etwa ein Monat ago

Solved

Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

etwa ein Monat ago

Solved

Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

etwa ein Monat ago

Solved

The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

etwa ein Monat ago

Solved

Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

etwa ein Monat ago

Solved

There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

etwa ein Monat ago

Solved

Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

etwa 2 Monate ago

Solved

Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

etwa 2 Monate ago

Solved

How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

etwa 2 Monate ago

Solved

Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

etwa 2 Monate ago

Solved

Nth root
Nth root of a number x

etwa 2 Monate ago

Solved

Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

etwa 2 Monate ago

Solved

Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

etwa 2 Monate ago

Solved

Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

etwa 2 Monate ago

Solved

Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

etwa 2 Monate ago

Solved

Sum two matrices
Take two incoming matrices, and sum them

etwa 2 Monate ago

Solved

easy problem
Find the last element of the array

etwa 2 Monate ago

Solved

square root
Find the square root (y) of an input (x).

etwa 2 Monate ago