Community Profile

photo

Rik


1 290 total contributions since 2017

E-mails with feedback/questions about FEX submissions are welcomed. In general I will post e-mails about Answers on the related page, unless there is good cause not to do so.

Contact

Rik's Badges

  • 12 Month Streak
  • Revival Level 3
  • Guiding Light
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
Plot a my own created function
Your output is sometimes complex. You should fix this in your function, but you can also apply a quick fix here: fplot(@(Lambda...

2 jours ago | 0

| accepted

Answered
Find the earliest common date and indicator of two date vectors.
This answer assumes you have your dates in a datetime format. If you don't it should be relatively easy to convert to it. If you...

2 jours ago | 1

Answered
"patch" command error
I suspect you generated the vertex IDs in a programming language that is zero-indexed, instead of one-indexed. If that is the ca...

2 jours ago | 0

| accepted

Answered
Figure editing shortcut missing
Edit: You can open the plot tools with the plottools function. You can probably add this as a custom button, but otherwise the ...

2 jours ago | 0

Answered
Presenting 48 images in 4 conditions where each image is presented only once?
Do you mean something like this? %generate some empty structs for testing %(replace by appropriate calls to the dir function) ...

3 jours ago | 0

Answered
Will m files work that were made in matlab R2018a work in matlab R2017b?
You can check the release notes to see if you're using functions that were introduced in R2018a, but I suspect from your descrip...

3 jours ago | 1

| accepted

Answered
How to convert row and column data into x,y,flag format?
BW1=[0 0 1;1 1 0];%example matrix [Y,X]=ndgrid(1:size(BW1,1),1:size(BW1,2)); data=[X(:) Y(:) BW1(:)];

4 jours ago | 0

Answered
Intensity profile of an image
improfile should work

4 jours ago | 0

Answered
How to append data from multiple runs of script without overwriting previous data.
Use one of the append options from fopen: 'r' Open file for reading. 'w' Open or create new file for writing. Discard existing...

4 jours ago | 0

| accepted

Answered
need help the mean of this code
This is horrible code. I would strongly suggest not using it. However, it should be easy to see what is happening if you go thr...

4 jours ago | 1

| accepted

Answered
Get time/date online
Slightly expanding the above solution by Vincent, the attached code should work on all Matlab releases, as well as GNU Octave. I...

5 jours ago | 0

Answered
evalin('caller','mfilename') does not work.
Depending on your release you can get the complete names including the path from dbstack (in v6.5 you couldn't, but already sinc...

6 jours ago | 1

| accepted

Answered
How do i make figures plotted in Matlab to appear in a chronological order?
You can bring focus to a figure with the figure function: h=struct; h.f=zeros(1,5);%will contain the handles to the figures f...

6 jours ago | 0

| accepted

Answered
How do i load a file automatically in a particular folder just by a part of the filename?
folder='C:\Path\To\Your\Data'; list_of_files=dir(fullfile(folder,'Annot*')); %remove any matching folders list_of_files([li...

6 jours ago | 1

| accepted

Answered
An accumulating matrix to be reset when the limit value is reached, the value being reset must be moved to another matrix
This should do the trick. Note that you should use numel to count the number of elements, not length, which is just doing max(si...

7 jours ago | 3

| accepted

Answered
Calling a callback function in GUI
Your problem is not taking into account the full potential of callbacks. You throw away the handle to the object you're using. Y...

7 jours ago | 1

| accepted

Answered
passing variable from one callback to another callback in gui
Store the value of k inside your guidata struct.

7 jours ago | 0

Answered
could anyone help me how to check the size of bigger matrix and run the code accordingly.
This code should work: if numel(A) > numel(B) A_=A;B_=B; else A_=B;B_=A; end [jj,kk]=size(A_) [jjj,kk...

7 jours ago | 0

Answered
Intergral calculation for data vector
You define your t vector only after you use it in trapz. But more importantly, your figure looks like you don't mean an integrat...

11 jours ago | 0

| accepted

Answered
change the xticklabel with date format
I don't know if there is a control for the non-marked ticks, but maybe box does something you like. For the ticks, you should b...

11 jours ago | 0

| accepted

Answered
Extract rows from a matrix using time ranges
I'm going to assume your last element of B should be 1 larger, because then your C makes sense. The code below should do what yo...

11 jours ago | 4

| accepted

Answered
How to draw lines with the points obtained from getpts
You're getting 4 points, which you then plot with the line function. The name might sound like it only produces straight lines f...

11 jours ago | 0

Answered
How do I map the data using interp1()?
I have no clue why you would want to do this, but the code below will treat the histogram as a lookup table. You need to convert...

12 jours ago | 0

Answered
Using throw error to validate string input
if any(~x) error(msg) end

12 jours ago | 0

| accepted

Answered
how to add to image ?
I would presume this means that you have an image where you add mean(X,'all') to the original. The loops are not needed in Matla...

13 jours ago | 1

Answered
x-axis value
You x-axis exponent has me believe that you already have the correct range and that your goal is to show nanoseconds instead of ...

15 jours ago | 0

| accepted

Answered
how can i change the xlim in bar?
You mean like this? set(gca,'XTick',ceil(1970:2.5:2005))

16 jours ago | 0

| accepted

Answered
Displaying values in static box for values in pop up menu !!
There is a difference between the Value property and the String property. Also, you're better off using switch (which will make ...

16 jours ago | 0

| accepted

Answered
How can i plot this kind of figure in Matlab ?
Looks like a bar plot and a line plot combined in one axis. Don't forget hold on when making this. For the second y axis you ca...

17 jours ago | 0

Answered
An easy problem for you,propably
Matlab doesn't work with double conditions, so you need to use a setup like the one below if you want to keep your code structur...

17 jours ago | 1

Load more