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.

Answered

Matrix probability with just one 1

This code only works for positions with equal probability. dist=[0 0.5 0 0 0.5]; valid_pos=find(dist);%select non-zero out=...

Matrix probability with just one 1

This code only works for positions with equal probability. dist=[0 0.5 0 0 0.5]; valid_pos=find(dist);%select non-zero out=...

13 hours ago | 0

| accepted

Answered

Looping through different files with sprintf

Read the documentation for sprintf. filename=sprintf('sub%02d.mat',s); You also probably want to actually the loaded data: in...

Looping through different files with sprintf

Read the documentation for sprintf. filename=sprintf('sub%02d.mat',s); You also probably want to actually the loaded data: in...

1 day ago | 0

| accepted

Answered

matlab URI can not access to a valid url webpage

You forgot to input the URI as a char array: r = RequestMessage; uri = URI('http://maps.googleapis.com/maps/api/staticmap?cent...

matlab URI can not access to a valid url webpage

You forgot to input the URI as a char array: r = RequestMessage; uri = URI('http://maps.googleapis.com/maps/api/staticmap?cent...

1 day ago | 0

Answered

How to solve this question? Help :'(

You should learn about the linspace function. I would also suggest you check if you have x and y correct. I kept your convention...

How to solve this question? Help :'(

You should learn about the linspace function. I would also suggest you check if you have x and y correct. I kept your convention...

2 days ago | 0

| accepted

Answered

Octave problem with solution

You misplaced one dot: the division is currently a matrix division, instead of an element-wise operation. Note that subtraction ...

Octave problem with solution

You misplaced one dot: the division is currently a matrix division, instead of an element-wise operation. Note that subtraction ...

2 days ago | 0

Answered

I need to create a button UI that undo the graph which I plotted without using GUIDE

You will have to store the handle to your last plotted graph and either delete it, or set the Visibility to 'off'.

I need to create a button UI that undo the graph which I plotted without using GUIDE

You will have to store the handle to your last plotted graph and either delete it, or set the Visibility to 'off'.

3 days ago | 0

Submitted

Wayback Machine API

This functions acts as an API for the Wayback Machine (web.archive.org).

4 days ago | 3 downloads |

Question

What frustrates you about MATLAB? #2

Similar to what has happened with the wishlist threads (#1 #2 #3 #4 #5), the "what frustrates you about MATLAB" thread has becom...

4 days ago | 3 answers | 2

Answered

Extract number and infromation from multiple image files ?

The code below should do what you need. Adapt as needed. folder = 'Defolder'; S = dir(fullfile(folder,'*.jpg')); N = {S.name}...

Extract number and infromation from multiple image files ?

The code below should do what you need. Adapt as needed. folder = 'Defolder'; S = dir(fullfile(folder,'*.jpg')); N = {S.name}...

5 days ago | 0

| accepted

Answered

How to handle functions with multiple outputs

You will need a wrapper function (which you can make fancy if you want, but I made it simple). f=@(x1,x2)wrapper(x1,x2); f...

How to handle functions with multiple outputs

You will need a wrapper function (which you can make fancy if you want, but I made it simple). f=@(x1,x2)wrapper(x1,x2); f...

5 days ago | 0

| accepted

Answered

How to search for an array inside another array?

idx=find(ismember(a,b,'row'))

How to search for an array inside another array?

idx=find(ismember(a,b,'row'))

6 days ago | 0

| accepted

Answered

Faster way to make movies than drawing figures

You should initialize the graphics objects outside the loop and then modify the properties inside the loop. The dynamic expansi...

Faster way to make movies than drawing figures

You should initialize the graphics objects outside the loop and then modify the properties inside the loop. The dynamic expansi...

6 days ago | 0

Answered

Compare elements in a matrix for a variable

So essentially a lookup table? %generate some random data id= rand(75,1); r= rand(75,1); id_list=unique(id); M_3D=id_list(r...

Compare elements in a matrix for a variable

So essentially a lookup table? %generate some random data id= rand(75,1); r= rand(75,1); id_list=unique(id); M_3D=id_list(r...

7 days ago | 0

Answered

How to display specific image in different window(figure 2)?

If you want to show two images side by side you can use subplot. If your Matlab is new enough you can even use tiledlayout.

How to display specific image in different window(figure 2)?

If you want to show two images side by side you can use subplot. If your Matlab is new enough you can even use tiledlayout.

8 days ago | 0

Answered

Creating one curve from different curves

There are at least 3 methods I could think of, each with their own pros and cons: figure(1),clf(1) %% with the symbolic tool...

Creating one curve from different curves

There are at least 3 methods I could think of, each with their own pros and cons: figure(1),clf(1) %% with the symbolic tool...

8 days ago | 0

Answered

tan^2*(45+x/2)

You probably mean either of these: % if x is in radians: tan(45+x/2).^2 % if x is in degrees: tand(45+x/2).^2 If you don'...

tan^2*(45+x/2)

You probably mean either of these: % if x is in radians: tan(45+x/2).^2 % if x is in degrees: tand(45+x/2).^2 If you don'...

8 days ago | 0

Answered

How do I take repeat the calculation of average column?

splitapply will do the trick. You can fairly easily find the number between 'data' and '--', so creating the group IDs shouldn't...

How do I take repeat the calculation of average column?

splitapply will do the trick. You can fairly easily find the number between 'data' and '--', so creating the group IDs shouldn't...

9 days ago | 1

| accepted

Answered

Create a mobile app with MATLAB

You may have some luck with converting to JavaScript. You could also try this doc page and the pages it links to for informatio...

Create a mobile app with MATLAB

You may have some luck with converting to JavaScript. You could also try this doc page and the pages it links to for informatio...

10 days ago | 1

Answered

Can I write a builtin Clock in my standalone application exe file?

Host the UTC timestamp on your server and then use a function to retrieve it. That way you have a known correct date to verify y...

Can I write a builtin Clock in my standalone application exe file?

Host the UTC timestamp on your server and then use a function to retrieve it. That way you have a known correct date to verify y...

10 days ago | 0

Answered

How to clear this plot?

You should probably make your code into a function instead of copy-pasting it. That would highlight that you didn't define angle...

How to clear this plot?

You should probably make your code into a function instead of copy-pasting it. That would highlight that you didn't define angle...

10 days ago | 0

| accepted

Submitted

point to line distance

calculate the distance between a 2D or 3D line and one or more points

10 days ago | 70 downloads |

Answered

What is the Order of Function Precedence in MATLAB 2019b or 2020a?

Here is the official list: <https://www.mathworks.com/help/matlab/matlab_prog/function-precedence-order.html> I don't know wh...

What is the Order of Function Precedence in MATLAB 2019b or 2020a?

Here is the official list: <https://www.mathworks.com/help/matlab/matlab_prog/function-precedence-order.html> I don't know wh...

12 days ago | 1

| accepted

Answered

How to extract data from diary?

This would probably be far easier if you captured the output at the source, instead of parsing the diary. This code works, but ...

How to extract data from diary?

This would probably be far easier if you captured the output at the source, instead of parsing the diary. This code works, but ...

13 days ago | 0

| accepted

Answered

Find indices for the minimum positive values in a cell

You can always consider cellfun if you want to apply a function to every element of your cell. It might not be the fastest optio...

Find indices for the minimum positive values in a cell

You can always consider cellfun if you want to apply a function to every element of your cell. It might not be the fastest optio...

13 days ago | 0

| accepted

Answered

Script that create all combination in a matrix

Yet another possible solution: A=0:3;B=0:3;C=0:3; [A_,B_,C_]=ndgrid(A,B,C); combs=[A_(:),B_(:),C_(:)];

Script that create all combination in a matrix

Yet another possible solution: A=0:3;B=0:3;C=0:3; [A_,B_,C_]=ndgrid(A,B,C); combs=[A_(:),B_(:),C_(:)];

13 days ago | 0

| accepted

Answered

How can I use the data from one guide in another guide?

You will either need to make sure the second GUI has the handle to the first GUI, or save the variable to an external place both...

How can I use the data from one guide in another guide?

You will either need to make sure the second GUI has the handle to the first GUI, or save the variable to an external place both...

13 days ago | 0

Answered

initialize a MxN matrix with the same number

Inspired by the comparative speed test in the answer by Friedrich, I extended his code to have more robust testing that could be...

initialize a MxN matrix with the same number

Inspired by the comparative speed test in the answer by Friedrich, I extended his code to have more robust testing that could be...

14 days ago | 5

Answered

How to solve "Line cannot be a child of Figure." error?

You need to create an axes object first so you can use that as the parent object instead. fig_UPS = figure; ax=axes('Parent',f...

How to solve "Line cannot be a child of Figure." error?

You need to create an axes object first so you can use that as the parent object instead. fig_UPS = figure; ax=axes('Parent',f...

14 days ago | 0

| accepted