Answered
i cannot copy figure
Apart from an external screenshot tool, you can also use the <https://www.mathworks.com/matlabcentral/fileexchange/23629-export_...

7 years ago | 0

| accepted

Answered
How to find duplicate values in 2d matrix?
You can indeed use findgroups. You should supply the first two columns as separate inputs. G=findgroups(M(:,1),M(:,2)); ...

7 years ago | 1

| accepted

Answered
Question about STL file
An stl file has two parts. One part contains triplets of vertex IDs, and the other part contains the xyz coordinates of each ver...

7 years ago | 1

| accepted

Answered
How to pass a matlab string as an exclamation point command
If you use the system function instead of the exclamation point operator you can pass a fully parsed char array.

7 years ago | 1

| accepted

Answered
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
Maybe this idea has been suggested before, but maybe it would be good to have a down vote button. I sometimes see answers of que...

7 years ago | 1

Answered
Keep a figure full screen while looping
Store the output of imshow in a variable (it is a handle to the image object). Then inside the loop only change the CData pro...

7 years ago | 0

Answered
Show Images with Filenames in Cell Array
You will have to program that sequential behavior yourself. for n=1:numel(q) IM=imread(q{n}); imshow(IM) ...

7 years ago | 0

Answered
Export a cell array containing cell arrays
You need to generate the iteration labels (which is easiest with a cell array. I have once written a function that generates exc...

7 years ago | 0

Answered
Creation of Series of Directory
You can use the sprintf function to create char arrays with a pattern. N=10; for n=1:N mkdir(sprintf('HealthCareUnit-...

7 years ago | 1

| accepted

Answered
Creating a 365x24 matrix using for and if
You're confusing while and for. But you need neither: COSMY2014=-9999*ones(365,24);

7 years ago | 1

| accepted

Answered
Loop: Index Exceeds Matrix Dimensions / less values than required.
If it is fine to use fewer values for the end of your loop, you can do this: %replace this Dataset(start_limit:end_limit,1...

7 years ago | 0

| accepted

Answered
Count how many times a number appears for X number of rows (e.g 99 rows) in an array.
You have two options: # use the runlength function by Jan (you can get it from the File Exchange) # replace 1:length(data) ...

7 years ago | 0

| accepted

Answered
How to create a matrix out of all the possible combinations of a vector
https://www.mathworks.com/help/matlab/ref/perms.html

7 years ago | 1

Answered
Adding 3 images to a GUI showing the red, green, and blue channel of an image
RGB images in Matlab are stored as 3D arrays. As the third dimension stores the colors, something like this should work (pay att...

7 years ago | 0

| accepted

Answered
GUI axes question, need help having a minimal and maximal edit box for the x axes values
Set the XLim property of the axes object in a callback. Make sure not to forget to use str2double, to check for NaN input, to...

7 years ago | 0

| accepted

Answered
Invalid expression...Line 16 column 48
You have a closing parenthesis too early: plot(x(n+1,1))*1e6;x(n+1,2)*1e6 % ^ Also, you should use commas to...

7 years ago | 0

| accepted

Answered
"Index in position 1 exceeds array bounds" error for loop
Instead of this line for j = 1:length(brakingData) Use this: for j = 1:(size(brakingData,1)-1) Although you can ...

7 years ago | 0

Answered
How do I use X&Y Arrays in a formula to get and Array answer?
Use ndgrid to generate the full array of combinations. You could also do it with implicit expansion, but that makes it harder to...

7 years ago | 2

| accepted

Answered
Convert String to Expression for IF Statement
data<1000 That will return a logical (true or false value). parseCond=@(data) data<1000; That will create an anony...

7 years ago | 3

| accepted

Answered
looping though multiple sub-directories
Yes, you just need to load your text file with your paths, and then loop over the contents. If you need help with loading the te...

7 years ago | 0

Answered
How to find the area of a segmented image in matlab?
You can make use of the fact that true is stored as a 1. Make sure your object is the only one marked with true and then use thi...

7 years ago | 4

| accepted

Answered
Load particular data in a .m file from another .m file from different folder.
I'm going to guess that your m file is not a function but a script. I would recommend using functions for anything but testing. ...

7 years ago | 2

| accepted

Answered
Extracting file name elements to vectors
You can put the contents of your loop in a separate function and call that with arrayfun if you insist, but that will not really...

7 years ago | 0

Answered
Reading a 97-2003 xls file
Sometimes it helps to provide the full file name including the extension. That way Matlab doesn't have to determine the file typ...

7 years ago | 1

Answered
Query data from 1xn struct
The |table| data type is probably a better choice for your usage. Then you can also easily index.

7 years ago | 0

| accepted

Answered
How to plot $40b^2x-9b^2-60bx+72b-144=0$
It shouldn't be too hard to pry out x from this equation. Getting out b is a bit more tricky. 40b^2x-9b​^2-60bx+72​b-144=0 ...

7 years ago | 0

| accepted

Answered
Histograms from point cloud
It looks like you can use the columns from xyzPoints, because they seem to store the coordinates. Otherwise you could also use t...

7 years ago | 0

| accepted

Answered
Slider which changes images
Live updates are a bit more tricky, but you can use the uicontrol function to create a slider. Then you can use the callback fun...

7 years ago | 1

| accepted

Answered
How to read N number of .log files at a time?
Generate the file names with sprintf and loop over the files.

7 years ago | 0

Answered
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
Editor support on mobile seems not fully tested. (I'm using Android 9 (Lineage OS), with Chrome as browser and Swiftkey as the k...

7 years ago | 0

Load more