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

slicing matrix in efficient way

Something like this should do the trick: a=1:120; b=reshape(a,10,3,[]); x=squeeze(b(:,1,:)); y=squeeze(b(:,2,:)); z=squee...

slicing matrix in efficient way

Something like this should do the trick: a=1:120; b=reshape(a,10,3,[]); x=squeeze(b(:,1,:)); y=squeeze(b(:,2,:)); z=squee...

6 hours ago | 0

| accepted

Answered

How to store values from push button and then add all values and display in a static text box

If you're using GUIDE for the first time: don't. Do not teach yourself a tool that will be removed from Matlab in one of the nex...

How to store values from push button and then add all values and display in a static text box

If you're using GUIDE for the first time: don't. Do not teach yourself a tool that will be removed from Matlab in one of the nex...

1 day ago | 0

| accepted

Answered

Adding a global legend to a tiledlayout

I can't get the position quite right, maybe you have more luck with your tinkering. This at least gets rid of the line. (I guess...

Adding a global legend to a tiledlayout

I can't get the position quite right, maybe you have more luck with your tinkering. This at least gets rid of the line. (I guess...

1 day ago | 1

| accepted

Answered

Replace values in matrix based on array values

Nobody is born knowing about ismember and ismembertol. (use the latter if you expect float rounding errors)

Replace values in matrix based on array values

Nobody is born knowing about ismember and ismembertol. (use the latter if you expect float rounding errors)

1 day ago | 0

Answered

Matrix multiplication, matrix with variables

If this code works, why not use this? Fin=T_vit*R_lens_post*T_lens*R_lens_ant*T_aqueous*R_cor_post*T_cornea*R_cor_ant; You als...

Matrix multiplication, matrix with variables

If this code works, why not use this? Fin=T_vit*R_lens_post*T_lens*R_lens_ant*T_aqueous*R_cor_post*T_cornea*R_cor_ant; You als...

1 day ago | 0

| accepted

Answered

Creating text for subcaptions in subplot figure

Even for subplots you can use the title and xlabel functions. Your picture looks like you want to use xlabel. clc;clear; rng(4...

Creating text for subcaptions in subplot figure

Even for subplots you can use the title and xlabel functions. Your picture looks like you want to use xlabel. clc;clear; rng(4...

1 day ago | 0

Answered

MATLAB Answers Wish-list #5 (and bug reports)

A soft-lock for questions, similar to StackExchange. This soft-lock would prevent low/no-reputation users (e.g. <5) from postin...

MATLAB Answers Wish-list #5 (and bug reports)

A soft-lock for questions, similar to StackExchange. This soft-lock would prevent low/no-reputation users (e.g. <5) from postin...

1 day ago | 0

Answered

How to Concetanate Arrays in a Struct?

You were close with your commented code. %see what this returns? MasterResult.Durchschnittswert %you can concatenate that c...

How to Concetanate Arrays in a Struct?

You were close with your commented code. %see what this returns? MasterResult.Durchschnittswert %you can concatenate that c...

1 day ago | 2

| accepted

Answered

How do I vectorize this for loop?

You will need to convert to linear indices with sub2ind.

How do I vectorize this for loop?

You will need to convert to linear indices with sub2ind.

1 day ago | 0

Answered

replacing element which are <= previous element with NaN

This code may not be efficient for very large vectors. x = [1 2 3 4 3 2 3 4 6 8 5 5 6 8.5 9 11 12 ]; y=movmax(x,[numel(x)...

replacing element which are <= previous element with NaN

This code may not be efficient for very large vectors. x = [1 2 3 4 3 2 3 4 6 8 5 5 6 8.5 9 11 12 ]; y=movmax(x,[numel(x)...

3 days ago | 0

| accepted

Answered

Change language to english

Your strong language is not necessary and makes people take you much less serious. There is no need for it. To change the langu...

Change language to english

Your strong language is not necessary and makes people take you much less serious. There is no need for it. To change the langu...

3 days ago | 0

Answered

is NVIDIA RTX 6000 , compatible with Matla R2020a and R2017b?

According to this documentation page: yes. The Quadro RTX 6000 is from the Turing architecture, so it is fully supported on R202...

is NVIDIA RTX 6000 , compatible with Matla R2020a and R2017b?

According to this documentation page: yes. The Quadro RTX 6000 is from the Turing architecture, so it is fully supported on R202...

3 days ago | 0

Answered

how to save/write images using for loop in one .mat file

As Ameer suggests: you should share the code, so we can suggest how you can implement indexing. The point is that your code cur...

how to save/write images using for loop in one .mat file

As Ameer suggests: you should share the code, so we can suggest how you can implement indexing. The point is that your code cur...

3 days ago | 0

Answered

I am having trouble finding the curve fit of an equation in matlab

You're almost there: ln(y) = ln(A) + ln(x) + B*x ln(y) - ln(x) = ln(A) + B*x %so: y2 = ln(y) - ln(x); p = polyfit(x,y2,1)...

I am having trouble finding the curve fit of an equation in matlab

You're almost there: ln(y) = ln(A) + ln(x) + B*x ln(y) - ln(x) = ln(A) + B*x %so: y2 = ln(y) - ln(x); p = polyfit(x,y2,1)...

4 days ago | 0

| accepted

Answered

How to create a menu using GUI

You can use the uicontrol style text to create a block of text. Then make a callback function for a key press. In that callback ...

How to create a menu using GUI

You can use the uicontrol style text to create a block of text. Then make a callback function for a key press. In that callback ...

5 days ago | 0

| accepted

Answered

How can I find the centroid of this circle of objects?

There are at least two options here. The first is to take the average of the x coordinates and y coordinates of the white pixels...

How can I find the centroid of this circle of objects?

There are at least two options here. The first is to take the average of the x coordinates and y coordinates of the white pixels...

7 days ago | 0

Answered

for loop not working

Then you are stuck with first undoing that mistake. You should convert those coordinate variables to a single array. You can use...

for loop not working

Then you are stuck with first undoing that mistake. You should convert those coordinate variables to a single array. You can use...

7 days ago | 0

Answered

how to recived input user in matlab

You need to specify that you want the result as a char array: str=input('enter the string>>','s'); It is also a good idea to d...

how to recived input user in matlab

You need to specify that you want the result as a char array: str=input('enter the string>>','s'); It is also a good idea to d...

8 days ago | 1

| accepted

Answered

How to skip lines to execute/run?

You should be using strcmp to compare strings or chars, but otherwise what you describe is exactly what you need to do (well, on...

How to skip lines to execute/run?

You should be using strcmp to compare strings or chars, but otherwise what you describe is exactly what you need to do (well, on...

8 days ago | 0

Answered

Changing decimals shown in matrix?

You can control this with the fomat function. The closest you can get is two decimals with format bank You should be aware tha...

Changing decimals shown in matrix?

You can control this with the fomat function. The closest you can get is two decimals with format bank You should be aware tha...

8 days ago | 0

Answered

Reading .csv files from .txt file.

How to read text files is maybe the most frequently asked question. Among many solutions, you can either directly read the txt f...

Reading .csv files from .txt file.

How to read text files is maybe the most frequently asked question. Among many solutions, you can either directly read the txt f...

9 days ago | 0

| accepted

Answered

Concatenate nested cell array in one

Since apparently it was the correct solution, I'll repost it: It puzzles me why you would want this without the temporary varia...

Concatenate nested cell array in one

Since apparently it was the correct solution, I'll repost it: It puzzles me why you would want this without the temporary varia...

9 days ago | 0

| accepted

Answered

Splitting arrays based on row number resulting from for loop

Here you go: data=(1:10)'+(0:1);%generate some data splits=[3 8];%use the splits you mentioned if ~isempty(splits) spl...

Splitting arrays based on row number resulting from for loop

Here you go: data=(1:10)'+(0:1);%generate some data splits=[3 8];%use the splits you mentioned if ~isempty(splits) spl...

9 days ago | 0

| accepted

Answered

GUI Interface to guess a random number

You should put it in the function that executes when you start you GUI: OpeningFcn. Be sure to store the value in the handles s...

GUI Interface to guess a random number

You should put it in the function that executes when you start you GUI: OpeningFcn. Be sure to store the value in the handles s...

9 days ago | 0

Answered

Counting and removing rows with the same numbers in a particular order

Assuming this is indeed the input data you have: A = [1234;4123;3412]; B=arrayfun(@(x) sort(sprintf('%d',round(x))),A,'Unifo...

Counting and removing rows with the same numbers in a particular order

Assuming this is indeed the input data you have: A = [1234;4123;3412]; B=arrayfun(@(x) sort(sprintf('%d',round(x))),A,'Unifo...

9 days ago | 0

Answered

Picking up the correct index values

You should probably rethink the way you store these values, because this is much more difficult to index than it needs to be. v...

Picking up the correct index values

You should probably rethink the way you store these values, because this is much more difficult to index than it needs to be. v...

9 days ago | 0

| accepted

Answered

error when using 'find' function

If you store output of the find function to a temporary variable, you will notice that the error occurs when that temporary vari...

error when using 'find' function

If you store output of the find function to a temporary variable, you will notice that the error occurs when that temporary vari...

9 days ago | 0

Answered

How to solve this error?

You are close, but you forgot that the code below returns an array. month==[4,6,9,11] Use parantheses to group your coditions....

How to solve this error?

You are close, but you forgot that the code below returns an array. month==[4,6,9,11] Use parantheses to group your coditions....

9 days ago | 0

| accepted

Answered

Adding Noise To A Folder OF Images in A Loop

If you don't understand how a function works you should read the documentation. It contains several examples and shows you how t...

Adding Noise To A Folder OF Images in A Loop

If you don't understand how a function works you should read the documentation. It contains several examples and shows you how t...

10 days ago | 0

| accepted