Feeds
已解决
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...
3 months 前
已解决
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
3 months 前
已解决
Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.
3 months 前
已解决
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 months 前
已解决
area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...
3 months 前
已解决
Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...
3 months 前
已解决
Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...
3 months 前
已解决
Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. Slightly harder than it seems like it should be. Exampl...
3 months 前
已解决
Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...
3 months 前
已解决
Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...
3 months 前
已解决
Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...
3 months 前
已解决
Column Removal (★★★)
(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...
3 months 前
已解决
Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...
3 months 前
已解决
Remove a specific column with min value
Remove the column that contain the min value in the matrix? If you like the problem, please give it a like:)
3 months 前
已解决
Remove a specific column with max value
Remove the column that contain the max value in the matrix? If you like the problem, please give it a like:)
3 months 前
已解决
Remove a specific row with min value
Remove the row that contain the min value in the matrix? If you like the problem, please give it a like:)
3 months 前
已解决
Remove a specific row with max value
Remove the row that contain the max value in the matrix? If you like the problem, please like it :)
3 months 前
已解决
Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...
3 months 前
已解决
Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...
3 months 前
已解决
Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...
3 months 前
已解决
Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...
3 months 前
已解决
Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').
3 months 前
已解决
Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...
3 months 前
已解决
Swap between rows
The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...
3 months 前
已解决
String Logic 10
Examples: 'SUNDAY' --> 83 'MONDAY' --> 77 'TUESDAY' --> 84 'WEDNESDAY' --> 87 'THURSDAY' --> 84 'FRIDAY' --> 70 'SATURD...
3 months 前
已解决
String Logic 5
Example: 'CAT' --> 'TAC' 'DOG' --> 'GOD' 'MATLAB' --> 'BALTAM' 'ROSY' --> 'YSOR' 'TRUST' --> 'TSURT' 'MOSTLY' --> 'YLTS...
3 months 前
已解决
String Logic 8
Example: 'CAT' --> 65 'DOG' --> 68 'ROSY' --> 79 'MATLAB' --> 65 'TRUST' --> 82 'MOSTLY' --> 76
3 months 前