Answered
Get the line number of the last warning found ?
You could shadow the buil-in |warning| function and grab the stacktrace manually msgBack = lastwarn; warnBack = warning...

9 years ago | 0

| accepted

Answered
Question about convhull code
Reading the M- and C-files is considered to be legal. You can resort the output easily to be sure that it has the wanted orde...

9 years ago | 0

| accepted

Answered
License for Matlab libraries like libmat
This is a public forum supported mainly by voluntary Matlab users. You need a bullet-proof answer about a legal question. Then c...

9 years ago | 1

Answered
Error using vertcat in using ode45
Wow, this code is unreadable. Did you create it manually? This would be such prone to typos, that I'd never trust the results. I...

9 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals.
What is your question? You have to use the debugger to find the reason of the problem. The indices are defined here: Row...

9 years ago | 0

| accepted

Answered
Changing output file name for multiple files
if(strcmp(line,'*RAS_HEADER_START')) %Open new file to write data to Default = fullfile(PathName, sprintf('data-...

9 years ago | 0

Answered
Web Browser won't load
Is the HTML file still open in Matlab? Did you close the file by |fclose|? Can you open the file in an editor?

9 years ago | 0

Answered
fsolve is not returning the right solution - matlab
Your equation contains e.g. 0/(1-0.00208+x5)^3 but the code B(i,j)/(1+E(j)+x(i)^j) The parenthesis differ. Try ...

9 years ago | 0

Answered
Eliminating zeros and NaNs from cell array
Perhaps: innerData = [rand(10, 1); zeros(5, 1); nan(5, 1)]; innerData = innerData(randperm(10, 10)); innerCell ...

9 years ago | 0

Answered
Speed up loading a single variable from a large mat file
Using a large MAT file and extracting a single variable takes time. There is no magic acceleration. The compression of the data ...

9 years ago | 0

| accepted

Answered
How can i convert border irregularity score(0-8) to range (0-1)?
What about dividing the result by 8?

9 years ago | 0

Answered
xlswrite command not working
The error message contains 4 ideas. Did you try them? If so, mentioning this detail would be very useful for the readers. As ...

9 years ago | 0

Answered
how to export this movie and play with other media players?
See <https://www.mathworks.com/help/matlab/ref/videowriter-object.html doc videowriter>, examples. Let me mention, that you c...

9 years ago | 0

Answered
Execute Command every time any command is executed
Running a "script BEFORE any script is being executed" is a contradiction and the direct implementation would cause an infinite ...

9 years ago | 0

Answered
Assign User-defined grayscale value
Create a lookup table: LUT = zeros(1, 256); LUT(50 + 1) = 1; Img = randi([0, 100], 200, 100); % Your image Gre...

9 years ago | 0

| accepted

Answered
How can I reduce the space between images?
Use |axes image| to use the original dimensions. You can find a lot of tools for adjusting the space between subplots in the ...

9 years ago | 0

Answered
How can I create a min step for ode45?
The ode5.m integrator should be faster than the smart ODE45 with stepsize control - if and only if the number of steps is smalle...

9 years ago | 1

Answered
index exceeds matrix dimension
Use the debugger to identify the problem. Type this in the command window dbstop if error or use the corresponding menu ...

9 years ago | 0

| accepted

Answered
How can I read the source code of FREAK extraction behind the ceval function?
Many of Matlab's ttolbox functions are provided as M-files, such that you can read the source. But some are eitehr compiled or s...

9 years ago | 0

| accepted

Answered
How to read variables from multiple '.tab' file?
Notes: There is no need for |fullfile|, if you have one argument only. Storing the fileIDs in a vector by |fid(i)| is nopt usefu...

9 years ago | 0

Answered
Grayscale of RGB channels
RGB = rand(100, 100, 3); % RGB array R = RGB(:, :, 1); % Gray image of the red channel G = RGB(:, :, 2); ...

9 years ago | 1

| accepted

Answered
global variables are fast? Functions make copies or not?
There are many discussions about the performance of global variables in the net. Simply search in thuis forum or using an intern...

9 years ago | 1

Answered
Error using nargin ,You can only call nargin/nargout from within a MATLAB function.
There are many orange an even red bars on the left side. Start with fixing them from top to bottom, because so errors may cause ...

9 years ago | 0

Answered
How do I get rid of positive or negative values in a cell array?
for iC = 1:numel(C) M = C{iC}; M(M > 0) = 0; C{iC} = -M; end

9 years ago | 2

| accepted

Answered
Coloring specific uitable cells plus adding content
See also: <https://www.mathworks.com/matlabcentral/answers/25038-how-to-change-each-cell-color-in-a-uitable> for coloring an uit...

9 years ago | 1

| accepted

Answered
How do I find and assign the x and y values of a point from an index array based on the value of z?
Perhaps: index = find(F1(:,1) > 100, 1, 'last'); % or 'first' x1 = x(index); y1 = y(index); But this is pur...

9 years ago | 0

| accepted

Answered
Identify and fill missing time gaps with NaN
This will be caused by the limited precision of floating point values. See: any(0:0.1:1 == 0.3) % FALSE! 735425.197916...

9 years ago | 0

| accepted

Answered
zoomed plot in the same figure
Do you mean: indexOfInterest = (x5 < 0.8) & (x5 >0.6); % range of t near perturbation plot(x5(indexOfInterest), y6(index...

9 years ago | 2

| accepted

Answered
I have a question about for loop
What about: xy = [e;f] + R * [a;b] % >= Matlab R2016b ? With older versions: xy = bsxfun(@plus, [e;f], R * [a;b]...

9 years ago | 0

Answered
How to find those function end with *fun
What about: FileList = dir(fullfile(matlabroot, '**', '*fun.m')) But I do not see that this is useful. "Could we find th...

9 years ago | 1

| accepted

Load more