Community Profile

photo

Rik


Last seen: Today
2,235 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.

連絡する

Rik's バッジ

  • 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

詳細を表示...

貢献した分野
表示方法

回答済み
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

約21時間 前 | 0

| 採用済み

回答済み
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); ...

1日 前 | 0

回答済み
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...

1日 前 | 5

質問


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 ...

1日 前 | 1 件の回答 | 9

1

回答

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

1日 前 | 0

| 採用済み

回答済み
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...

2日 前 | 1

| 採用済み

回答済み
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...

3日 前 | 0

回答済み
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 ...

3日 前 | 0

回答済み
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:...

3日 前 | 0

| 採用済み

回答済み
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 ...

4日 前 | 0

回答済み
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...

5日 前 | 0

回答済み
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 ...

7日 前 | 0

| 採用済み

回答済み
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...

8日 前 | 0

| 採用済み

回答済み
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...

8日 前 | 1

回答済み
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...

8日 前 | 1

| 採用済み

回答済み
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. ...

8日 前 | 0

| 採用済み

回答済み
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 ...

8日 前 | 1

回答済み
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...

9日 前 | 0

| 採用済み

回答済み
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...

9日 前 | 0

回答済み
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...

9日 前 | 0

| 採用済み

回答済み
Selecting parts of HTML file
First read the html files (you can get my readfile function from the FEX. If you are using R2017a or later, you can also get it ...

9日 前 | 0

| 採用済み

回答済み
How to eliminate standalone 1 or 0 in binary matrix
I would suggest using a convolution with a flat kernel. kernel=ones(1,3,1);kernel=kernel/sum(kernel(:)); A=[0 0 1 1 1 0 1 1 0 ...

9日 前 | 1

| 採用済み

回答済み
how to extract a specific text/string from text file
You can either use my readfile function (which you can get from the file exchange or the add-on manager). Another option is to u...

11日 前 | 1

回答済み
Count the number of times a sequence in a matrix repeats
Both the unique and ismember functions can handle rows. Look at the respective documentation pages for details.

11日 前 | 0

回答済み
Split RGB Image into blocks (24-bit)
The better solution would be to use blockproc, but you can also use mat2cell and use a loop.

11日 前 | 0

回答済み
How to perform circshift on specific elements?
You are overwriting the original array, instead of using circshift on the partial array. A = [1 2 3 4; 5 6 7 8; 9 10 11 12]; L...

12日 前 | 0

| 採用済み

回答済み
displaying the total number of times an if statement is true
You can use the fact that sum will functionally cast your logical array to 0 and 1: grains=sum(xc_array(:,1)>0.188); fprintf('...

12日 前 | 0

| 採用済み

回答済み
loop iteration in matlab
I would suggest not using a loop: F=@(x) sum( ( (1:x).^5 ).*(x:-1:1) );

12日 前 | 0

回答済み
Removing white background from Barcode image(s)
The easiest solution is to not add the border in the first place: barWidth = 3;barHeight = 100;appendTerminationMarkers = false...

12日 前 | 1

| 採用済み

Load more