Community Profile

photo

Rik


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

  • Personal Best Downloads Level 2
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 4
  • First Submission
  • 24 Month Streak
  • Revival Level 3
  • Guiding Light
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
i would like to have the license key of my license
I can find my license number if I go to the my account page. Otherwise you will have to contact Mathworks support directly.

3 days ago | 0

Answered
where to save the function file to work?
You need to make sure your function can be found by Matlab by placing it on the path. The general advice is to have a folder wh...

3 days ago | 0

Answered
question to continue the code
As the documentation states, rmdir only works for empty folders. If you want to remove all files and folders inside that folder ...

3 days ago | 0

| accepted

Answered
Getting rid of duplicate values in pairwise matrix to obtain single vector?
The easiest is the pragmatic approach: get the counts with histcounts and divide that by 2. X=randn(100,1); [N,edges] = histco...

3 days ago | 0

| accepted

Answered
how do you find solutions of this marix equation using matlab 2019
Let's first do some algebra, and then solve it with a oneliner: %{ Ax = b A\Ax = A\b (A\A = 1) x = A\b %} A = [3.8 -7....

4 days ago | 0

| accepted

Answered
How can I fit this data?
Your model function contains some redundant terms that should be merged. Below you find the code to estimate your parameters and...

5 days ago | 0

| accepted

Answered
how to use buitin functions like fcm in gui?
A GUI in Matlab is nothing special. You need to have working code first, and then put that into a GUI. If you have trouble with ...

5 days ago | 0

| accepted

Answered
how to get an matrix as an output in a function
The mlint is giving you a hint: it wants you to put a semicolon to suppres output. Why would you have an output with the for loo...

6 days ago | 2

| accepted

Answered
class vs data type?
In general I would consider 'class' a superset of 'data type' and only include the core Matlab clases a list of data types, so t...

6 days ago | 0

Answered
Defining scatter plot with different 'markers' & 'colors'
This should be close to what you need: test = xlsread('HQ3.xlsx', 'A2:D223'); x=test(:,1); y=test(:,2); z=test(:,3); groups...

6 days ago | 0

Answered
Creating submatrix with variable indexing
The code below isn't elegant, but it should do what you want. The example is for just 2x2xN. Despite the name, the slow method i...

7 days ago | 0

Answered
Why won't matlab plot data from a table?
You're trying to plot a scalar multiple times, which Matlab happily does for you. You won't see anything, because your line styl...

8 days ago | 0

| accepted

Answered
Why is this so slow?
Loops with many elements are slow. You also forgot to properly pre-allocate s. N = 10^5; a = 0; b = 4; r = a + (b-a)*rand(N,...

8 days ago | 2

Answered
买了可以用多久
In general you can use the student version for as long as you are a student. Note that officially you can only use the student v...

9 days ago | 0

Answered
campare a row value with the next row
You were close when using diff. You need to think what characterizes all four combinations. The code below should be what you ne...

9 days ago | 1

| accepted

Answered
Pass variables from callbacks to custom functions in a GUI
I'm going to assume the error occurs at this line guidata(app, handles); You are mixing a GUIDE-style GUI syntax with an AppDe...

9 days ago | 1

Answered
How to Turn Imagesc to x and y?
You can generate the coordinates with ndgrid and then you can linearize the three matrices and use them as input to plot3. ...

9 days ago | 1

Answered
How do I sum the outputs of a for loop?
Create a variable before the loop and set it to 0. Inside the loop you can add the value of Winnings to this variable.

11 days ago | 0

| accepted

Answered
creating new matrix from remaining of existing 2 matrices
Use ismember with the rows switch to find the rows in A that exist in B, flip this logical vector with ~ and use the result to i...

11 days ago | 0

| accepted

Answered
Error due to matrix dimensions not being consistent
You have shadowed the internal function mtimes which is used when you use the * operator. Renaming your function should solve th...

12 days ago | 0

Answered
how to assign certain range of pixel values with desired color for classification of image?
What you need to do is replicate your grayscale image to three channels to make it an RGB image. Then you can modify the the col...

13 days ago | 1

Answered
Add a box with error metrics in plot
You can add information to a plot with an annotation, or you can use the rectangle and text functions. The code below will read ...

16 days ago | 0

| accepted

Answered
Run cmd command from MATLAB
You should not set the PATH, but you should use cd instead to change the directory inside your system call. I personally pre...

17 days ago | 0

Answered
remove zeros from a 15x300 matrix and find the median
You can use this inside your loop. AS_V(i)= median(AS(AS~=0));

18 days ago | 0

Answered
Generate row vectors that match indexes
The code below will sample points over a parabola, since three points fully determine a second order polynomial. The middle poin...

23 days ago | 0

| accepted

Answered
How can I count the number of times a value occurs
You can use bwlabeln to label all your non-zero regions. then you can loop through each of the labeled regions to determine whic...

23 days ago | 0

| accepted

Answered
How to set value in a matrix
This was a fun puzzle. I believe the code below is one of the many possible solutions. It does use implicit expansion, so for pr...

23 days ago | 3

Answered
Why the line is not shown in the graph?
You are not indexing the trans variable inside your loop, which results in you overwriting the value every loop iteration. That ...

23 days ago | 0

Answered
how to plot smooth line plot?
The code below generates some example data and then interpolates the data in the loglog domain. %generate some example data X=...

24 days ago | 0

Answered
Need Help about this for loop
You are reusing i as a loop index multiple times. The mlint also warns you about that. It is a good idea to resolve all warnings...

24 days ago | 0

| accepted

Load more