Answered
Illegal use of reserved keyword
Unless that function is in a larger file which is a class definition (i.e. the very first line of the file except for comments i...

8 years ago | 0

Answered
Linear regression between every 3×3 pixels of two rasters
For what you want to do, |blockproc| wouldn't work as it does not overlap the blocks. <https://www.mathworks.com/help/images/ref...

8 years ago | 0

| accepted

Answered
Changing the header in a file which include binary content
For a start, you never put back all the |\n| characters that you've removed. fprintf(fid, strjoin(A, '\n')); may work. H...

8 years ago | 1

| accepted

Answered
find the number of elements in matrix
Should work regardless of the type of data in the 6th column: [id, group] = findgroups(yourtable.nameof6column) count = ...

8 years ago | 0

Answered
Bonjour ,je cherche une commande sur matlab qui me permet de détecter les minuscules ou les majuscules dans une chaines de caractère pleaaaz can you help me !
>> s = 'A De DanS'; >> isstrprop(s, 'upper') ans = 1×9 logical array 1 0 1 0 0 1 0 0 1 >>...

8 years ago | 1

| accepted

Answered
Comparing two values of a matrice
Ok, I'm a bit unclear why we have a variable for age but not one for chest pain in your question. Never mind, let's assume it's ...

8 years ago | 1

| accepted

Answered
How to efficiently find maximum of selected indices of an array in MATLAB?
You don't have a choice, a loop is required for that. Either an explicit one: pv = zeros(size(s_on)); for idx = 1:numel...

8 years ago | 0

| accepted

Answered
How to shuffle an image diagonally?
Sounds like a 180 rotation, so: rot90(yourimage, 2)

8 years ago | 0

| accepted

Answered
Need help for LAB to RGB conversions of an image
You would usually display the 3 channels separately after conversion. I.e.: figure; for channel = 1:3 subplot(2, 1...

8 years ago | 0

Answered
How could I convert python code to matlab?
Eeek! That's not an efficient algorithm. There are <https://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree much better algorith...

8 years ago | 0

Answered
I am trying to convert this for loop from matlab to C. Could someone please help
Note: It's been ages since I've written any C code, and even then it was mostly C++ not C. Expect some bugs. First you'll hav...

8 years ago | 0

| accepted

Answered
comparing floating point numbers
If you're trying to find at which |k| index of |B| the value |A(i)| is between |B(k)| and |B(k+1)|, then: [~, idx] = histc(...

8 years ago | 0

Answered
Convert HH:MM:SS.FFF to seconds
Assuming you're on a not too ancient version of matlab: t = readtable('Acceleration_2018_04_04_0159.dat'); d = datetime(...

8 years ago | 1

Answered
from excel file 12-bit binary signed numbers to decimal values into matlab
It's easier if you force matlab to read these numbers as text: fid = fopen('data.csv'); text = textscan(fid, '%s%s', 'De...

8 years ago | 1

| accepted

Answered
Replacing elements of multilevel cell arrays
Assuming that all |meancalc{t,u}{v,w}| contain matrices, you'll have to use a double for loop: for outer = 1:numel(meancalc...

8 years ago | 0

| accepted

Answered
how to display folder which is already stored?
It seems that you already have done all the work necessary to plot your images into a single window (with the |subplot| lines) b...

8 years ago | 0

Answered
Background color row in table
No, the variable editor is fairly basic, and does not offer any option to colour cells, columns or rows. If you were to create y...

8 years ago | 0

| accepted

Answered
How to seperate data stored as a table in matlab into multiple tables based on the date.
_Any idea how to do this using R2017b_ Yes, don't do it! In general splitting one variable into multiple variables is a bad i...

8 years ago | 0

Answered
MATLAB Online Font Type
According to the developer tools in my browser (Firefox Windows), the font is specified as font-family: Menlo, Monaco, Con...

8 years ago | 1

Answered
I have randomly placed 10 nodes in a 100x100 area. Now I need those node to get connected to each other that are within the provided range.
*File3:* Unknown = load('unknwn.mat'); Pop = load('anch.mat'); Dist = load('Distance.mat'); Dist = Dist.Dist; f...

8 years ago | 0

Answered
Create new variable that is first n numbers of data where n is a DataIndex
Array indices always start at 1 in matlab. The problem is not with |YieldIdx| (assuming it's smaller than |numel(Xresil)| and in...

8 years ago | 0

| accepted

Answered
How to obtain true length (pixel-center to pixel-center) of convex hulls in a multi-object image
|convhull| returns the index in the pixel list to keep in order to get the convex hull. hull1 = convhull(props(28).PixelLi...

8 years ago | 1

Answered
How to obtain true length (pixel-center to pixel-center) of convex hulls in a multi-object image
Yes, I really hate that |regionprops| consider pixels to have an area. You get the same issue that |BoundingBox| is offset by 0....

8 years ago | 1

| accepted

Answered
How to sort any size matrix elements from largest to smallest using loop?
I have not looked in enough details at your code to know why it doesn't work for n = 3. I suspect that it does not work for a lo...

8 years ago | 0

Answered
How to get rid of a row if one column is less than a certain value?
You started with a table which are a lot easier to work with than cell arrays, so get rid of the |table2cell|. For that matter, ...

8 years ago | 0

Answered
How to also read the first row correctly with 'readtable'
You seem to be confusing rows and columns. |'ReadRowNames', true| means use the values in the *1st column* to name the *rows*. I...

8 years ago | 2

| accepted

Answered
How can i convert this simple program from Matlab into visual basic
|y(end)| is simply the last element of the array, so you simply have to replace the end by the index of the last element of the ...

8 years ago | 0

Answered
Using the find function in a loop
The immediate cause for the error is simple, you already have a variable called |datarecords| and it's not a cell array. Since n...

8 years ago | 0

| accepted

Answered
Can someone tell me what is wrong with my code, and any corrections to be made?
_"I dont know how to go about fixing it"_ The best way is to <https://www.mathworks.com/help/matlab/matlab_prog/debugging-pro...

8 years ago | 0

Answered
Counting numbers over a threshold in a row
demoarray = randi(500, 5200, 6); %demodata threshold = 50; minrunlength = 48; runedges = diff([false(1, size(demo...

8 years ago | 0

| accepted

Load more