
Alexander Ross
Followers: 0 Following: 0
Feeds
已解决
Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.
14 hours 前
已解决
Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...
15 hours 前
已解决
Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...
19 hours 前
已解决
Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function
19 hours 前
已解决
Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]
21 hours 前
已解决
Find all repeated numbers
For a given vector, find all numbers that repeated 2 times or more than 2 times. Example: A=[1 2 3 3 4 5 6 6 7] y=[3 ...
21 hours 前
已解决
Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...
22 hours 前
已解决
Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...
22 hours 前
已解决
Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...
1 day 前
已解决
Successive zeros (harder)
The problem is from Problem 45436, <https://www.mathworks.com/matlabcentral/cody/problems/45436-successive-zeros> Suppose n i...
2 days 前
已解决
Successive zeros
Suppose n is the number of digits a number contains. Now, 12032 - is a valid n=5 digit number. But 10023 - is defined as i...
2 days 前
已解决
Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.
2 days 前
已解决
Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...
2 days 前
已解决
Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...
3 days 前
已解决
Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...
3 days 前
已解决
Tony's trick for duplicating an mx1 vector n times
Without using repmat, or for loop, or concatenation, create a function to duplicate a vector, v, a specified number of times, n....
3 days 前
已解决
swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...
3 days 前
已解决
Maintain shape of logical-index mask
When using logical indexing into an array, MATLAB returns a vector output. For example, if A = magic(3); mask = logi...
3 days 前
已解决
Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...
3 days 前
已解决
Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...
3 days 前
已解决
Cull vector elements that contain a specified digit
Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and ...
3 days 前
已解决
Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...
3 days 前
已解决
Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.
3 days 前