Answered
Seeking a fast way to determine if axes are current
As Alexander pointed out, it may be desirable to avoid creating a figure with gcf. However, gca will have the same issues, if th...

8 years ago | 0

Answered
Convert cellarray with variables to cellarray of the variable names as strings
Hello Konstantinos, There kind of is, but Cedric is absolutely right. I have very rarely seen variable names as strings to be...

8 years ago | 1

| accepted

Answered
When I add columns to a table, it changes the assigned names to Var1, Var2 ...! How can I add columns to an existing table with the assigned names?
Hello Milad, What I believe is happening is that the table first creates columns to hold the new data before it then assigns ...

8 years ago | 0

| accepted

Answered
How can I repeat a complete "for loop" with new values and keep it running until a condition gets satisfied?
Something like this maybe: % Initial values to enter loop a = 19; power = 20; while power > 10 a = a-1; ...

8 years ago | 1

| accepted

Answered
Reading numeric part of line n MATLAB
Hello Poulomi, If you know that you'll only ever have a single colon (:) character in the row, you can use that to split off ...

8 years ago | 0

| accepted

Answered
Scrambling the object of an image without altering its white background
Hello Brahm, I believe that if you have a binary mask indicating where the object is, you could simply extract the linear ind...

8 years ago | 1

Answered
Write a 2D character array to textual file
Hello Marko, The most easily read code would probably be to either stick with dlmwrite, or loop through each row and use <htt...

8 years ago | 0

| accepted

Answered
how do i use the in-built inv function to calculate a matrix inverse and then calculate A-1A and AA-1.
Hello David, Strictly speaking, you would do it like this: Ainv = inv(A); Ainv*A A*Ainv However, as Stephen poi...

8 years ago | 0

| accepted

Answered
Plot lat lon on a map with state boundaries
Hello Ankur, The 'DisplayType' <https://www.mathworks.com/help/map/ref/geoshow.html#namevaluepairs name-value pair input to g...

8 years ago | 0

Answered
How to move an element from an array?
Hello Georgios, I'm not sure what the absolute best way to do this for your particular application, but here is one way you c...

8 years ago | 0

| accepted

Answered
Interp2 yields undesired results on center daigonal.
Hello Jacob, interp2 uses a bilinear interpolation algorithm by default. Here is an image illustrating what that means: <<...

8 years ago | 3

Answered
Getting errors for numerical integration
I would have thought the issue would be with one of the divides, not one of the multiplications. Either way, it's likely that yo...

8 years ago | 0

Answered
Textscan issue with txt file data delimited space : or .
Hello Mafalda, %f will specify to interpret the text as a floating point number. Since floating point numbers can have decima...

8 years ago | 0

Answered
How to extract matrix value given condition on another column
Hello Jesutoyosi, Based on your example matrix, I believe you meant that you want to extract from _row_ 2 every value that is...

8 years ago | 0

Answered
How do I loop on multiple indicies?
Hello Peter, The way you mentioned, having all the constants in a big matrix and looping through just the rows, would work fi...

8 years ago | 0

| accepted

Answered
How to import high resolution image without changing the body of program
Hello Rui, The actual size of the image should not be changing, except from any of the filtering that you are doing. What you...

8 years ago | 0

| accepted

Answered
whenver i insert this if statement inside a for loop, i get an error. Could someone please explain why? Much appreciated!
As Stephen is probably indicating, the input argument to the <https://www.mathworks.com/help/matlab/ref/input.html input> functi...

8 years ago | 0

Answered
Multiple plot controlled by the same popupmenu in GUI
Hey JB, I'd highly suggest having only one function that actually does the work. Just change the way you call that function s...

8 years ago | 1

| accepted

Answered
difference betwen matlab for ipad pro and matlab for win10 ?
Hello Andrea, There is a very big difference between how you can work with MATLAB on a computer, and how you can work with it...

8 years ago | 6

| accepted

Answered
Script fails only when managing large amount of files (Error: Matrix dimensions must agree)
Hello Mi, One thing that I can recommend is entering this command into the Command Window: dbstop if error Then try r...

8 years ago | 1

| accepted

Answered
Refresh value in checkbox upon popmenu
If you add a callback for the popup menu, you can even just make it call the checkbox callback in there. Or, for better programm...

8 years ago | 1

Answered
How do i combine an object tracking code with engine movement code ?
Hello George, It looks like both of the pieces of code are written as scripts. Scripts generally are written for single-shot ...

8 years ago | 0

| accepted

Answered
unable to call function in script
Sounds like you have multiple functions in the same file named InitializeNetwork. Is there another function with that same name ...

8 years ago | 1

Answered
Convert a .dat file to a .text or .xlsx file
Hello Max, I'm pretty surprised that all of fopen, importdata, imread, and load were able to read some form of data into MATL...

8 years ago | 1

Answered
How to keep only 1st row of every 450 rows of data
Hello Suzanne, You can just use <https://www.mathworks.com/help/matlab/ref/xlsread.html xlsread> or <https://www.mathworks.co...

8 years ago | 0

| accepted

Answered
How can I loop though a vector select certain elements and store them in a new vector?
Hey Mark, There is a very convenient feature in MATLAB called <https://www.mathworks.com/help/matlab/math/matrix-indexing.htm...

8 years ago | 0

| accepted

Answered
Find best rotation angle for alignment
Hello Alex, So I haven't actually played much with the Hough transformation before, but I believe it can be useful to you her...

8 years ago | 1

Answered
Is there any possible way of writing the following two-line code in one single line?
For the <https://www.mathworks.com/help/matlab/ref/size.html#inputarg_dim size> function, you can just provide the index of the ...

8 years ago | 1

Answered
How can I improve the image quality of a binary file after resizing
Hello Bene, My suggestion would be to check the image after resizing to see if it's the resizing or the thresholding that is ...

8 years ago | 0

Answered
Can the matlab app designer support the timer?
Hello Denny, There are several issues going on here. First, a couple of typos. I believe you meant "Text" not "Texy" and "dat...

8 years ago | 0

Load more