Answered
Finding highest position of values in two arrays?
I don't really understand your description of the rule to figure out the ordering. Whatever it is however, it should be trivial ...

8 years ago | 0

Answered
I've got an error in my Matlab looks like a bug
It's not a matlab bug. It is expected behaviour of floating point numbers that computers use and you need to learn the pitfall a...

8 years ago | 1

Answered
How to match two matrices of 8 item sequences and average?
Like this: %generate demo data letters = 'IOPU'; bases = letters(randi(4, 100, 8)); %100 8-item sequences test = l...

8 years ago | 0

Answered
Error using vertcat; Dimensions of arrays being concatenated are not consistent.
What is the intent of [phia(it,:);phia(it,1)] in your |plot| line. |phia(it, :)| implies that |phia| has more than o...

8 years ago | 0

Answered
poly and polyval for large vectors...
The <https://www.mathworks.com/help/releases/ref/polyfit.html#bufcrts documentation of |polyfit|> has an example of how to use t...

8 years ago | 0

| accepted

Answered
Assign matrix to struct
As per jan's comment, |g.a| means nothing. If you type |g.a| in the command window, you will get 3 outputs (3 times: |ans = ...|...

8 years ago | 1

| accepted

Answered
load multiple .dat files into matlab in matrix form
You need to read the documentation of <https://www.mathworks.com/help/matlab/ref/sprintf.html |sprintf|> to learn how you actual...

8 years ago | 0

Answered
Calculate standard deviation for different groups
_"The problem is that accumarray calculates the arithmetic average for each group separately"_. It's not |accumarray| doing ...

8 years ago | 0

Answered
Help with using scanf and editing a txt file?
This is how I'd read all the vertices. %assumptions: % all vertices are made of 3 coordinates % all faces are mad...

8 years ago | 0

| accepted

Answered
How to sum 3D arrays in a 1x3 cell?
If I understood correctly you want to interlace the pages: %Assuming cell array is 1x3, not 1x1 as you wrote: numpages =...

8 years ago | 0

| accepted

Answered
How to calculate function for different parts of array with values of same lenght in one big array
Assuming the number of elements in the vector is a multiple of 5, you can just <https://www.mathworks.com/help/matlab/ref/reshap...

8 years ago | 0

Answered
Could someone help me with the "imwrite" command please ? Error using imwrite>parse_inputs (line 541) The colormap should have three columns.
The error message is misleading. The problem is that, surprisingly, |imwrite| does not yet support string arrays for the filenam...

8 years ago | 3

| accepted

Answered
See sequences in array
A = [1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1] A([false, all([A(1:end-2); A(2:end-1); ...

8 years ago | 1

| accepted

Answered
Save each result in different folders
If OO is supposed to be the generated folder name, then: fid2 = fopen(sprintf('E:\\matlab\\all\\New folder\\New folder (5)\...

8 years ago | 0

| accepted

Answered
Count the appearances of each value per bin within a vector of 144 bins.
A method without a loop: %demo data: v = randi([-3 2], 1, 21600); binsize = 150; assert(mod(numel(v), binsize) =...

8 years ago | 1

| accepted

Answered
How to Select ROI based on this algorithm. OR how can i segment only the bone part from these images.
_Now I am getting a black squared output at this stage after step 9?_ Well, no wonder considering that your step 9 is: I...

8 years ago | 0

Answered
how to resolve error in code generation when syntex is correct?
Have you tried outer_blob = imfill(bin, 4, 'holes'); in case this is a bug in matlab? (I don't have coder so can't test)...

8 years ago | 0

Answered
Error using xlswrite (line 165) Dimension of input array cannot be higher than two.
The error is clear, |xlswrite| cannot write 3D arrays (such as your V3f array) since excel spreadsheet are 2D. What would yo...

8 years ago | 0

Answered
remove duplicate rows from text file
lines = strsplit(fileread(yourtextfile), '\n')); %read file and split into lines lines = unique(lines, 'stable'); %remove...

8 years ago | 0

Answered
if statement on cell
Since your inputs are tables, it's trivial to merge the two tables as you want: C = outerjoin(B, A, 'LeftKeys', 'ID', 'Righ...

8 years ago | 0

| accepted

Answered
How to convert a matrix to a structure array?
I'm with Steven, it would make more sense to keep it as is, or if the columns indeed represent different things, to change it to...

8 years ago | 1

| accepted

Answered
error message vectors must be the same length
Before you do anything else, the first thing you need to do is to comment your code. The code should start with: %nameofsc...

8 years ago | 0

| accepted

Answered
Problem with function handling
I'm really not clear what are variables (inputs) to your function and what are constants. Why is your anonymous function just a ...

8 years ago | 0

Answered
How do I horizontally concatenate tables within a cell array (same # of rows, different # of columns) that contain both numeric and string data types?
So it does look like you want to <https://www.mathworks.com/help/matlab/ref/table.join.html#namevaluepairarguments |join|> the t...

8 years ago | 1

| accepted

Answered
Mapping indices of matrices with differing dimension
Well have you try |x(y)|? It will give you exactly your desired |z|. Note that the rule of |A(B)| indexing is that it is the ...

8 years ago | 0

| accepted

Answered
Convert time stamps to binary
b = []; b(round(a/0.1)) = 1 The |round| is necessary because of floating point precision.

8 years ago | 0

| accepted

Answered
Hi, How do I resize a video to satisfy google net's size input layer ?
_Are you willing to clarify about "pass it each frame of the video."_ Your question is puzzling since at first glance you're ...

8 years ago | 0

Answered
How to detect between any two pixels (preferably far) there exist an number of foreground pixels of an image (foreground=white and background=black)???
<https://www.mathworks.com/help/images/ref/improfile.html |improfile|> (with the default |'nearest'| interpolation) should give ...

8 years ago | 0

Answered
How can you move up data in a structure to a higher level?
First thing, let's convert all the dataxxx scalar structure into a structure array. The simplest way is to convert your upper le...

8 years ago | 0

| accepted

Answered
how swap the bits at position L&P of A(I,j).?
bits = bitget(A(i, j), [L, P]); A(i, j) = bitset(A(i, j), P, bits(1)); A(i, j) = bitset(A(i, j), L, bits(2)); As an a...

8 years ago | 2

| accepted

Load more