Programming Languages:
MATLAB
Spoken Languages:
English, Arabic
MATLAB
Spoken Languages:
English, Arabic
統計
All
Feeds
解決済み
Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...
2年以上 前
解決済み
Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...
2年以上 前
解決済み
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
2年以上 前
解決済み
Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...
2年以上 前
解決済み
Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...
2年以上 前
解決済み
First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...
2年以上 前
解決済み
Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The values of B are in the same order a...
2年以上 前
解決済み
Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...
2年以上 前
解決済み
Oh Zero Zero Zero!!!
Hello all, So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...
2年以上 前
質問
how to index the stating position of something?
Hi, I was solving a question that asks to find the length of the largest section of zeros and its starting postion. Example: x...
2年以上 前 | 4 件の回答 | 0
4
回答解決済み
Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...
2年以上 前
解決済み
Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...
2年以上 前
解決済み
Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...
2年以上 前
解決済み
Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
2年以上 前
質問
I don't know how to include specific conditions in my code
Hi all, There's a cody problem that asks to find the last zero for each column for a given numeric array of any size. And if a ...
2年以上 前 | 1 件の回答 | 0
1
回答解決済み
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 ...
2年以上 前
解決済み
Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...
2年以上 前
解決済み
Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...
2年以上 前
解決済み
Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...
2年以上 前
解決済み
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...
2年以上 前
解決済み
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
2年以上 前
解決済み
Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...
2年以上 前
解決済み
Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.
2年以上 前
解決済み
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,...
2年以上 前
解決済み
Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
2年以上 前
解決済み
Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...
2年以上 前
解決済み
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...
2年以上 前
質問
I don't understand the failed test message
Hello, I was solving some cody problem called perfect squares that asks for a given vector of numbers, return true if one of th...
2年以上 前 | 1 件の回答 | 0
1
回答解決済み
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...
2年以上 前



