Community Profile

photo

Rik


Last seen: Today
1,974 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

  • 36 Month Streak
  • GitHub Submissions Level 3
  • Ace
  • Personal Best Downloads Level 3
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 4
  • First Submission
  • Revival Level 3
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
Matrix probability with just one 1
This code only works for positions with equal probability. dist=[0 0.5 0 0 0.5]; valid_pos=find(dist);%select non-zero out=...

13 hours ago | 0

| accepted

Answered
Looping through different files with sprintf
Read the documentation for sprintf. filename=sprintf('sub%02d.mat',s); You also probably want to actually the loaded data: in...

1 day ago | 0

| accepted

Answered
matlab URI can not access to a valid url webpage
You forgot to input the URI as a char array: r = RequestMessage; uri = URI('http://maps.googleapis.com/maps/api/staticmap?cent...

1 day ago | 0

Answered
How to solve this question? Help :'(
You should learn about the linspace function. I would also suggest you check if you have x and y correct. I kept your convention...

2 days ago | 0

| accepted

Answered
Octave problem with solution
You misplaced one dot: the division is currently a matrix division, instead of an element-wise operation. Note that subtraction ...

2 days ago | 0

Answered
I need to create a button UI that undo the graph which I plotted without using GUIDE
You will have to store the handle to your last plotted graph and either delete it, or set the Visibility to 'off'.

3 days ago | 0

Submitted


Wayback Machine API
This functions acts as an API for the Wayback Machine (web.archive.org).

4 days ago | 3 downloads |

Thumbnail

Submitted


readfile
read any (text) file, either UTF8 or ANSI

4 days ago | 7 downloads |

Thumbnail

Submitted


Bible Downloader
Download Bible translations from a GUI

4 days ago | 1 download |

Thumbnail

Question


What frustrates you about MATLAB? #2
Similar to what has happened with the wishlist threads (#1 #2 #3 #4 #5), the "what frustrates you about MATLAB" thread has becom...

4 days ago | 3 answers | 2

3

answers

Answered
Extract number and infromation from multiple image files ?
The code below should do what you need. Adapt as needed. folder = 'Defolder'; S = dir(fullfile(folder,'*.jpg')); N = {S.name}...

5 days ago | 0

| accepted

Answered
How to handle functions with multiple outputs
You will need a wrapper function (which you can make fancy if you want, but I made it simple). f=@(x1,x2)wrapper(x1,x2); f...

5 days ago | 0

| accepted

Answered
How to search for an array inside another array?
idx=find(ismember(a,b,'row'))

6 days ago | 0

| accepted

Answered
Faster way to make movies than drawing figures
You should initialize the graphics objects outside the loop and then modify the properties inside the loop. The dynamic expansi...

6 days ago | 0

Answered
Compare elements in a matrix for a variable
So essentially a lookup table? %generate some random data id= rand(75,1); r= rand(75,1); id_list=unique(id); M_3D=id_list(r...

7 days ago | 0

Answered
How to display specific image in different window(figure 2)?
If you want to show two images side by side you can use subplot. If your Matlab is new enough you can even use tiledlayout.

8 days ago | 0

Answered
Creating one curve from different curves
There are at least 3 methods I could think of, each with their own pros and cons: figure(1),clf(1) %% with the symbolic tool...

8 days ago | 0

Answered
tan^2*(45+x/2)
You probably mean either of these: % if x is in radians: tan(45+x/2).^2 % if x is in degrees: tand(45+x/2).^2 If you don'...

8 days ago | 0

Answered
How do I take repeat the calculation of average column?
splitapply will do the trick. You can fairly easily find the number between 'data' and '--', so creating the group IDs shouldn't...

9 days ago | 1

| accepted

Answered
Create a mobile app with MATLAB
You may have some luck with converting to JavaScript. You could also try this doc page and the pages it links to for informatio...

10 days ago | 1

Answered
Can I write a builtin Clock in my standalone application exe file?
Host the UTC timestamp on your server and then use a function to retrieve it. That way you have a known correct date to verify y...

10 days ago | 0

Answered
How to clear this plot?
You should probably make your code into a function instead of copy-pasting it. That would highlight that you didn't define angle...

10 days ago | 0

| accepted

Submitted


point to line distance
calculate the distance between a 2D or 3D line and one or more points

10 days ago | 70 downloads |

Thumbnail

Answered
What is the Order of Function Precedence in MATLAB 2019b or 2020a?
Here is the official list: <https://www.mathworks.com/help/matlab/matlab_prog/function-precedence-order.html> I don't know wh...

12 days ago | 1

| accepted

Answered
How to extract data from diary?
This would probably be far easier if you captured the output at the source, instead of parsing the diary. This code works, but ...

13 days ago | 0

| accepted

Answered
Find indices for the minimum positive values in a cell
You can always consider cellfun if you want to apply a function to every element of your cell. It might not be the fastest optio...

13 days ago | 0

| accepted

Answered
Script that create all combination in a matrix
Yet another possible solution: A=0:3;B=0:3;C=0:3; [A_,B_,C_]=ndgrid(A,B,C); combs=[A_(:),B_(:),C_(:)];

13 days ago | 0

| accepted

Answered
How can I use the data from one guide in another guide?
You will either need to make sure the second GUI has the handle to the first GUI, or save the variable to an external place both...

13 days ago | 0

Answered
initialize a MxN matrix with the same number
Inspired by the comparative speed test in the answer by Friedrich, I extended his code to have more robust testing that could be...

14 days ago | 5

Answered
How to solve "Line cannot be a child of Figure." error?
You need to create an axes object first so you can use that as the parent object instead. fig_UPS = figure; ax=axes('Parent',f...

14 days ago | 0

| accepted

Load more