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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 2

| aceptada

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

casi 7 años hace | 2

| aceptada

Respondida
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 = [...

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 2

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

casi 7 años hace | 0

Respondida
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; %...

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 1

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

Respondida
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');

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

| aceptada

Respondida
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) ;

alrededor de 7 años hace | 2

| aceptada

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

alrededor de 7 años hace | 2

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 2

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

alrededor de 7 años hace | 1

Respondida
i cannot copy figure
Apart from an external screenshot tool, you can also use the <https://www.mathworks.com/matlabcentral/fileexchange/23629-export_...

alrededor de 7 años hace | 0

| aceptada

Cargar más