Community Profile

photo

Zhiyuan Lang


Last seen: 3달 전 2022 이후 활성

Statistics

  • CUP Challenge Master
  • Commenter
  • Solver

배지보기

Content Feed

보기 기준

해결됨


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

3달 전

해결됨


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

3달 전

해결됨


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

3달 전

해결됨


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

3달 전

해결됨


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

3달 전

해결됨


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

3달 전

해결됨


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

3달 전

해결됨


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

3달 전

해결됨


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

3달 전

해결됨


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

3달 전

해결됨


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

3달 전

해결됨


Energy Conversion 2

3달 전

해결됨


Velocity Conversion
Given a velocity in mph, convert it to km/h. Round the answer to the fourth decimal place.

3달 전

해결됨


Mass Conversion 2

3달 전

해결됨


Mass Conversion 1

3달 전

해결됨


Temperature Conversion 3

3달 전

해결됨


Temperature Conversion 2

3달 전

해결됨


Temperature Conversion 1

3달 전

해결됨


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

3달 전

해결됨


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

3달 전

해결됨


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

3달 전

해결됨


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

3달 전

해결됨


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

3달 전

해결됨


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

3달 전

해결됨


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

3달 전

해결됨


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

3달 전

해결됨


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달 전

해결됨


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

3달 전

해결됨


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

3달 전

해결됨


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

3달 전

더로드