Community Profile

photo

Rik


Last seen: Today Active 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.

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • 36 Month Streak
  • Ace
  • Draw Letters
  • Community Group Solver
  • 5-Star Galaxy Level 5
  • GitHub Submissions Level 3
  • Indexing I Master
  • Cody Challenge Master
  • Introduction to MATLAB Master
  • Speed Demon
  • Leader

View badges

Content Feed

Answered
Error finding Linear Regression with polyfit and \
Removing the NaNs will do the trick. Although I'm not sure this data should have a linear fit. fn=websave('data.mat','https://w...

etwa 4 Stunden ago | 0

Answered
textscan - multiple format lines
It looks like the same format to me. Why not read as text, split on the = and use str2double on the last column? To read your f...

etwa 4 Stunden ago | 0

Answered
Create arrays of observations
You should not name your variables dynamically. Why are you not storing them in an array when reading? What is wrong with the co...

etwa 6 Stunden ago | 0

Answered
How to count the black pixels in a segmented section of image?
activecontour returns a logical array. That means you can count the black pixels by inverting and using sum (or nnz).

etwa 12 Stunden ago | 0

Answered
How to correctly plot a 6x2 grids of subplots
You can also make a montage yourself. The function below is from my unpublished toolbox replacement suite. You still need an i...

etwa 13 Stunden ago | 1

| accepted

Answered
Could anyone help me how to generate the matrix in the following manner as described below
data=cell(5,1); for n=1:numel(data) data{n}=randi([1 n],n*100,1); end data=cell2mat(data); size(data)

etwa 15 Stunden ago | 0

Answered
Which MATLAB version for standardized GUI tool ?
Which release is the best choice will depend on specifics. As an extreme example: sometimes the performance of Matlab 6.5 (R13) ...

etwa 16 Stunden ago | 0

Answered
Matlab integral funtion error
The error tells you that you need to make sure f outputs the same size as the input. f=@(x)(x.*exp((x.^2)-1))./sin(x); % ...

etwa 16 Stunden ago | 1

| accepted

Answered
how to create an array of ones with some zeros delimited by an ellipse?
I'm going to ignore the part where you want to plot a cartesian object with polar coordinates. You can either use ndgrid or mes...

ein Tag ago | 0

Answered
How to display rise time in edit box MATLAB Gui?
The function you're using doesn't return a single numeric value, but a struct, as the documentation clearly explains. You need t...

ein Tag ago | 0

| accepted

Answered
defining properties in a class
This doc page seems to suggest this is not natively possible. However, you could implement it as method: %(untested code) clas...

ein Tag ago | 0

Answered
combination from multiple arrays while omitting same item
We have a small problem when we want to generate all combinations: C = nchoosek(v,k) is only practical for situations where len...

ein Tag ago | 0

Answered
cswwrite not in one column
This issue is an Excel issue, not a Matlab one. You need to use the 'convert data to columns' option in Excel. You might try t...

2 Tage ago | 0

Answered
Using cell array for indexing
I would suggest something like this: IndArray={i1,...,im} for dim=(numel(IndArray)+1):ndims(A) IndArray{dim}=1:size(A,dim...

3 Tage ago | 0

| accepted

Answered
Add particular elements of array
Not the tidiest code, but it all happens in a single loop, with cumsum doing the addition prior to the loop. %set your data da...

3 Tage ago | 1

| accepted

Answered
Somthing wrong with SOM Toolbox
There isn't actually something wrong with the toolbox (at least with this code snippet). It is just assuming the handle to a col...

4 Tage ago | 0

| accepted

Answered
Combination of distances between multiple points
You already have the generalized code. You just need to combine it with nchoosek: x=1+10*rand(1,6); y=1+10*rand(1,6); r=rand(...

6 Tage ago | 0

| accepted

Answered
Why do I get ans = logical 1 or 0 in the command window for the following script?
A comma does not mean and. In the Matlab syntax it is used to delimit two statements, so the second part of the line with your i...

6 Tage ago | 1

| accepted

Answered
delete elements of a vector wich are not consecutive
You need some tricky indexing, but I believe this is what you need: v=1:(72*6); k=72; ind=(k:(2*k):(numel(v)-k)) + (1:k).'; ...

6 Tage ago | 0

| accepted

Answered
Displaying multiple lines in MATLAB GUIDE text edit box
You need to make sure the max property is set to a large enough value, and that the uicontrol type supports multiple lines.

7 Tage ago | 0

Answered
Return non-rounded value when assigning variable to index of array
You're confusing the data itself with how it is displayed. It is probably a double, meaning the value you attempted to assign wa...

7 Tage ago | 0

Answered
Filtering a table with datatime on dates
There is probably a native way to do this, but you could also do it yourself: ref=datetime(2019,10,1); L=day(ref)==day(tmp.Var...

7 Tage ago | 1

Answered
Computational capability difference between Student and Academic Versions
The functions are the same, only the license is different. There is a difference in which exact toolboxes are available for eac...

7 Tage ago | 0

| accepted

Answered
Error Unexpected MATLAB expression.
You were missing an equal sign: c1(isinf(c1))=0; c1(isnan(c1))=0; % ^ % this one...

8 Tage ago | 0

Answered
How to create new ppt by using Matlab Script ?
If you want to avoid the use of a COM object (and are ok with moving to pptx): There is a submission on the file exchange calle...

8 Tage ago | 0

Answered
How to multiply function handles stored in a cell array?
Na=repmat({@(w) [1,-w*i(2,e);0 1]},1,3) sa=@(w) 1; for n=1:numel(Na) sa=@(w) sa(w)*Na{n}(w); end Note that in this case...

9 Tage ago | 0

| accepted

Answered
To find Maximum value and minimum value for each group of four rows for a 180*1 matrix
Easy if you reshape the vector to an array: data=rand(180,1); data_=reshape(data,12,[]); max(data_,[],1) min(data_,[],1)

9 Tage ago | 0

Answered
Splitapply command and merge results
The question for you is what you mean by merging, but steps 1 to 4 are below. %generate example data B=10*rand(1,100); edge...

9 Tage ago | 0

Answered
Two conditional operations can be used in matlab or do I need to use double if?
It looks like you could use a lookup table and skip the entire loop: transversal=[0 1 0 1];longitudinal=[0 0 1 1]; LUT=[2 3;...

9 Tage ago | 0

| accepted

Answered
make an interactive graphic?
You can use the ButtonDownFcn property to trigger a function when the user clicks on an axes object. You can use the CurrentPoi...

10 Tage ago | 0

Load more