Community Profile

photo

Rik


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

배지보기

Content Feed

보기 기준

답변 있음
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(...

1일 전 | 0

답변 있음
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...

1일 전 | 1

| 수락됨

답변 있음
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).'; ...

1일 전 | 0

| 수락됨

답변 있음
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.

2일 전 | 0

답변 있음
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...

2일 전 | 0

답변 있음
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...

2일 전 | 1

답변 있음
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...

2일 전 | 0

| 수락됨

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

2일 전 | 0

답변 있음
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...

3일 전 | 0

답변 있음
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...

4일 전 | 0

| 수락됨

답변 있음
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)

4일 전 | 0

답변 있음
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...

4일 전 | 0

답변 있음
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;...

4일 전 | 0

| 수락됨

답변 있음
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...

4일 전 | 0

답변 있음
How to use fminsearch for least square error minimization?
I mean your objective function must only return 1 value, regardless of the shape of your data. This is the standard ordinary le...

5일 전 | 1

답변 있음
how to pass a function with internally set parameters as an input to another function
You need to pass a function handle. Probably the line below will do the trick. fscoeff(@ft1) The way you wrote it, you a...

5일 전 | 0

| 수락됨

답변 있음
Averaging scattered data over an n by n grid
Here is a full solution, using histcounts2 and accumarray to do the heavy lifting. This solution plots in 3D, so you can verify...

7일 전 | 1

| 수락됨

답변 있음
Greek letters Latex interpreter
You need to turn math mode on: plot(rand(10,2)); ylabel('Shear stress $\tau$ [MPa]', 'fontsize', 11, 'interpreter', 'latex')

7일 전 | 0

| 수락됨

답변 있음
What are these commands in Matlab? Can any one explain them with examples. I searched them but didn't find any help
The first line is accessing a field iqDAC of the struct metadata, which it transposes. The second line divides two variables. ...

8일 전 | 0

답변 있음
Fill a matrix with matrix powers
n=3; A=rand(n,n); Zero=zeros(size(A)); C=repmat({Zero},n,n); C(logical(eye(n)))=arrayfun(@(n)A^n,1:n,'uni',false); C=cell2m...

8일 전 | 0

답변 있음
How to solve the erro about fzero function?
Your custom function should return a scalar value, but it doesn't: fun = @fun_ball; Trq0 = 10; fun(Trq0)

9일 전 | 0

답변 있음
How do I sort automatic variables in matlab?
You shouldn't generate variable names dynamically. You should use an array instead. That way you can use all the normal Matlab t...

10일 전 | 1

| 수락됨

답변 있음
Poor display of DICOM images using MATLAB (dicomread)
dicomread does not change the file in any way. Most medical viewers will use a subsampling. The viewer I use, uses an 8x8 biline...

10일 전 | 0

답변 있음
need help making a 'for' loop to make a new matrix
Having numbered variables is a problem that should be solved when you create those variables. If you have 40 variables with the ...

10일 전 | 1

답변 있음
simple combinations between cells
It can probably be done without a loop, but why do you want that? Loops are very efficient (as long as there isn't a builtin vec...

10일 전 | 1

| 수락됨

답변 있음
How do I find the maximum and minimum of a function in a given domain?
You need a function like fminbnd: y =@(x) (1*x.^4)/4+(4*x.^3)/3- 5*(x.^2)/2; x_min = fminbnd(y,-3,3) Let's confirm this with ...

12일 전 | 0

답변 있음
adding two matrices of unequal length
Result=A+B(1+mod(1:size(A,1),end-1),:); (written on mobile, untested code)

12일 전 | 1

| 수락됨

답변 있음
extracting the last three characters from cell array
You probably want to extract the extension, instead of hard-coding the last three characters: data={'COD0MGXFIN_20210870000_01D...

14일 전 | 1

답변 있음
Calculate mean from a cell array.
Two options of what you could mean: %load your data first websave('data.mat','https://www.mathworks.com/matlabcentral/answers/...

14일 전 | 0

| 수락됨

답변 있음
Assign values in the cell
You mean like this? output1={[1 2;3 4],[]}; L=cellfun(@isempty,output1); output1(L)={zeros(8,1)}; output1 Note that cellfun...

15일 전 | 0

| 수락됨

더로드