Community Profile

photo

Rik


Last seen: Today
2 244 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

  • MATLAB Central Treasure Hunt Finisher
  • 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 to write multiple image from a for loop to a dir
Assuming the missing end keyword goes at the end: Your filename depends on only the inner loop, not the outer loop.

environ 13 heures ago | 0

Answered
Not enough input arguments despite all arguments available
Strange errors are bound to appear if you use the function name as a variable as well. This might result in a parse error on som...

environ 22 heures ago | 1

| accepted

Answered
Plotting Electrical Signals with Guide
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread. For general advice a...

environ 22 heures ago | 0

| accepted

Answered
Generate a Matrix with the structure in the description
No loops required: X=tril(ones(128)); [r,c]=find(X); out=[c r]; For the next step I would suggest you create a cell array wi...

environ 23 heures ago | 0

Answered
Need help graphing this
The <https://www.mathworks.com/support/learn-with-matlab-tutorials.html Onramp tutorial> will guide you through problems like th...

1 jour ago | 0

Answered
How can i create constant in a .m archive and use it for the creation of new objects?
You could turn your script into a function. If you store all variables as fields of a struct you can use something like this to ...

1 jour ago | 0

Answered
Best way to pass uicontrols/data to callback function.
I would suggest splitting everything into smaller functions. If you have a function that changes the content of buttons: write i...

1 jour ago | 0

| accepted

Answered
make plot the square wave
Since this is homework, I left some holes for you to fill. T=___;%what should the period of your square wave pulse be if you wa...

2 jours ago | 0

Answered
How to extract specific data from file extension TRO file?
You could use something like readtable to load your file to a table. If that doesn't work you will have to process each line sep...

2 jours ago | 0

| accepted

Answered
How can one get t-stat of fitlm as an output?
It is in the top example: load carsmall X = [Weight,Horsepower,Acceleration]; mdl = fitlm(X,MPG); mdl.Coefficients.tStat

3 jours ago | 0

| accepted

Answered
A loop that saves the data from the inner loop as next file
There are several issues with your code. I will attempt to fix most of them below. %create some random data tw1=rand(148,3); ...

4 jours ago | 1

Answered
How to restore a deleted/tampered question?
As an example, I'm going to use a thread that was recently edited: https://www.mathworks.com/matlabcentral/answers/665533-how-ca...

4 jours ago | 6

Question


How to restore a deleted/tampered question?
Sometimes users remove major parts of their question, which makes the answers/comments much less useful for future readers. The ...

4 jours ago | 1 answer | 10

1

answer

Answered
HTML Page source info
One possibility with strfind: close_div=strfinf(d,'</div>'); param=1; pat=sprintf('<label>Parameter%d : </label> <div class...

4 jours ago | 0

| accepted

Answered
set value of a variable according to date
No need to convert to a numerical date: d1 = datetime('01-March-2020'); d2 = datetime('31-May-2020'); date=datetime('10-March...

5 jours ago | 1

| accepted

Answered
Saving an image file, text formatting lost.
There are two renderers in Matlab. Each has their specific use, but the saveas function sometimes switches to the other renderer...

5 jours ago | 0

Answered
Problem in the for loop
You are using a syntax that only works on Octave, not Matlab. You don't reset your error at the start of every iteration, so ...

6 jours ago | 0

Answered
How can I save the beginning and end positions of each sequence in a cell array?
%Since your code is working fine you can keep it as is. %I just used my own function to use your data. x_conv=readfile('https:...

6 jours ago | 0

| accepted

Answered
when i am executing the below code in matlab R2014a i am getting error Function defnitions are not permitted in this context can you please resolve the issue?
The error sounds like you have code before this in the same file. You need a newer version of Matlab to have a function defined ...

7 jours ago | 0

Answered
Problem with IF statement
Don't use clear all. You don't need it. I suspect you encountered the wondrous world of floats. Computers don't have infinite...

8 jours ago | 0

Answered
Old MATLAB Online Courses
The basics haven't changed (much) since then. For an incomplete overview, see this thread. You can also do the Onramp tutorial ...

10 jours ago | 0

| accepted

Answered
Data fitting by non linear discrete equation.
The code below uses fminsearch, which means you don't need the optimization toolbox. The downside is that it is sensitive to a l...

11 jours ago | 0

| accepted

Answered
Output only numbers with complex conjugate
a = [1+1i*0.1, 1-1i*0.1, 5-1i*0.1, 10+1i*0.2, 10-1i*0.2]; b=conj(a); c=b(ismember(b,a)); d=real(c)+1i*abs(imag(c)); e=unique...

11 jours ago | 1

Answered
How to make a loop of a calculator that keeps asking until the input is zero/nothing?
You forgot to convert the result to a number, so it is a char array. %radian = input ('Input a number: ', 's'); %Input a numbe...

11 jours ago | 1

| accepted

Answered
From for to While loop
Your original for-loop probably was incorrect. And why do you want a while loop? You already know how many iterations you want. ...

11 jours ago | 0

| accepted

Answered
Possible combinations for a vector
s=[0,0,0,0,0,0,0,0,0]; max_value_of_s=2; num_combinations=(max_value_of_s+1)^numel(s); disp(num_combinations) That is going ...

11 jours ago | 1

Answered
How do you circshift progressive rows an increasing amount?
You need to index a column in A in your output as well. for K = 1:size(A,2) A(:,K) = circshift(A(:,K),K); end If you want...

11 jours ago | 0

| accepted

Answered
How do I overwrite a structure using a switch statement.
You can copy the code I used in my FEX submissions (see WBM, readfile, BlandAltmanPlot or RegGrow). If you simply want to ove...

11 jours ago | 0

Answered
Keep getting an error as 'ASCII file unsupported' which terminates the code
The solution is in the error message: "Saving sparse arrays to an ASCII file is unsupported." Either use full to convert your s...

12 jours ago | 0

| accepted

Load more