Community Profile

photo

Rik


1.418 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

  • 24 Month Streak
  • Revival Level 3
  • Guiding Light
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
plotting a multivariable function by colors
You can use the surf function (and set the view so you look from above), or use ind2rgb to apply a colormap.

ongeveer 7 uur ago | 0

Answered
Matlab File not running when selected from a Zip file
Although Windows explorer can treat zip files as if it is a folder, Matlab does not. You will have to extract all required files...

1 dag ago | 0

Answered
Finding minimum points in a plot.
The movmin function might work for you. If you want us to help with the tweaking, you will have to attach your data or some code...

2 dagen ago | 0

Answered
How can I do such a "averageifs"(excel) process in Matlab?
Using accumarray is probably better, but you can also use the unique function and a for loop to find the sum and the count. Edi...

2 dagen ago | 0

| accepted

Answered
Conditional if statement solution
In Matlab calculating parameters for the entire array at once is almost always faster than a loop. My code below uses the find f...

3 dagen ago | 2

| accepted

Answered
Pie chart without labels
No need for fragile findobj(ax,__) calls (which may return a lot more than just the pie labels). You can either set the labels t...

3 dagen ago | 0

| accepted

Answered
How to arrange coordinates into 3 columns?
If you want to linearize an array, you can use (:): [XP_NODES,YP_NODES,ZP_NODES]=deal(XP_NODES',YP_NODES',ZP_NODES'); MESH = [...

3 dagen ago | 0

| accepted

Answered
How to reset military datetime in matlab?
As you can read in the doc, the hh identifier is a 12h system. If you want 24h, you need to use HH in your format.

4 dagen ago | 2

Answered
Solving 3 x 9 matrix all posible combinations
There are 4686825 possible combinations, so I would recommend not storing all of them, especially not in numbered variables, whi...

4 dagen ago | 0

Answered
Same colormap with colorbar which has two axes
You can add a second tick row on the right side of the colorbar using the code below. f=figure; image c_handle=colorbar; %...

5 dagen ago | 0

Answered
Question about imgaussfilt3
I don't see any indication otherwise in the doc, so you can safely assume that the sigma is in units of voxels. This should be e...

5 dagen ago | 0

Answered
Modifying a structure array
Since you don't provide any indication of how you want this to work for struct array input, you'll have to modify this code your...

7 dagen ago | 1

Answered
3 demension matrix coding - find largest NN elements
You will probably need to loop through the pages. The second output of max should be what you need. A=rand(4,4,5); out=A...

9 dagen ago | 0

Answered
Can't take the mean of a 2D matrix (Array indices must be positive integers or logical values.)
You are using mean both as a function name and a variable name. Also, if you read the doc for mean, you will notice you can e...

12 dagen ago | 1

| accepted

Answered
Loading from Workspace via string
The matfile function has an interface similar to what you're looking for. You do need to be careful with indexing if you want to...

12 dagen ago | 0

| accepted

Answered
Replace multiple values in matrix / image
You can use ismember to remove a loop. I put in a loop over the colors, but since that is only 3 iterations, that will not cause...

13 dagen ago | 0

| accepted

Answered
Replace specific string in structure
This should do the trick: %create part of your data structure as an example EEG=struct; EEG.event(1).type='11';EEG.event(1).l...

15 dagen ago | 0

Answered
how to assign a number to a specific location.
I'm going to assume you want to treat table 1 as your lookup table, where you want matching column indices to have matching valu...

15 dagen ago | 0

Answered
extracting number from a string
You can either use ismember to determine which positions contain the characters you're looking for, or you can use isstrprop. Th...

16 dagen ago | 0

Answered
Workspace calculation accuracy 7 characters
There is a big difference between the display of values and how they're stored. They aren't stored in a decimal form (maybe with...

16 dagen ago | 1

| accepted

Answered
Convert axis to image file/matrix
As KSSV mentions, print(gcf,'test','-dpng','-r300'); should do the trick if you want to print your entire figure content to a pn...

17 dagen ago | 0

| accepted

Answered
How to get a centerline from a contour ?
First let's load the image into a usable format. You already have code to get binaryImage, so you can use that. %% read image ...

18 dagen ago | 0

| accepted

Answered
How to run 'dicomanon' on all '.dcm' files in a directory (including all subfolders)?
Use the dir function to generate a full file list and then loop through them. list=dir('C:\path\**\*.dcm');

20 dagen ago | 0

Answered
How to write this in matlab?
Because of the recursion limit (and other factors), it is smarter to implement this in a loop, instead of a recursive function. ...

20 dagen ago | 0

Answered
Problems when running GUI graph plotting with 'while' or 'if' loops
You should be using strcmp to test if a char array is equal to another char array. Your current tests are array operations. A...

20 dagen ago | 0

| accepted

Answered
how to insert 1 in place of inf in a given array
You can use the diff function and isinf to make this array. final= [false diff(array)==0] | isinf(array) ;

21 dagen ago | 2

| accepted

Answered
how can i reduce the numer of vertices of tetrahedron by keep the shape approximately same
The <https://www.mathworks.com/help/matlab/ref/reducepatch.html reducepatch> function should do just that: reduce the number of ...

23 dagen ago | 2

Answered
How can I take moving average with different window shapes?
You can use the conv function to calculate the convolution of your window with your data. Just make sure your window has a sum o...

23 dagen ago | 0

| accepted

Answered
How can I remove the toolbar from the axes, but keep it at the top of the window?
In the same thread image analyst refers to, you can also find <https://www.mathworks.com/matlabcentral/answers/419036-what-happe...

23 dagen ago | 0

Answered
Is there a program that allows a user to run a matlab script outside the software?
To my knowledge you have only a single option besides Matlab: GNU Octave. It has a number of major downsides (lack of speed, ...

23 dagen ago | 1

Load more