Feeds
已解决
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...
6 years 前
已解决
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...
6 years 前
已解决
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...
6 years 前
已解决
Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...
6 years 前
已解决
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...
6 years 前
已解决
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...
6 years 前
已解决
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: ...
6 years 前
已解决
Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'
6 years 前
已解决
Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...
6 years 前
已解决
Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...
6 years 前
已解决
Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...
6 years 前
已解决
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...
6 years 前
已解决
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...
6 years 前
已解决
Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
6 years 前
已解决
Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...
6 years 前
已解决
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. Ex...
6 years 前
提问
How can I write a 4d tensor in a .mat file in each step in a loop
I would like to store tensor element directly in a .mat file because my PC ram is not large enough to store the entire tensor. I...
8 years 前 | 0 个回答 | 0
0
个回答提问
set zero in matrix elements
Hi, I have a 3d tensor in MATLAB. Call it A. Lets say, size(A)=[4 6 10]. I have another matrix M which holds few indexes of the ...
8 years 前 | 1 个回答 | 0
1
个回答提问
setappdata and getappdata for multiple variables
Hi, I am trying to write a code like function function1=givenfunction(variable) for i=1:length(variable) s...
8 years 前 | 1 个回答 | 0

