Answered
Why there is error for "str_id = num2str(grid_id,'%2.2i');"? what should I change?
_"Why there is error"_ Most likely, because you called |data_proc| with less than 4 arguments. The error will happen if you c...

8 years ago | 0

Answered
Averaging where Bins are various sizes
yourtable.Bin = discretize(yourtable.VarC, 0:0.5:5); meantable = varfun(@mean, yourtable, 'GroupingVariable', 'Bin')

8 years ago | 1

Answered
How to add a specific number to elements in a vector?
if any (on < 100) on_count = on + 255; end says: if any element of |on| is less than 100 (1st), then set on_co...

8 years ago | 2

| accepted

Answered
Use a cell array in a for loop
Well yes, you declare |nrms_data| as a matrix of double, not a cell array. In addition, |nrms_data{i}(j)| access the scalar elem...

8 years ago | 0

| accepted

Answered
Why my function do not work and gives me an error message?
Most likely, you have a variable called |SEM| in your workspace which shadow your |SEM| function. Hence you're indexing that var...

8 years ago | 0

| accepted

Answered
How to reverse image without changing the resolution
You need to learn a bit more about _resolution_ and particularly understand that it's mostly meaningless and is only a hint to a...

8 years ago | 0

Answered
Get information from Excel file based on cell color
It is certainly possible to query the cell colour in an excel spreadsheet from matlab (only on Windows, with Excel installed) ho...

8 years ago | 1

| accepted

Answered
How can I draw an initial snake on the jpg file that loaded from my computer?
%... code to load the image and calculate x and y imshow(I); hold on; plot([x;x(1)], [y;y(1)], 'g');

8 years ago | 0

| accepted

Answered
"Matrix dimensions must agree"
Because |val1| is not <https://uk.mathworks.com/help/matlab/matlab_prog/preallocating-arrays.html preallocated> in the code you'...

8 years ago | 1

| accepted

Answered
Stacking data sets into 1
I have not really understood what it is you're trying to achieve but fixing your error is easy: else stack = [stack; ...

8 years ago | 0

| accepted

Answered
Finding Patterns in Array
%T: temperature vector %desiredduration: number of samples where temperature must be between 9 and 11 inrange = T>=9 &...

8 years ago | 0

| accepted

Answered
Why am I getting this error in converting double to handle for my contour plot?
Not sure why you're trying to assign the return value of |contourf| to your axis handle. You've already told |contourf| to plot ...

8 years ago | 1

Answered
Does anyone know how to fix this?
Seeing the actual code you're using would help. Works fine for me: hsurf = pcolor((1:2413).', (1:3543).', rand(3543, 241...

8 years ago | 0

| accepted

Answered
Problem with Undefined variable or class
The variable exists in your *workspace*, but the error is telling you that in the callback *function* it does not exist. Functio...

8 years ago | 0

| accepted

Answered
I want to add a column that counts the passes for this test. When the values in the first column are between 0-300 seconds, I want to consider that pass 1, etc.
You can do the discretisation (as that's what you want is called) and the addition as a new column all in one go: CETR1(:, ...

8 years ago | 0

Answered
How to find centralized sub image from an image?
Isn't it simply: centralised_subimage = yourimage(end/4:3*end/4, end/4:3*end/4, :)

8 years ago | 0

| accepted

Answered
Fucntion input Varargin, value or name.
Assuming that the first line of the function is function [ Imu ] = loadImu( FileName, varargin) and not functio...

8 years ago | 0

| accepted

Answered
How to combine two matrices in the form of ordered pairs?
It would seem that your _ordered pairs_ are actually two digits integers formed by putting the first element as decades, and the...

8 years ago | 0

| accepted

Answered
Read continuous data from one txt file, where there is more that one header
Splitting your file into each block is trivial since the blocks are actually separated by control character \03 and \02, so: ...

8 years ago | 1

| accepted

Answered
Renaming part of all images in a folder
It is easy to do in matlab but it's even easier to do from your OS command line. If on windows, at the command prompt: ren ...

8 years ago | 0

| accepted

Answered
Using a for loop to generate multiple arrays with variables
A loop is not necessary and is a waste of time: A = [0.25 0.0015 5000 0.50 0.0018 8000]; %R2016b or late...

8 years ago | 0

Answered
Using an or in a while loop.
You're saying loop while |ea| is smaller than |es| *OR* |iter| is smaller than |imax|. The first part is always true so it'll ke...

8 years ago | 1

| accepted

Answered
How to find the color histogram of cmyk image(jpg)
While the JPEG compression algorithm does support CMYK (or any other colour space), the <https://www.w3.org/Graphics/JPEG/jfif3....

8 years ago | 1

Answered
Search for pdf with specific title and move to a different location on my PC with matlab
_The word title here means the file name of the PDF. I'm looking to identify and relocate individual PDF files based on a few ch...

8 years ago | 0

Answered
How to create triangular lattice from two points?
I'm going to assume that given A and B you know how to find C (and C' the symmetric of C against AB). If not, use your favorite ...

8 years ago | 1

| accepted

Answered
Can anyone say how to divide an image in 6 parts?
_This is for dividing a image into four equal parts_ Yes, and it is horrible! If you start numbering variables you are doing ...

8 years ago | 0

| accepted

Answered
What is causing this error Undefined function or variable 'boolean'.
The error message is clear. Your code use |boolean| (which could be a function or a variable) but it does not exists. There coul...

8 years ago | 0

Answered
Can you update a constant in a function.
By definition a constant property is ... constant. Matlab is not designed so that these properties can change. To be perfect...

8 years ago | 1

Answered
How do I import this simple CSV? Should I use textscan or something else?
I'm not sure how this is different from your <https://www.mathworks.com/matlabcentral/answers/378264 other question>. Again, use...

8 years ago | 0

| accepted

Answered
How do I determine the number of data in a 'messy' CSV and then import it?
I'd use <https://www.mathworks.com/help/matlab/ref/readtable.html |readtable|> which should be able to work out the formatspec o...

8 years ago | 0

| accepted

Load more