Question

ROI of a ring area?

How do I define an ROI of a ring area, i.e, a big cirle and small cirle inside, and I want to select the area in between. Do I ...

4 days ago | 1 answer | 0

Question

Overlay multiple images in one axes with individual transparency adjustment?

I have 3 or more images of the same size to be overlaid, each is associated with a sliding bar for transparency (0-1) adjustment...

3 months ago | 1 answer | 0

Question

find the std of each parameter after lsqlin

I'm using x = lsqlin(C,d,A,b,Aeq,beq,lb,ub) to Solve a constrained linear least-squares problem. After that, how do I find the ...

6 months ago | 1 answer | 0

Question

Overlay two images in one axes?

I have two images of the same object, but with different resolutions (and sizes). I want to show the high resolution image in...

1 year ago | 2 answers | 0

Answered

I have 10 rows and four columns in variable two. I want to write one row in one cell, 2nd row in 2nd cell, 3rd row in 3rd cell and so on into an Excel file using Matlab. How can I do this?

use num2str() to convert your 10X4 numeric matrix into 10 strings. Then use xlswrite() to write string into Excel cells. Here'...

I have 10 rows and four columns in variable two. I want to write one row in one cell, 2nd row in 2nd cell, 3rd row in 3rd cell and so on into an Excel file using Matlab. How can I do this?

use num2str() to convert your 10X4 numeric matrix into 10 strings. Then use xlswrite() to write string into Excel cells. Here'...

1 year ago | 0

| accepted

Answered

How to add constraint with condtions using fmincon?

Ask yourself 3 question: How many vairable? how many constraints? and then how to write A and b. Now you are saying L is a know...

How to add constraint with condtions using fmincon?

Ask yourself 3 question: How many vairable? how many constraints? and then how to write A and b. Now you are saying L is a know...

1 year ago | 1

Answered

How to add constraint with condtions using fmincon?

Your constraint could be written as: x-y < 1/(a<b)-1 when a<b, a<b=1, so, 1/(a<b)-1=0 when a>=b, a<b=0, so, 1/(a<b)-1=Inf, i...

How to add constraint with condtions using fmincon?

Your constraint could be written as: x-y < 1/(a<b)-1 when a<b, a<b=1, so, 1/(a<b)-1=0 when a>=b, a<b=0, so, 1/(a<b)-1=Inf, i...

1 year ago | 1

| accepted

Question

Error using function "drawassisted"

I copy and paste the example code below and got errors when testing drawassisted. Any ideas? im = imread('peppers.png'); im...

1 year ago | 0 answers | 0

Question

How to add uibuttongroup to a toolbar

I want to add 3 toggle buttons to the toolbar. They are exclusive, i.e., only one of them should be pressed. It is easy to cre...

1 year ago | 1 answer | 0

Answered

Sort a structure by the date field

It's easier to handle it in table: T=struct2table(examplestruct); sort(T.date)

Sort a structure by the date field

It's easier to handle it in table: T=struct2table(examplestruct); sort(T.date)

1 year ago | 0

Answered

how to write series of multiple non-linear constraints for optimization using fmincon in MATLAB?

You have 2n parameters, named X1,X2...Xn(for phi) and Xn+1...X2n (for tau). You need to write the constraints in the vectorized...

how to write series of multiple non-linear constraints for optimization using fmincon in MATLAB?

You have 2n parameters, named X1,X2...Xn(for phi) and Xn+1...X2n (for tau). You need to write the constraints in the vectorized...

1 year ago | 0

| accepted

Answered

Assigning Cell Arrays to Nested Structures within Structure array with Same Dimensions (Error: "Scalar structure required for this assignment")

I don't know how your struct is initialized. It should work. %initialize outputOfCefllfun{1,1}=magic(5); outputOfCefllfun{...

Assigning Cell Arrays to Nested Structures within Structure array with Same Dimensions (Error: "Scalar structure required for this assignment")

I don't know how your struct is initialized. It should work. %initialize outputOfCefllfun{1,1}=magic(5); outputOfCefllfun{...

1 year ago | 0

Answered

Generating an unknown ammount of Buttons in App Designer

You need to remove the line: UniButton = zeros(length(allKeys)); In the callback function, you can retreive source.Text ...

Generating an unknown ammount of Buttons in App Designer

You need to remove the line: UniButton = zeros(length(allKeys)); In the callback function, you can retreive source.Text ...

1 year ago | 1

| accepted

Answered

How to append elements into a 2D cell array

Don't use "end", because it keeps getting larger when you append. Need to reset it in between the two loops. try below .........

How to append elements into a 2D cell array

Don't use "end", because it keeps getting larger when you append. Need to reset it in between the two loops. try below .........

1 year ago | 0

| accepted

Question

How to add a scale bar on an image that will changes automatically with zoom in/out

Given an microscopy image, I want to add a scale bar on the bottom left or right corner of the image. This is not hard to do. ...

1 year ago | 1 answer | 0

Question

how to fetch splite3 blob data

sqlite() and fetch() function only works for one of these data types: double, int64, or char, But not for blob binary data chunk...

2 years ago | 1 answer | 0

Answered

How to read multiple excel files with different names

you can use this commend to select multiple files from the same folder.. [files,path]=uigetfile('*.xlsx','multiselect','on') a...

How to read multiple excel files with different names

you can use this commend to select multiple files from the same folder.. [files,path]=uigetfile('*.xlsx','multiselect','on') a...

2 years ago | 0

Question

datastore for large structured data

There are Datastores for tabular text files, spreadsheet files, image files, etc. What if my data is a very large binary file, ...

2 years ago | 1 answer | 0

Question

zoom tools in an image in GUI axes

I want to show an image in an gui axes and enable the zoom in(out) functionalities of the image using the mouse, display the (X,...

2 years ago | 1 answer | 0

Question

complied standalone app failed to include toolbox functions

I made a gui, running perfectly in matlab enviorment v2017a. Then I complied it into a standalone application. But it failed t...

3 years ago | 1 answer | 0

Question

Question about the CVmodels generated from regression learner app in machine learning toolbox?

In the regression learner, one can choose the "cross validation" option (i.e., 5 fold) to generate a model and use that model to...

3 years ago | 1 answer | 0

Answered

how do i rename or remove a sheet from an excel spreadsheet using matlab

https://www.mathworks.com/matlabcentral/answers/215703-changing-the-name-of-the-sheet-in-excel

how do i rename or remove a sheet from an excel spreadsheet using matlab

https://www.mathworks.com/matlabcentral/answers/215703-changing-the-name-of-the-sheet-in-excel

3 years ago | 0

Answered

How to find occurrences of a vector of strings in a cell string.

cs=[{'A1'},{'A2'},{'A3'},{'B1'},{'B8'}]; X=[{'A1'},{'B8'}]; find(ismember(cs,X)); ans: 1 5

How to find occurrences of a vector of strings in a cell string.

cs=[{'A1'},{'A2'},{'A3'},{'B1'},{'B8'}]; X=[{'A1'},{'B8'}]; find(ismember(cs,X)); ans: 1 5

3 years ago | 0

| accepted

Answered

How to use data from base workspace in app designer application

initialize your EditFields using evalin(), such as: app.EditField1.Value=evalin('base','myvar1'); app.EditField2.Value=evalin(...

How to use data from base workspace in app designer application

initialize your EditFields using evalin(), such as: app.EditField1.Value=evalin('base','myvar1'); app.EditField2.Value=evalin(...

3 years ago | 2

| accepted

Question

How to change the color of "partial" text in gui static text

For example, I want to display a string of 'ABCDE' in the static text box, and want to highlight C with red color or bold font. ...

3 years ago | 1 answer | 0

Answered

Calculus Matlab two variables

Try this, using fmincon(), to solve the min problem x0=[1,1]; Aeq=[8,3]; beq=24; lb=[1,1]; ub=[4,10]; fun=@(x)4+x(1)+x...

Calculus Matlab two variables

Try this, using fmincon(), to solve the min problem x0=[1,1]; Aeq=[8,3]; beq=24; lb=[1,1]; ub=[4,10]; fun=@(x)4+x(1)+x...

3 years ago | 1

Answered

copy from UITABLE to clipboard not working

You may want to change the uitable property of 'ColumnEditable' from true to false. When it is true, you can edit, but can't co...

copy from UITABLE to clipboard not working

You may want to change the uitable property of 'ColumnEditable' from true to false. When it is true, you can edit, but can't co...

3 years ago | 2

Answered

How do you add elements in a matrix (single column, multiple rows) and output to another matrix?

First of all, A1= [1 2 3] , A1 is one row, not one column. to make it a column, should write A1= [1; 2; 3] then, try this --...

How do you add elements in a matrix (single column, multiple rows) and output to another matrix?

First of all, A1= [1 2 3] , A1 is one row, not one column. to make it a column, should write A1= [1; 2; 3] then, try this --...

4 years ago | 0

Question

How to integrate customized kernel function into "regression learner" toolbox?

The regression learner in 2017 contains SVM method with linear, rbf, and poly kernels. What if I want to use my own kernel? Is...

4 years ago | 1 answer | 0