Answered
Error using horzcat Dimensions of matrices being concatenated are not consistent.
Isn't the error message clear? Obviously, a0 has more than one row, hence you can't concatenate it with a one row matrix. As we...

7 years ago | 0

Answered
Vectorise or make this code run faster
This is really basic matlab Z = I(:, :, 1) - I(:, :, 2) - I(:, :, 3);

7 years ago | 0

Answered
Hide class property, but retain autocomplete?
Hidden means hidden, from display and autocompletion. There's no workaround. However, what you could do is customise the displa...

7 years ago | 3

| accepted

Answered
Elementary question, for loop implementation
As we've just said in your previous question, do not create numbered arrays. It's always the wrong approach, as you can see now,...

7 years ago | 0

Answered
Creating arrayfun with two variables
You seem to be expecting implicit expansion out of arrayfun (the way bsxfun works). arrayfun doesn't do that (and bsxfun can't c...

7 years ago | 0

| accepted

Answered
please, how do we give each region a color after the segmentation ?
label2rgb is one way to do it.

7 years ago | 0

Answered
i want to change [3,2,4](1x3 matrix) to 324(1x1 matrix) any help?
polyval(yourvector, 10) would also work But what if your vector is [30, 20, 40]?

7 years ago | 1

| accepted

Answered
Using the PNG algorithm to save a .mat file
The compression method that PNG uses is the well established deflate algorithm. This is the same algorithm that gzip uses and is...

7 years ago | 0

Answered
find the longest monotonically increasing subsequence of a sequence of n numbers?
Your question is confusing.You talk of finding "the longest monotonically increasing subsequence of a sequence of n numbers", th...

7 years ago | 0

Answered
How to index 8 surrounding cells in a 6x6 2D matrix?
Oh, so you're implementing a variation of Conway's game of life except that your cellular automaton has three states instead of ...

7 years ago | 1

Answered
Divide table takes a lot of calculation time
I doubt you're using any feature of a table with a table that large so why not store your data in a matrix instead. Matrix opera...

7 years ago | 1

| accepted

Answered
How can I remove entire rows from a table based on NaN values in a specific column (cell data type) in a table?
Note that it's not usually a good idea to mix textual and numeric content in the same column of a table. Additionally, since you...

7 years ago | 1

Answered
Read text file and separate text from numerical values
Depending on what exactly you want to import, this could work: opts = fixedWidthImportOptions('NumVariables', 8, ... ...

7 years ago | 0

| accepted

Answered
Scam Matlab Help Chat
I've just had it confirmed by Mathworks that it is legit

7 years ago | 0

| accepted

Answered
How can I convert my .txt files to .xls using xlswrite
An example of a text file would be very useful. What you want to do would probably be very easy to do using the modern import an...

7 years ago | 0

Answered
How can I concatenate a 3-d matrix to 2-d?
Two methods, I'll let you test which one is faster, probably the permute one: B = reshape(permute(A, [1 3 2]), [], size(A, 2)) ...

7 years ago | 1

| accepted

Answered
Setting object properties without returning the object using obj = obj.myfun(obj,argin)
What you want is a handle class. See Comparison of Handle and Value Classes for more details. Note that if you're not proficien...

7 years ago | 0

| accepted

Answered
Find empty cells in excel
Have you checked what the content of raw actually is for cells that are empty in excel? In my version of matlab (2018b) with my ...

7 years ago | 0

Answered
How to cipher an input file?
dlmread is not for reading text files.The easiest way to import a text file is with fileread. plik = fileread(fid); %note that ...

7 years ago | 1

| accepted

Answered
How to recursively go through all directories and sub directories and process files?
Since R2016b, dir can recurse through subdirectories using **. So it's as simple as: rootdir = 'C:\somewhere\somedirectory'; f...

7 years ago | 18

| accepted

Answered
gcf repeatedly returns gui and not newly created figures
How do I ensure that my print command prints the figure that is on top at the time? Simple, don't rely on the current figure si...

7 years ago | 2

| accepted

Answered
How to search for the same value found in one matrix in another matrix
is there a way i could change it so I only recieve the first value? You can tell find to return the first value: [row, col] = ...

7 years ago | 0

Answered
Creating combinations of 3 vectors
Akira's answer is how I'd do it. Just for the record here is another method indices = dec2base(0:size(A, 1)^size(A, 2)-1, size...

7 years ago | 1

Answered
hyper-spectral image displays in not true color it shows in blue
I'm sorry to say I'm struggling to understand what you're asking so my answer may be completely off the mark. I think you may b...

7 years ago | 1

| accepted

Answered
Using ismember to get the corresponding elements
I think I understand what you want, if so, you're using ismember the 'wrong way round': function real_time = time_from_videos_t...

7 years ago | 0

Answered
How to pass a string (LPSTR) command to my C++ function?
I think you need to go back through the documentation of the function that you're using. I would never expect to have to pass a ...

7 years ago | 1

Answered
I keep getting 'Index exceeds array bounds.' my code doesn't like r(i)
"my code doesn't like r(i)" There's no liking involved. Your code does exactly what you tell it to. If you tell it to do someth...

7 years ago | 0

Answered
Rightmost Digit Counter Script - Index exceeds array bounds
The best way for you to understand the problems with your code (unfortunately there are many), is to debug it yourself. Step thr...

7 years ago | 0

Answered
Converting hexadecimal to decimal in base 10 using a loop (not function hex2dec)
For reference, here is how I would implement the conversion efficiently in matlab (without using hex2dec): hex = upper(input('E...

7 years ago | 0

Answered
Condition on the last last frame of a video
Well, you need to ask the filesystem for the list of files, extract the file numbers from that list then select the greatest one...

7 years ago | 0

| accepted

Load more