Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Beantwortet
Combining excel files in a single file
You could do something like that (not tested): nRows = .. you define it. nCols = 1000 ; buffer = zeros(nRows, nCols) ;...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
Form a matrix from a structure
If it is a cell array and cells contents have matching sizes: >> doc cell2mat

mehr als 13 Jahre vor | 1

Beantwortet
Looping over folders, skipping a folder if a file is present
EDIT: jump to the solution provided by Image Analyst, it is better. You should use |fullfile()| for building |subdirpath|. No...

mehr als 13 Jahre vor | 0

Beantwortet
Create sparse matrix with zig-zag diagonal
You could use |sparse()|, building appropriate vectors of indices and values, e.g.: nCol = size(A, 2) ; nRow = nCol * size...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
[DISCONTINUED] MATLAB Answers Wish-list #2 (and bug reports)
Another feature that I would really appreciate is a _select_ instead of the _checkbox_ "Email me when answers are added to this ...

mehr als 13 Jahre vor | 0

Gelöst


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Beantwortet
Is there a built-in way to build a GET url in Matlab from a set of parameters?
If you just want to build a string from multiple components, you can use |sprintf|, e.g. >> v = 3 ; >> subfolder = 'WWW' ;...

mehr als 13 Jahre vor | 1

| akzeptiert

Beantwortet
How do I create orthogonal basis based on two "almost" perpendicular vectors?
If you have no preference about which component to modify, you could perform something as simple as >> Z(end) = -Z(1:2)*Y(1:...

mehr als 13 Jahre vor | 1

| akzeptiert

Beantwortet
How to extract data from a srting?
Solution with a regexp: regexp(s, '(?<=associate:).*(?=Start)', 'match') where |s| contains your string. EDIT: the fol...

mehr als 13 Jahre vor | 1

| akzeptiert

Gelöst


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

mehr als 13 Jahre vor

Gelöst


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

mehr als 13 Jahre vor

Gelöst


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

mehr als 13 Jahre vor

Gelöst


Is my wife right?
Regardless of input, output the string 'yes'.

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

mehr als 13 Jahre vor

Beantwortet
[DISCONTINUED] MATLAB Answers Wish-list #2 (and bug reports)
As mentioned <http://www.mathworks.com/matlabcentral/answers/59216-discussion-about-answers-votes here>, I think that having the...

mehr als 13 Jahre vor | 3

Beantwortet
[DISCONTINUED] MATLAB Answers Wish-list #2 (and bug reports)
I think that if people were reminded (e.g. weekly) on a verified email that they have to come back to "close" their threads (or ...

mehr als 13 Jahre vor | 1

Beantwortet
how to make fscanf faster
15 years ago, I would use |fread| and "format" the data myself. I don't know how the technology evolved, but my guess is that |f...

mehr als 13 Jahre vor | 3

| akzeptiert

Beantwortet
Finding the index value corresponding to a value closest to 0 in an array
You have several options. The first question is: do you really need the index, or could you use a vector of logicals, e.g. for i...

mehr als 13 Jahre vor | 3

Beantwortet
repeat a loop for 10 times
Your for loop statement is not built correctly: for iterations=10 will just give |iterations| the value 10 and will execu...

mehr als 13 Jahre vor | 0

Beantwortet
replace nan values with the mean of other cell array
You could build a solution based on the following: % -- Build a lookup table that associates to each JDay the mean of data ...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
i need to convert a cell with different datatype to a matrix please any one help me to do this
If you always have this structure with a numeric array first and then cell arrays, and if the second part of my comment above is...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
How can I save data to a CSV file in the format I want?
You cannot access a file in column. You have several options for achieving what you want, that will in principle all have the sa...

mehr als 13 Jahre vor | 1

Beantwortet
grouping elements of a column that correspond to specific elements from another column
I would go for something like that: >> cName = 'MN' ; >> flagCountry = cellfun(@(cntry)strcmp(cntry, cName), out1(:,1)) ; ...

mehr als 13 Jahre vor | 0

| akzeptiert

Mehr laden