Answered
How to write/append a specific text line repetitively in MATLAB??
_" But I also want to have other machines to be updated by going back to respective text lines"_ Going back into a file (text...

9 years ago | 0

| accepted

Answered
How to read data from file (different line lengths)
This is how I'd do it: function data = readfile(filepath) data = struct('frame', [], 'camera', [], 'points', []); ...

9 years ago | 1

| accepted

Answered
Finding series of repeating numbers in matrix
v = [1 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1] beginning = strfind([1 v], [1 0]) ending = strfind...

9 years ago | 2

Answered
How to find the number of items that start with the letter s in a matrix?
One thing is sure, you *do not have* _"a matrix with city names in the first column and numbers in the second column"_ since mat...

9 years ago | 1

| accepted

Answered
using imshow how to display the color image
Assuming the image is truly a colour image and not an indexed image: imshow(input_Im(1:128, 1:128, :)); If you don't say...

9 years ago | 3

Answered
Indexing a matrix intuitively
Well, if you really wanted the content of a matrix to map to your representation of a _normal_ xy cartesian plane, then the row ...

9 years ago | 0

Answered
100 * 1835 / 2584 = 71% ... WHAT AM I MISSING?
A bit more context to your question would have been very helpful! It took me a while to understand you were talking about the an...

9 years ago | 0

| accepted

Answered
Calculate number of following nodes in a directed graph
I assume you meant G = digraph(t, s); %digraph not graph What does _calculate all following tasks/node after the curren...

9 years ago | 2

Answered
Changing the values of multiple objects at once?
You do not need to create a special set function or override any operator to assign values to a property of an array of objects....

9 years ago | 10

Answered
Table with a few identical column names
Grouping the rows is trivially achieved with <https://www.mathworks.com/help/matlab/ref/varfun.html |varfun|> in just one line: ...

9 years ago | 2

| accepted

Answered
How to properly extract data from text file.
<https://uk.mathworks.com/matlabcentral/answers/339849-how-to-properly-extract-data-from-text-file#answer_266694 dpb answered> y...

9 years ago | 1

Answered
Matrix dimensions must agree
_"Is there a way to do this which will not lead to the error?"_ There's a very simple way: *Never ever hardcode the size of t...

9 years ago | 0

Answered
Is there a way to create a 'dynamic' cell array that references variables instead of the contents of variables?
Note: *This is not a good idea*. This is not the way matlab works. The only way you can do something like this in matlab is w...

9 years ago | 2

| accepted

Answered
accessing Long Text from matlab
I don't have any problem storing and retrieve LONGTEXT data from access, so you should explain what issues you've encountered. ...

9 years ago | 0

| accepted

Answered
find a value in a struct
valuetofind = 58; find(arrayfun(@(s) ismember(valuetofind, s.cluster), clusters))

9 years ago | 1

| accepted

Answered
How to disable the stopping of a timer when it executes its TimerFcn
Simply change the |'ExecutionMode'| to |'fixedRate'| instead of |'fixedSpacing'|. |'fixedSpacing'| tells the timer to start coun...

9 years ago | 1

| accepted

Answered
How to Remove files that don't match string?
The easiest, assuming R2016b or later, is to use <https://www.mathworks.com/help/matlab/ref/contains.html |contains|>: filt...

9 years ago | 0

Answered
Adding elements from a matrix to different vectors in a loop
I don't really understand the meaning of your two vectors but a much simpler way of obtaining the *exact* same info would be jus...

9 years ago | 1

Answered
Change matrix dimensions and keep the order
Use <https://www.mathworks.com/help/matlab/ref/reshape.html |reshape|>. Because matlab is column-major and you want your data in...

9 years ago | 0

| accepted

Answered
variable number of inputs in a function
Matlab has a well defined method for passing variable numbers of arguments to functions, using expansion of cell arrays into <ht...

9 years ago | 1

| accepted

Answered
Passing names of functions to another function with parameters as input in MATLAB
I'm with Stephen. OOP would be the way to go. It's the way I've written my processing pipelines in the past. You can defined abs...

9 years ago | 0

Answered
How do I combine three cells to output a date time?
You would be better off fixing your import so that the whole date is imported as just one column of your table. For that, we nee...

9 years ago | 0

| accepted

Answered
Distance between point and a line ?
Have you tried your favorite search engine? The first link that comes up for me, Wikipedia, has the <https://en.wikipedia.org/wi...

9 years ago | 2

Answered
Reading text files in Matlab with inconsistent whitespace and character array lengths
Using |textscan|, you need to specify |Whitespace, ''| to prevent matlab interpreting the spaces as separator. It is then easy t...

9 years ago | 0

Answered
save coordinates by using impoly..
Well, you can't crop an image to an arbitrary polygon since an image must be rectangular. Guessing, maybe you want the image cro...

9 years ago | 1

Answered
Chose vectors (from a randomly generated vectors) which does not contain more than two identical elements
If I understood correctly, all you have to do is build the histogram of each row and if you more than two values greater than 1 ...

9 years ago | 0

| accepted

Answered
How can I check overlap between event markers?
According to your description, you would eliminate both overlapping events. I'm not sure why you could not just eliminate one an...

9 years ago | 0

Answered
video with a special matrix
Have you followed the tutorial on <https://www.mathworks.com/help/matlab/creating_plots/record-animation-for-playback.html recor...

9 years ago | 0

Answered
I have 2 matrices with size (4,4) and (4,5) respectively. I want the element (2,1) in the second matrix to try all values in the first column in the first matrix and at each value, produce new matrix
Probably the easiest is to replicate your B in the 3rd dimension and copy the column of A along that dimension. A = [1:4 ; ...

9 years ago | 0

Answered
How to solve Out of memory error in MATLAB?
|rjpg8c| and |readjpg| are functions called by |imread| when reading an 8-bit jpg image. If you get an out of memory error i...

9 years ago | 0

| accepted

Load more