Answered
extracting data from multiple txt files
One obvious issue with your code is that it makes no sense to have the |k| loop inside the |i| loop. I suspect the |k| loop is m...

8 years ago | 0

Answered
Extracting numbers from mixed string
A possible |regexp| version would be: str2double(regexp(filename, '(\d+)_(\d+)', 'tokens', 'once')) _edit: following the...

8 years ago | 1

Answered
How can i change ascii text from arduino serial port to number in matlab?
If you just want to convert the individual character digits into numbers from 0 to 9, then simply subtract the ASCII code for 0 ...

8 years ago | 1

Answered
Hi. I have an a problem updating my excel file without overwriting the previous datas on the excel sheet. Am using a button to submit the input datas from matlab gui to the excel sheet.
Seems to me that the problem is simple: if you keep overwriting the same row that's because your |row| variable does not increas...

8 years ago | 1

| accepted

Answered
Use imwrite to save tif images
_"I got an error message"_ is a useless statement if you don't give us said error message. Thankfully, you've finally given it i...

8 years ago | 2

| accepted

Answered
AxtiveX Equivalent for xlsread
Matlab keeps the excel process alive precisely to speed up future calls to any |xls***| function, as starting up the process is ...

8 years ago | 0

Answered
Q is a 3D array of size 3x3xn. I want to use the next value of Q i.e. Q(:,:,2) and so on, every time j is even. Is there a way to do it in MATLAB.
If I understood correctly, for j = 1:numel(p) stress(:, :, j) = Q(:, :, 1+floor(j/2)) * strain(:, :, j); end

8 years ago | 0

| accepted

Answered
fprintf is printing strange characters instead of numbers
The problem is due to Notepad broken encoding detection algorithm. For some reason it assumes that the file is encoded in UTF16,...

8 years ago | 1

| accepted

Answered
Declare function for specific matlab versions
You have several options Option 1 is to use <https://www.mathworks.com/help/matlab/ref/verlessthan.html |verLessThan|>. Have ...

8 years ago | 0

Answered
How I get Matlab code for Paper
<http://matlab.wikia.com/wiki/FAQ#Can_you_program_up_the_algorithm_in_this_article_for_me_and_explain_it_to_me.3F See the FAQ>

8 years ago | 0

| accepted

Answered
Function definitions are not permitted in this context?
Pre-R2016b you would get this error if you had local functions in a script m file. Post-R2016b, I'm not sure what can trigger it...

8 years ago | 0

Answered
Why do the decimals disappear when I put the values into an array?
I would suspect the problem is not with the initialisation of |value| but with the fact that |TimeStamp| is of class |uint64|. I...

8 years ago | 0

Answered
Conversion of 100 jpg images to PGM
Even simpler, particularly if you don't have the knowledge to write the code is to download any decent image viewer program that...

8 years ago | 0

Answered
Sir I found error when I am using these codes. Codes are shown in the figure......
All these squigly lines and orange marks in your screenshot is matlab telling you that there may be problems with your code. You...

8 years ago | 0

| accepted

Answered
How to replace k-th diagonal by vector?
You can't use |diag| to assign to diagonales of a matrix, only to get them. The simplest way to assign to the diagonales is to r...

8 years ago | 1

| accepted

Answered
Error using cellfun Input #2 expected to be a cell array, was double instead.
I think the explanation that I was asking for is that you have a matrix |data| whose first column is years and second column day...

8 years ago | 6

Answered
Activity list is not updating
Yes, the activity feed stopped updating a while back. Walter R. reported it to Mathworks about 8 hours ago, so they'll be aware ...

8 years ago | 1

Answered
C Dll does not find all header paths
You cannot use |calllib| in matlab unless you have first loaded the library with |loadlibrary|. If there is a bunch of includ...

8 years ago | 0

| accepted

Answered
plz explain the code
|img_clahe(:,:,color_idx)| corresponds to each colour channel of the image.

8 years ago | 0

| accepted

Answered
How to get rid of empty space and unit in my output
The following will parse your example file correctly for me: A = readtable('example.txt', ... 'Format', '%...

8 years ago | 1

| accepted

Answered
Using ColorMap to Change Yellow Object in Image to Green
I don't know what your assignment is exactly trying to get you to do. They seem to be strangely formulated. I think that by n...

8 years ago | 0

| accepted

Answered
log of a vector
A real number is a complex number with an imaginary part equal to 0. If you look at the result of your log you'll see that the c...

8 years ago | 0

| accepted

Answered
How to change individual components of a matrix using conditional statements.
The proper way to do what you describe in matlab would be: M(M > 0) = 60; %has to be done first so as not to replace 40 by ...

8 years ago | 0

Answered
Find Area of the object in mm^2 from binary image
Unless you know the scale of your image (pixels/mm) it is *impossible* to convert pixel measurements such as area or perimeter t...

8 years ago | 0

Answered
How to categorise .dat file into different headers?
I don't really know what is asked, _categorize_ doesn't mean much. If it's help to read the file into a table, then as said <htt...

8 years ago | 1

| accepted

Answered
How to solve issue of "Error using horzcat"?
|i| and |j| are scalar, |dist| is a column vector with 2 elements. As the error message tells you, the dimensions are not consis...

8 years ago | 1

Answered
Import various txt files into matlab
One thing that certainly does not look right is the format specifier of |sprintf| if there are indeed 328 files. That specifier ...

8 years ago | 0

| accepted

Answered
M.file functioms with Command window
_How can I solve it...?_ Provide a |x| and |y| input that are the same size

8 years ago | 0

| accepted

Answered
How to export cell of doubles to excel?
There doesn't seem to be much logic as to the order of the dimensions in your matrices. In the future, if you want 15x19 matrice...

8 years ago | 0

| accepted

Answered
Who maintains the timezone offset table for changes in DST rules?
Unfortunately, I don't think it's documented, and while you can look at most of the internals of |datetime| the particular bits ...

8 years ago | 0

Load more