Answered
extract useful info from text file filled with irrelevant info
Now that we finally know what _useful_ and _useless_ look like, we can finally answer the question (mostly). Here is one way ...

10 years ago | 0

| accepted

Answered
How to remove incomplete elements in a vector? using loops
This should work: v = [1.3 2.2 2.3 2.1 1.1]; requiredcount = 3; experiments = floor(v)'; [uexp, ~, idx] = un...

10 years ago | 0

| accepted

Answered
hello.can any one tell me how can I change a particular black pixel in a binary image to white?
Img(row, column) = 1 Will set the pixel (row, column) to white.

10 years ago | 0

Answered
Finding maximum value in a column of a matrix corresponding to multiple sets of duplicates in another column
As per my comment to Matt answer, this seem more logical to me: [years, ~, rows] = unique(A(:, 1)); maxmagnitude = accum...

10 years ago | 2

Answered
What other command can I use instead of isempty?
if ~isempty(strfind(B, A)) condition 1 else condition 2 end The problem is that, even conceptually, thi...

10 years ago | 1

| accepted

Answered
How to hide a GUI object after being clicked multiple times
It sounds like there is a bug in the logic of your code. Since you haven't shown your code, we can't say what. This is how I wou...

10 years ago | 1

| accepted

Answered
Pre-specify user input to function
Yes, this is absolutely the right place. No, it is not possible to programmatically feed an input to the |input| function. ...

10 years ago | 0

Answered
how to solve this error 'Error using horzcat Dimensions of matrices being concatenated are not consistent.'
Error using horzcat Dimensions of matrices being concatenated are not consistent. Error in MutualInfo (line 7) jointHistogr...

10 years ago | 0

Answered
flip elements of a row vector
How about doing a search in the help for flip? docsearch flip Lo and behold the first hit is what you want. Not surprisi...

10 years ago | 1

Answered
In a cell how do I extract a specific range of values from a few columns that have a certain value in another column?
If I understood correctly: c ={'Bob', 1, 100; 'Bob', 3, 200; 'Bob', 4, 500; 'Bill', 1, 200; 'Bill', 2, 300; 'Bill', 5 , 600...

10 years ago | 2

Answered
How to combine several matrices
It's not clear from your description what happens when one of the column of a row of A is 0 and the other isn't. This is one ...

10 years ago | 0

| accepted

Answered
How to prevent cell array to transpose cell automatically?
_"When the string starts with a zero it automatically transposes"_ That is really not clear since we have no idea what _"string"...

10 years ago | 0

| accepted

Answered
Please help in convergence of the array
Well, you already nearly wrote the answer yourself! for ... ... do something if condition break; %stop th...

10 years ago | 1

| accepted

Answered
Searching an example for actxserver with machine?
Trying solutions that you don't even understand at random is probably not the best way to debug your issue. If your problem ...

10 years ago | 1

| accepted

Answered
How to find a value that fits algorithm?
This is how I would do it: v = [1 2 3 2 1 2 3 4 5 4 3 1 2 3 4 5 4 5 1 2 3 4 5 6 5 6 ]; %sequence of interest is at index 1...

10 years ago | 0

| accepted

Answered
how to call and use function Recursivity
You have not understood how recursive functions work: function y = newt(x) %a recursive function calls itself except ...

10 years ago | 0

Answered
Calculate running average with NaN
If using 2016a or later, simply: RA = movmean(A, 5, 'omitnan', 'EndPoints', 'discard');

10 years ago | 1

Answered
How can i delete repeated rows?
Use the second return value of |unique|: [~, rowstokeep] = unique(A(:, 2:end), 'rows'); newA = A(rowstokeep, :)

10 years ago | 0

| accepted

Answered
In the following case I can't solve the error 'Index exceeds matrix dimensions'
Learn to use the <https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html debugger>. Issue a ...

10 years ago | 0

Answered
How to re-organize cell arrays assigning more values to the same index
Two notes first: I find it much clearer to use linear (1D) indexing instead of subscript indexing when dealing with row or c...

10 years ago | 1

Answered
Copy Figure prints the wrong figure
In the version of matlab that I'm currently using (2016a), if a string is passed as first argument to |editmenufcn|, it is assum...

10 years ago | 0

Answered
set_param 'Table' datatype
Assuming |mydata| is a row vector, this should work: assert(isrow(mydata), 'data is not row vector'); set_param(char(my_...

10 years ago | 1

| accepted

Answered
Download files from a website from an Excel list
I don't think you'll be able to simulate clicking on a webpage with matlab, and even if you could, it's totally the wrong approa...

10 years ago | 0

Answered
how can i change th color of pixels in an image
Note: never use the jpg format for image processing and for images with uniform colours such as yours. JPG is a lossy (normally)...

10 years ago | 0

Answered
Shuffling a cell array with constrains
A brute force approach would work: while true Stimuli = Stimuli(randperm(numel(Stimuli))); %shuffle randomly, may ...

10 years ago | 0

| accepted

Answered
Nested Structure in cellfun
The result is entirely correct. Perhaps you're assuming that |sin| works in degrees? If that is the case, use |sind| instead of ...

10 years ago | 0

| accepted

Answered
Inputs must be 2-D, or at least one input must be scalar
You have to ensure that the things you multiply are the same size or that one of them is scalar. In |H * ones(h3, 1)|, the right...

10 years ago | 0

Answered
What does Source: dotnetcli mean for .NET exception errors in Matlab?
CLI in the contest of .Net is usually the <https://en.wikipedia.org/wiki/Common_Language_Infrastructure Command Language Infrast...

10 years ago | 0

Answered
using structure as a value for containers.Map
The valueSet returned by the |values| function is a cell array of whatever is stored in the map. Therefore, cont.values{1}...

10 years ago | 1

Answered
reading binary file but Hex corresponds to a float
The third argument of <http://www.mathworks.com/help/matlab/ref/fread.html#inputarg_precision |fread|> tells it which format is ...

10 years ago | 0

Load more