Answered
Not enogh in input arguments error in matlab code. how to solve?
Paolo is correct, there can be only one reason to get: Error using solve_alpha (line 14) Not enough input arguments. ...

8 years ago | 1

Answered
Adding an Extra Input Parameter to the Function
[features,history] = sequentialfs(@(xTrain,yTrain,xTest,yTest) fun(xTrain,yTrain,xTest,classifier) , ... X,Y,'directi...

8 years ago | 1

Answered
Question about Imaging functions
_why doesnt the following codes have the same index values_ Because |image| and |imshow| don't behave the same way at all. ...

8 years ago | 0

| accepted

Answered
Imwrite() problem with saving sequence images
Here is how I would do it: output_folder = 'C:\Users\Tossaworn\Desktop'; files = dir('*.mat'); for fidx = 1:numel(fil...

8 years ago | 1

| accepted

Answered
Logical lookup between two dates
Assuming R2016b or later: sum(a >= b' & a <= c') In earlier versions sum(bsxfun(@ge, a, b') & bsxfun(@le, a, c')) ...

8 years ago | 0

| accepted

Answered
Movefile "the system cannot find the path specified" (Windows OS)
In addition to Jan's suggestion of the FileExchange files, since you're on Windows you can also delegate the renaming to .Net: ...

8 years ago | 0

| accepted

Answered
delete rows in a table
Assuming you indeed have a matlab table: yourtable(yourtable.column2 == 0, :) = []; will delete all rows whose column2 i...

8 years ago | 3

| accepted

Answered
Preallocate a variable of unknown size
That's some overly complicated code there. For example, for j = 1 : length(nodes.PrtCtyAll{i}) DstBlocks{i}{j,1} = n...

8 years ago | 1

| accepted

Answered
Getting data from array socket
where = find(header == 53); if ~isempty(where) %at least one 53 found nextbytes = header(where + 1); %n...

8 years ago | 1

| accepted

Answered
Create and fill in a table in Microsoft Word with Actx Server from MATLAB
Here is part of some code I wrote several years ago that adds a long table to an existing word document. The word table was fill...

8 years ago | 1

| accepted

Answered
fopen a file from another directory location
_the output variable of the fopen is 3_ That is expected and means that |fopen| is succesful. _if I open the same file in ...

8 years ago | 0

Answered
Problem using max function on relatively large arrays
The proper syntax is: max(power_laboratori, [], 'omitnan') The |[]| is important as |'omitnan'| must be the third argume...

8 years ago | 1

Answered
Import excel sheet, multiply each column with a variable, and save the results as a new cell array
Another option that would avoid the |repmat| is to temporarily reshape the matrix as a 3D array, perform the multiplication with...

8 years ago | 1

Answered
How can I use a while loop to fill in certain cells of an array?
Your data is ideally suited for a table or even a timetable. In fact, if you use a timetable, obtaining what you want is trivial...

8 years ago | 0

Answered
Why I will get error:Index exceeds matrix dimensions
I'm not sure what you're trying to achieve. However, modulated = zeros(1, 200*num_bit) crates an array with *1* rows and...

8 years ago | 0

| accepted

Answered
Automatic Refactoring of Classes
Unfortunately, the refactoring tools are very limited in matlab. I'm afraid you're left with search and replace. You'll have the...

8 years ago | 0

| accepted

Answered
error --> Brace indexing is not supported for variables of this type.
What the error message means is simple, you cannot use |{}| to index your |GroupingValue_1| because for that type of variable, |...

8 years ago | 7

| accepted

Answered
Run external software from Matlab using system() with admin rights
_but got the error: No method 'Start' with matching signature found for class 'System.Diagnostics.Process'._ That's because t...

8 years ago | 1

Answered
How to go through multiple different naming folders for the same subfolder name
|dir| has been able to perform recursive searches for a few versions now, so if all you want to do is get a list of all the file...

8 years ago | 0

Answered
Combine columns of multiple arrays using for loop
_Preferably the output would be vertical with the ability to decipher where one column has ended and another starts_ Is this ...

8 years ago | 0

| accepted

Answered
How can I password-protect functions and scripts
You can <https://www.mathworks.com/help/matlab/ref/pcode.html |pcode|> the files and distribute the p files which cannot be edit...

8 years ago | 1

| accepted

Answered
How to make directories within directories within directories
Numbered variables are always an indication of a flawed design. Your algorithm is not easily extensible to adding more levels to...

8 years ago | 1

Answered
For loop only shows result of last loop
I haven't fully tried to understand what your code is parsing but I can tell you it can be achieved much more easily. If you exp...

8 years ago | 0

Answered
How to apply Time synchronous averaging on a database
I'm not sure what examples you're referring to. If you're talking about the examples in the <https://uk.mathworks.com/help/signa...

8 years ago | 0

| accepted

Answered
Nested ifs, while, for, for not working
Rather than giving us code that doesn't work and hence we can't understand, give us a numeric example of input and desired outpu...

8 years ago | 0

Answered
Function Changem or substitute values of a matrix
As per sloppydisk's answer, |changem| requires the mapping toolbox, so clearly you don't have that installed. I don't have th...

8 years ago | 3

| accepted

Answered
Dicomread images with different x and y sizes into a cellarray.
You've answered your question in its title. Use a cell array: [Filename1,Pathname1]=uigetfile('Multiselect','on'); image...

8 years ago | 0

| accepted

Answered
readimage function throws error in MAtlab 2018a
For some reason, the content of |categorical/subsref.m| (true path of the file is the output of |fullfile(matlabroot, 'toolbox',...

8 years ago | 0

Answered
remove background and increase the contrast
For the contrast, have you tried <https://www.mathworks.com/help/images/ref/imadjust.html |imadjust|>? For the background, ty...

8 years ago | 0

| accepted

Answered
Combining cell array and double vector into sprintf
I'm surprised nobody's mentioned <https://www.mathworks.com/help/matlab/ref/compose.html |compose|> which is the modern, more po...

8 years ago | 0

Load more