Community Profile

photo

Rik


Last seen: Today
2,123 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
How do I create an exact looping code for my following problem?
You are remove all elements from phi, so your second iteration does what you ask: nothing. Please learn how to use the debuggin...

14 hours ago | 0

Answered
Crop a part of binary image
My suggestion would be to determine the number of white pixels in each column, and use an automatic way to determine a threshold...

14 hours ago | 0

Answered
I'm having problem while running a code with nested for loops. I'm not able to generate the output graph
I'm not going to read your code when it is like this, but the most common source of the issue is that people are not indexing th...

2 days ago | 0

Answered
What is it called when I specify a vector output of solutions from, say, fsolve?
Those are called output arguments. Sometimes functions will use the nargout function to determine which calculations should be p...

3 days ago | 1

| accepted

Answered
Output argument "xn" (and maybe others) not assigned during call to "myGeneralRecursion".
You're close with the components of your function, but you're not quite there. Your function is trying to find a value for xn. I...

3 days ago | 0

Answered
Importing a two column array from excel
You forgot to put the quotes in your first call. That makes Matlab treat it like a variable, not a char array.

3 days ago | 1

Answered
how to make a looping function to delete all members in a phi set?
You don't update the original variable, but you create a new one instead. You also have made a typo when writing the code here, ...

4 days ago | 0

Submitted


BlandAltmanPlot
Create a Bland-Altman plot and return a struct with results and handles.

7 days ago | 12 downloads |

Thumbnail

Answered
Fast subsetting or indexing of data
Whenever you find yourself copy-pasting code in Matlab, you should consider an array. seasons={'Spring','Summer','Autumn','Wint...

7 days ago | 0

| accepted

Submitted


ifversion
Determine if the current version satisfies a version restriction

7 days ago | 1 download |

Answered
What frustrates you about MATLAB? #2
Comment posted by John in the previous thread: Matlab should 'update' the new version instead of installing the new version. Th...

7 days ago | 0

Answered
How to read data from a file into cell array keeping indents undisturbed
You can get my readfile function from the FEX or through the AddOn-manager (R2017a or later). It will read a file to a cell arr...

8 days ago | 3

Answered
How to asign Unicode string to popup menu without fonr error?
Since you're using a release pre-R2020a, the default to store m-files is not UTF-8. That means any special character has a very ...

9 days ago | 0

| accepted

Answered
SOS: How do I get the same amount of positive and negative values in a random vector?
Your question differs from your description. If you want to select the points with both x and y above 0, you need to use both as...

9 days ago | 1

Answered
bug in power calcultion while in loop ?
This is not a bug. Look at the exponent: 2e-16 is very small. It is close enough to eps that you can assume that is just 0. The...

9 days ago | 1

| accepted

Answered
Reshape panel data to wide using text scan
If you want to read an Excel file you can use the aptly named xlsread function. The second or third output is probably what you ...

10 days ago | 0

Answered
Redistribution of histogram type data in specified bins
You should be really careful with this resampling, especially for so few samples. Since you're assuming a flat distribution in ...

11 days ago | 0

Answered
Solved it, thanks anyway
Step by step. Split up your problems in manageable parts. If you have the coordinates of all corners of your polygon, you can u...

11 days ago | 0

Answered
matlab area calculation under fitted curve
You can use trapz for a numerical approximation of an integration. By selecting your bounds you can use this to calculate the ar...

11 days ago | 1

Answered
Code is not working, can someone help me?
This should fix it: function s = Sum1(x,y,z) s = 0; for i=0:min(x,y) for k=0:x-i s = s + (-1)^k * QuantumDi...

12 days ago | 1

Answered
extract structure array value
You can hide the loop with arrayfun, but be aware that a good loop is always better than cellfun or arrayfun. You should ask you...

12 days ago | 0

| accepted

Answered
Error at 13.2
You edited the code of the Further Practice section, instead of the Task 1 & 2 section.

12 days ago | 0

Answered
calling class into another class
Here is an example from the documentation: classdef PositiveDouble < double methods function obj = PositiveDouble(da...

12 days ago | 0

Answered
How do I add a black border around an image?
You can pad an array with zeros. IM=uint8(255*rand(100,100)); IM2=zeros(120,120,'like',IM); IM2(11:110,11:110)=IM; imshow(IM...

13 days ago | 0

Answered
Sub-matrix Access in a Square Pattern
It looks like either blockproc or mat2cell is what you're looking for.

13 days ago | 2

Answered
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid.
You test everything at once. You can do that, but you need to pay attention to what is evaluated first: %steps in evaluation: ...

14 days ago | 0

Answered
Merging Smaller Cells into a Bigger one
The source of your problem is that you are using the same indices for your big array as for your smaller array. The solution to...

15 days ago | 0

| accepted

Answered
Split Climate Data for month and yers
d=19300101; s=sprintf('%08d',d); y=str2double(s(1:4)); m=str2double(s(5:6)); d=str2double(s(7:8)); Or even simpler: d=1930...

15 days ago | 0

Answered
While Loop regarding user input type stuck on infinite else loop
The data type of R is not changing, so if you create it as a char, it will never be numeric. If you want to use this setup, you ...

15 days ago | 0

| accepted

Load more

|