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

How to simulate the outage probability of user data rate versus signal to noise ratio?

Since that apparently was the solution, I'll post it as an answer: SNR_vector_dB=-20:10:30; %the SNR vector R_th = 0.512; % ...

How to simulate the outage probability of user data rate versus signal to noise ratio?

Since that apparently was the solution, I'll post it as an answer: SNR_vector_dB=-20:10:30; %the SNR vector R_th = 0.512; % ...

4 hours ago | 0

| accepted

Answered

Pause until input from one of two buttons

You can also unpause uiwait with uiresume, not just by closing the figure.

Pause until input from one of two buttons

You can also unpause uiwait with uiresume, not just by closing the figure.

19 hours ago | 0

| accepted

Answered

2 popup menus connected

Ynumber=[1;1;2;3;5]; Version={'AP'; 'AP_R' ;'AP' ;'TI1' ;'TI2'}; mytable= table(Ynumber,Version); %Y_selected=get(handles.d...

2 popup menus connected

Ynumber=[1;1;2;3;5]; Version={'AP'; 'AP_R' ;'AP' ;'TI1' ;'TI2'}; mytable= table(Ynumber,Version); %Y_selected=get(handles.d...

21 hours ago | 0

Answered

请问画三维曲面图时，如果自变量的区间边界是一个函数怎么办？

Use meshgrid or ndgrid to generate a full grid of coordinates. Then you mark all points outside your triangle with inpolygon. Th...

请问画三维曲面图时，如果自变量的区间边界是一个函数怎么办？

Use meshgrid or ndgrid to generate a full grid of coordinates. Then you mark all points outside your triangle with inpolygon. Th...

2 days ago | 0

| accepted

Answered

Conversion to char from logical is not possible.

You need to pass the option as a parameter to the integral function instead of defining it earlier. I= @(x)((x.^(3).*exp(-x...

Conversion to char from logical is not possible.

You need to pass the option as a parameter to the integral function instead of defining it earlier. I= @(x)((x.^(3).*exp(-x...

3 days ago | 0

| accepted

Answered

How can I optimize the value of a matrix?

The code below will fit a value for B with the fminsearch function. Note that it is relatively sensitive to a good initial guess...

How can I optimize the value of a matrix?

The code below will fit a value for B with the fminsearch function. Note that it is relatively sensitive to a good initial guess...

3 days ago | 0

| accepted

Answered

Index exceeds the number of array elements (1).

If you set a breakpoint just before that line you will notice the values of all your variables: s is a scalar and L has a value ...

Index exceeds the number of array elements (1).

If you set a breakpoint just before that line you will notice the values of all your variables: s is a scalar and L has a value ...

3 days ago | 0

Answered

How to remove rows in a matrix based on the first column

I guess this is what you need: data=600000*rand(224836,3); L=data(:,1)<=300000 data(L,:)=[] ;

How to remove rows in a matrix based on the first column

I guess this is what you need: data=600000*rand(224836,3); L=data(:,1)<=300000 data(L,:)=[] ;

3 days ago | 0

| accepted

Answered

Hello guys, I need help.

The indices you get in your last operation can be converted to subscripts, which will correspond to your three inputs. ind=ind(...

Hello guys, I need help.

The indices you get in your last operation can be converted to subscripts, which will correspond to your three inputs. ind=ind(...

5 days ago | 1

| accepted

Answered

Hi, there is a (1x6) vector that i want to extract values from. I used strings to pick-up the subtitle and now the problem is that i have to extract every value under the subtitle (e.g Oxygen). How to i extract those values without hardcoding ?

It would probably make a more sense to use the table data type instead of a string array that is parsed to separate variables. ...

Hi, there is a (1x6) vector that i want to extract values from. I used strings to pick-up the subtitle and now the problem is that i have to extract every value under the subtitle (e.g Oxygen). How to i extract those values without hardcoding ?

It would probably make a more sense to use the table data type instead of a string array that is parsed to separate variables. ...

5 days ago | 0

| accepted

Answered

Why my GUI keeps producing error when I run it?

You define T like this: Th_1=str2double(handles.Theta_1.String)*pi/180; Th_2=str2double(handles.Theta_2.String)*pi/180; Th_3=...

Why my GUI keeps producing error when I run it?

You define T like this: Th_1=str2double(handles.Theta_1.String)*pi/180; Th_2=str2double(handles.Theta_2.String)*pi/180; Th_3=...

6 days ago | 0

| accepted

Answered

How to perform robust line fitting in a binary image

They key is in how you define what a good fit is. The code below uses the root-mean-square of the orthogonal distance between al...

How to perform robust line fitting in a binary image

They key is in how you define what a good fit is. The code below uses the root-mean-square of the orthogonal distance between al...

7 days ago | 0

| accepted

Answered

How do I remove a set of repeated values in a x by 2 matrix?

I think the code below is what you need. There may be much more efficient methods, but this will do as long as this will not be ...

How do I remove a set of repeated values in a x by 2 matrix?

I think the code below is what you need. There may be much more efficient methods, but this will do as long as this will not be ...

7 days ago | 0

Answered

find the next row of an element in a matrix

This probably isn't the fastest solution, but it does get the output you describe. The last loop I had to guess, so let me know ...

find the next row of an element in a matrix

This probably isn't the fastest solution, but it does get the output you describe. The last loop I had to guess, so let me know ...

7 days ago | 1

| accepted

Answered

ButtonDownFcn disabled after using matlab rotate 3D tool

As you can read in the <https://www.mathworks.com/help/matlab/ref/rotate3d.html doc>, using the rotate3d function without any in...

ButtonDownFcn disabled after using matlab rotate 3D tool

As you can read in the <https://www.mathworks.com/help/matlab/ref/rotate3d.html doc>, using the rotate3d function without any in...

7 days ago | 0

| accepted

Answered

Gray value for each point plot over image

Since the Punkte array contains coordinates, you can convert them to indices. You need a way to translate the x and y positions ...

Gray value for each point plot over image

Since the Punkte array contains coordinates, you can convert them to indices. You need a way to translate the x and y positions ...

8 days ago | 1

Answered

Matlab function for cumulative power

This code does what you ask without loops. %define inputs r=9; n=4; [a,b]=meshgrid(0:n); exponents=a-b; exponents(expone...

Matlab function for cumulative power

This code does what you ask without loops. %define inputs r=9; n=4; [a,b]=meshgrid(0:n); exponents=a-b; exponents(expone...

8 days ago | 1

Answered

How to use inputs from GUI in a separate script?

This is trivial if you convert your script into a function. With complex functions with many inputs and outputs it would often m...

How to use inputs from GUI in a separate script?

This is trivial if you convert your script into a function. With complex functions with many inputs and outputs it would often m...

11 days ago | 0

Answered

how to fine repeated value?

If you just wanted to know the repeated values you could use unique to filter each first occurrence, which would leave the repea...

how to fine repeated value?

If you just wanted to know the repeated values you could use unique to filter each first occurrence, which would leave the repea...

11 days ago | 0

Answered

Storing the absor function into my code gives ABSURD error

You need to close all your functions with the end keyword or none of them. Within the same file you cannot mix the two styles. M...

Storing the absor function into my code gives ABSURD error

You need to close all your functions with the end keyword or none of them. Within the same file you cannot mix the two styles. M...

12 days ago | 1

| accepted

Answered

Function to read a file

The function signature below makes more sense to me. function [a,b,inta,intb]=ReadingApe(file) Then you can input your variabl...

Function to read a file

The function signature below makes more sense to me. function [a,b,inta,intb]=ReadingApe(file) Then you can input your variabl...

12 days ago | 0

Answered

Averaging over specific columns in a for loop not working

You can use cell2mat to convert the cell to a double array. Then it will work with movmean.

Averaging over specific columns in a for loop not working

You can use cell2mat to convert the cell to a double array. Then it will work with movmean.

12 days ago | 0

Answered

Unrecognized function or variable

Inside of this function the variable T doesn't exist. You will have to pass it as a variable, or make this a nested function so ...

Unrecognized function or variable

Inside of this function the variable T doesn't exist. You will have to pass it as a variable, or make this a nested function so ...

13 days ago | 0

Answered

patch for old version ?

The imdilate function did exist in that release; it is part of the image processing toolbox. You could write your own alternativ...

patch for old version ?

The imdilate function did exist in that release; it is part of the image processing toolbox. You could write your own alternativ...

13 days ago | 0

Answered

Interval mean of array

If you ignore the meaning of the data the solution isn't too difficult. First reshape your vector into 4 by N, then call the ...

Interval mean of array

If you ignore the meaning of the data the solution isn't too difficult. First reshape your vector into 4 by N, then call the ...

13 days ago | 0

| accepted

Answered

In MATLAB GUI, how can I display a set of elements such as edit text and slider only if I push the radiobutton?

I suspect this is close to what you mean. I made it a programmatic GUI, instead of using GUIDE, as this provides more options fo...

In MATLAB GUI, how can I display a set of elements such as edit text and slider only if I push the radiobutton?

I suspect this is close to what you mean. I made it a programmatic GUI, instead of using GUIDE, as this provides more options fo...

13 days ago | 1

| accepted

Answered

Fahrenheit function but confused on the output.

You are overwriting the input to your function by asking the user for the temperature in Celsius. You are also not assigning any...

Fahrenheit function but confused on the output.

You are overwriting the input to your function by asking the user for the temperature in Celsius. You are also not assigning any...

14 days ago | 0

Answered

How to solve equation with ten unknowns with Fourier Analysis

The code below will work in base Matlab (i.e. it doesn't require any toolbox). Note that the fminsearch function is relatively s...

How to solve equation with ten unknowns with Fourier Analysis

The code below will work in base Matlab (i.e. it doesn't require any toolbox). Note that the fminsearch function is relatively s...

14 days ago | 0

Answered

Change figure number according to an indice

Two options of what you mean: for k=1:10 figure('Name',sprintf('the image number %d of the series', k)) end %or: for ...

Change figure number according to an indice

Two options of what you mean: for k=1:10 figure('Name',sprintf('the image number %d of the series', k)) end %or: for ...

14 days ago | 0

| accepted

Answered

Creating fun structure in a loop

You could do it with a loop, but I would prefer a more direct strategy. Depending on the shape of x0 and t, the sum version will...

Creating fun structure in a loop

You could do it with a loop, but I would prefer a more direct strategy. Depending on the shape of x0 and t, the sum version will...

15 days ago | 1

| accepted