Answered
error in template creation
Your code tries to concatenates the images side by side but at least one of the images is not the same height as the others or i...

8 years ago | 1

Answered
It doesn't count right
It is really hard to figure out what the problem is when the statement includes vague words such as _it_ without specifying what...

8 years ago | 1

Answered
if does not work
|if| works perfectly well. Your knowledge of matlab syntax is the problem. You'll never find any reference documentation for ...

8 years ago | 1

Answered
Replace repeated pattern in text
_"but it is not working"_ That is a very useless statement if you don't tell us in what way it is not working, or what you ex...

8 years ago | 0

| accepted

Answered
Converting numeric strings in cell to number for very large dataset
The simplest way to read the example file, assuming you're on R2013b or later: data = readtable('midas_marine-obs-lon-band-...

8 years ago | 1

| accepted

Answered
Split a table into groups and call a method with multiple parameters
The error is generated by |CalculateGroupCentrality|. You should get the same error if you called |CalculateGroupCentrality| wit...

8 years ago | 0

Answered
Convert workspace of cells to double
We keep on saying that |eval| and co. are bad practice for good reasons. Yes, it may make it easy to create all these variables ...

8 years ago | 2

| accepted

Answered
Finding cell array row indices based on numeric column values
find(strcmp(keystrokes(:,1), uniqueDigraphs{ii,1}) & ... split over several lines for readability strcmp(keystrokes(:,3)...

8 years ago | 1

Answered
Extension of standard matlab function
Matlab's license is *not* open source. You are not allowed to publish any of the m files that ship with it, modified or not.

8 years ago | 0

Answered
I have a problem. How do fix it? Help me please! Thank you very much...
Rather than posting screenshot at which some of us have to squint to be able to read anything, just copy and paste the error tex...

8 years ago | 0

Answered
How can I extract values from a vector element that includes NaN elements?
Note that creating numbered variables is an extremely bad idea (search the forum or faq to know why). We'll be creating a cell a...

8 years ago | 0

| accepted

Answered
How to group variables in a same cluster ?
Assuming your clustering numbers are all strictly positive integers: accumarray(A(:, 2), A(:, 1), [], @(custs) {custs})

8 years ago | 1

Answered
How to subtract mean along rows?
A simpler way, which does not involve loops at all, just simple indexing: mean_mat = splitapply(@mean, mat, G); mat_mi...

8 years ago | 1

Answered
Is there a function to do this?
<https://www.mathworks.com/help/matlab/ref/sprintf.html |sprintf|>? Describing what you want in words would help number = 1...

8 years ago | 0

Answered
How to draw a sine wave in image
Simply calculate the coordinates of the pixels you want to set according to your equation. e.g: img = zeros(200, 600); %...

8 years ago | 1

| accepted

Answered
index of the items in a listbox
I'm not sure what you mean by _order_. The |value| property of the listbox tells you which items are selected, so in your exampl...

8 years ago | 3

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
There is no need to be a matlab expert to figure the problem. Just look at the values of your variables (alternatively just unde...

8 years ago | 1

Answered
how to get common elements of matrix based on another matrix?
Still don't know what the actually result should be since you haven't explained why row 1 is compared to itself when it's not in...

8 years ago | 0

| accepted

Answered
Highlighting (make bold or underline) an item in a cellstring to be used in an annotation
str = {newname, ['<Mean>=',num2str(mna,'%.2f')], ['<CutOff>=',num2str(cutoff2,'%.2f')]}; str{1} = ['\bf ', str{1}, ' \rm'...

8 years ago | 3

| accepted

Answered
Set conditions between two matrices
If you're happy with having |1| when |A(k)>B(k)|, |0| when |A(k)==B(k)| and |-1| when |A(k)<B(k)|, then the answer is simply: ...

8 years ago | 2

| accepted

Answered
How can I concatenate multiple answers from a nested FOR loop into a matrix?
First, use better names for your variables. Ones that clearly describe what they contain rather than single letter. That would h...

8 years ago | 1

Answered
Finding location of an exact match in a string
Assuming that the '1.1.2' must be at the beginning of a line in a multiline string, this simple regular expression would work: ...

8 years ago | 2

| accepted

Answered
Error with table subtraction
A complete guess, since you haven't explained what you're trying to do: a=[0.5 0.6 0.9 1.0 1.6]; b=[2.0 1.5 1.3 2.8 3.2]...

8 years ago | 0

Answered
how to add colmun to vector
And the proper way is to use <https://www.mathworks.com/help/releases/R2017b/matlab/matlab_prog/preallocating-arrays.html preall...

8 years ago | 0

Answered
How to import tap files?
The files are binary. As indicated <https://cdaweb.gsfc.nasa.gov/pub/data/explorer/explorer12/cosmic_rays/1-hour_count_logbook/ ...

8 years ago | 0

Answered
Generate random circles with her vertices number
How about this? Requires R2017b: %inputs radius = 5; vertices = 6; polycount = 80; canvassize = 100; %ca...

8 years ago | 0

Answered
Sum of Multiplication of column values in cell array
What is the reason for the cells of |x| to be themselves cell arrays? Due to your multiplication requirements each vector in the...

8 years ago | 1

Answered
loop implementation with two conditions
Something like this would work: samples = randi([0 20], 1, 1000); %demo data indices1s = 1:100:numel(samples); %ind...

8 years ago | 0

Answered
What is the best format for a large dataset that is to be analysed with Matlab?
Personally, I dislike multilevel structures. As you've found out, they're actually hard to manipulate, particularly, if you want...

8 years ago | 1

| accepted

Answered
Split text file to smaller files
Personnally, I wouldn't bother with parsing the file, just read it in one go, then split it at the $: wholefile = fileread(...

8 years ago | 1

Load more