Answered
webread with comma in url
That's because those things after the '?' are not really part of the URI, but are query parameters. |webread| separate these fro...

10 years ago | 1

| accepted

Answered
Visual studio matlab compiling
Well, the first step is to <http://www.mathworks.com/help/matlab/write-cc-mex-files.htm get a clue>. Then, come back with a spec...

10 years ago | 0

Answered
how to vertically cascade a string vector and a numerica matrix
If tables as per Steven Lord's suggestion don't work for you then: c = [a; num2cell(b)] I'd recommend going with a table...

10 years ago | 0

Answered
How to convert a column back into matrix?
If you don't know what the original size of the matrix was, then you of course can't since matlab does not keep the information....

10 years ago | 0

| accepted

Answered
Grouping matched data by row and column
I don't think that there is any other way than using loops to solve this. This works: Rows_col_ = [6 1; 9 3; 17 3; 19 7; 1...

10 years ago | 0

| accepted

Answered
Tricky optimisation problem of array
I can't really answer your optimisation question because I don't understand what you're trying to optimise. Note that given: ...

10 years ago | 0

Answered
fprintf for character above 127 uses 3 bytes
Once you've opened your text file, check its encoding with [~, ~, ~, encoding] = fopen(fid) You will find that it is UTF...

10 years ago | 0

| accepted

Answered
segmentation of dark lines when background is darker a bit.
You could CLAHE ( <http://www.mathworks.com/help/images/ref/adapthisteq.html |adapthisteq|> in matlab) to enhance the contrast o...

10 years ago | 1

Answered
how to create color checkerboard any size
A simple method would be to generate an image where each individual pixel is a random colour and of the size of the numbers of s...

10 years ago | 1

Answered
Plotting graph over image
By default, |plot| delete existing objects (image, other plots, etc.) from the axes. To turn that behaviour off you must have |h...

10 years ago | 2

| accepted

Answered
Create an array from 4 other arrays with different number of rows and mismatching columns
This sort of problem can usually be solved with <http://www.mathworks.com/help/matlab/ref/unique.html |unique|> to identify the ...

10 years ago | 0

| accepted

Answered
Remove elements from a matrix
You can use <http://www.mathworks.com/help/matlab/ref/uniquetol.html |uniquetol|> (from R2015a and up) to find duplicate rows wi...

10 years ago | 0

| accepted

Answered
Seems like a bug in Matlab R2015a "sort" routine
The bug is in your interpretation of the indices returned by |sort|. As per the documentation of <http://www.mathworks.com/help/...

10 years ago | 0

| accepted

Answered
Trasform number in strings
Two simple options: 1. loop (explicit or with |arrayfun|): a = [874 631 1 10 144]; c = arrayfun(@num2str, a, 'Uniform...

10 years ago | 1

Answered
[title removed]
%demo data A = [1 2 3;4 5 6;7 8 9] B = [2 3; 3 2] %build all combinations of row indices of A and B: [arows, brows...

10 years ago | 0

| accepted

Answered
How to compare all row elements in an array against a value and then only select that row where all elements are greater than that value ?
*Do not* use loops for this. It is slow, inefficient and needlessly complicated. Here is a simple way of getting all rows of a m...

10 years ago | 1

Answered
How do I exclude data knowing the rownumbers?
|find| and your |I| array is not needed. You can directly use the logical array returned by |ismember|: A(ismember(A, B)) =...

10 years ago | 1

Solved


GJam March 2016 IOW: Polynesiaglot Small
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard#s=p2 GJam March 2016 Annual I/O for Pol...

10 years ago

Solved


the "power matrix" of two vetcors
Given two row vectors x,y of lengths m and n (resp.), create an m x n matrix whose i,j entry is x(i)^y(j).

10 years ago

Answered
setdiff for two matrices
I'm afraid there's no other way than looping over the rows either explicitly with a for loop, or with |cellfun|: cell2mat(c...

10 years ago | 0

Answered
how to find the row name which corresponds to a certain value in a table
t = table(S,Rd,Ratio,doi,kd,'RowName',MT); [~, maxrow] = max(t.S); %get row index of max maxrowname = t.Properties.RowN...

10 years ago | 0

Answered
Find the best combination of each pair of entries in a matrix
I'm not sure I've understood your question correctly since for me the highest value in the first row is column 3, but if I have,...

10 years ago | 0

Answered
How to compute distance efficiently with no loops
Most likely: pdist2(P1, P2(:, [2 3]), 'cityblock')

10 years ago | 0

| accepted

Answered
urgent help please :::::( how can ı solve this ?
# You need to be aware of the difference between <http://www.mathworks.com/help/matlab/ref/times.html element-wise multiplicatio...

10 years ago | 0

Answered
Listening an event when another function of the class is running?
I think the problem is that your function |suiveur| is called by the event handler, so your while loop is executing while an eve...

10 years ago | 2

| accepted

Answered
Constructing saved file name with variables from code
I would recommend you use <http://www.mathworks.com/help/matlab/ref/sprintf.html |sprintf|>: filename = sprintf('Test_File_...

10 years ago | 0

Answered
Summation of function handles in cell array
To be honest you're probably better off creating an explicit function, but you can achieve the summation with recursive anonymou...

10 years ago | 0

| accepted

Answered
Sorting a matrix of data using another matrix of start and stop times
The following will tell you which row of |frequencydata| is in which interval of |spiketimes|: ininterval = bsxfun(@ge, freq...

10 years ago | 0

| accepted

Answered
Operands to the && operators must be convertible to logical scalar values.
_"I am having trouble figuring out why this code doesn't work"_. Why should it? What is the result of plot(x, y, 'b*'); ...

10 years ago | 0

Solved


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a + b*x + c*x^2 is represente...

10 years ago

Load more