Answered
my P_daily not getting any value , is my start_day and end_day coding correct ?
just going on the comments, I would guess your loop should be for i = 1:length(Pmax)/24 %%% 365days start_day = 1+24...

9 years ago | 0

Answered
Find approximate match between 2 matrices.
You can try <https://www.mathworks.com/help/stats/pdist2.html |pdist2|> with a custom distance function: a function that returns...

9 years ago | 0

| accepted

Answered
Toolbox list that is under the same license is different on Window and Linux
The reason is that this toolbox seems not to be available on Linux at all (nor on Mac): <https://www.mathworks.com/products/avai...

9 years ago | 1

| accepted

Answered
catch or catch something? - Try, catch, end.
If you take a look at the documentation, you can see that |catch ME| stores the exception (all error information) in the variabl...

9 years ago | 0

| accepted

Answered
How can I sum anonymous functions?
You need to initialize |Hn| as an anonymous function as well: Hn = @(t) 0;

9 years ago | 0

| accepted

Answered
Conditional split into columns
You might be able to bodge this together with a conversion to |char|, use |strsplit| (or even |textscan|), and use |cellfun| to ...

9 years ago | 0

Answered
what is wrong with my code? vertcat error
The dimensions of matrices being concatenated are not consistent. |t| is a row-vector, 0 is not. Apart from that, |a| will ha...

9 years ago | 0

Answered
Save informations in handles and make them accessible through guidata.
handles.files = cell(length(F),2); guidata(hObject, eventdata) What you do there is incorrect. It tells Matlab to save the...

9 years ago | 1

| accepted

Answered
Compute negative image processing pixel by pixel
Congratulation, you came up with a better solution than the one your instructor asked you. You can even make this one shorter: ...

9 years ago | 2

| accepted

Answered
Color Plot in MATLAB
<https://www.mathworks.com/help/matlab/ref/convhull.html |convhull|> could get you most of the way.

9 years ago | 0

Answered
controlling the directory of the output file?!
You can get the filename and name of the current function with |dbstack|: ST = dbstack('-completenames'); ST = fil...

9 years ago | 0

| accepted

Answered
Is there a way to change default editor font and background color?
Go to your 'Home' tab in the lint and click the preferences button. There you will find all available settings. You will need to...

9 years ago | 3

| accepted

Answered
How do I write this function and plot it?
There are many ways you can solve this. This approach is by no means the most efficient, fast or elegant, but I think it shows a...

9 years ago | 0

Answered
GUI slows down when plotting to figure sequentially
With |hold on| your plot is containing more data every loop, which slows down your function. A solution is to not use |hold on|,...

9 years ago | 1

Answered
Error using get, Invalid handle
Have a read <https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answe...

9 years ago | 0

Answered
find the distance from 1 point to all point
The implicit expansion introduced in R2016b can make life easier (here it can make the command a bit shorter), but I'm going to ...

9 years ago | 1

| accepted

Answered
How to change the white lines to black?
Yes. If you convert this to a greyscale image, you should be able to determine a threshold that covers most white/grey pixel....

9 years ago | 0

Answered
How to gracefully terminate continiuous script?
What I have done in a GUI is adding a button that is only visible when a callback is active. Each iteration of the loop I first ...

9 years ago | 0

Answered
How do I loop 10 questions, and tell in my codes if it´s right or wrong?
Just wrap your code in a for-loop: for n_question=1:10 %slumpa tal mellan 1-10 och lagra det i variabeln X eller Y x=rand...

9 years ago | 0

Answered
[68 65 6c 6c 6f 20 68 6f] i want to convert this vector into a matrix 4*4 with nibble (4 bits)?
All you changed with |format hex| is the way Matlab shows you the values, you didn't actually change the values. You can convert...

9 years ago | 0

| accepted

Answered
Possibility of decompiling .exe to m files?
Have you tried _insert favorite search engine_? My first hit was <https://www.mathworks.com/matlabcentral/answers/32091-decompil...

9 years ago | 0

Answered
eval vz feval, different results
The reason would depend on a slightly different method of calculation and rounding. I don't think the exact difference is really...

9 years ago | 0

Answered
Change axis property in GUIDE
Why not use the |set| command directly on your handle? set(handles.EEGAxes, 'XTick', 0:5:(cislo)/fvz); set(handles.EEGAxes...

9 years ago | 0

Answered
Setting the Choice in a popup-menu
Just use the |set| function: set(DropdownObject,'Value',3) %set the dropdown selection to the third option without running...

9 years ago | 1

| accepted

Answered
how to plot the magnitude of x(k) in matlab
You already have a function, you just need to calculate the magnitude, which is just the |abs| function. The thing is, you can s...

9 years ago | 0

| accepted

Answered
Is is possible to convert 8bit RGB image to 24bit?
According to the <https://www.mathworks.com/help/matlab/ref/imwrite.html doc for |imwrite|>, you should be able to write 24 bit ...

9 years ago | 0

Answered
How I can change some of color in my RGB picture
Convert this to a binary image, making white pixels true, and the rest false. You will notice you have 5 groups of pixels, the s...

9 years ago | 0

Answered
How to convert character cells to date?
Cells can be tricky to work with. The problem you encountered here is that you can't batch-process cells this way, you'll need t...

9 years ago | 1

Answered
recursive function hangs after a few steps
I think you should run this in a loop, not as a recursive function. Just pre-allocate an array and loop through it. Added bonus ...

9 years ago | 0

Answered
While Loop Plotting Single Point Values
If you have only single points, don't try to plot a line. You need to specify a format that plots points, like '.', '*' or 'd'. ...

9 years ago | 0

Load more