Answered
How do I run a loop through multiple subjects?
Hi Troy Tyszkowski, loop through your subject list (replace the disp()-command by your 'roast'): subject_list = {'subject1','s...

1 year ago | 1

| accepted

Answered
How to display cell format or table format in GUI table?
Hi Siti Khadijah Norzafri, apparently uitable() accepts table data: fh = uifigure; th = uitable(fh,'Data',Data3); You can us...

1 year ago | 1

| accepted

Answered
How to shade and calculate area above a reference line in a plot?
Hi Bhaskar Ravishankar, You can use area and logical indexing in order to shade the curve: resX = 0.1; xlim = [-pi,pi]; x ...

1 year ago | 0

Answered
How does lsim work?
Hi shahzer rahman, your question is answered within Matlab documentation: lsim(), linking to ltitr() (which unfortunately does ...

1 year ago | 0

| accepted

Answered
Convert the for loop into while loop without using the break statement
Hi Kimberley Pereira, If you want to translate your for-loop into a while-loop, you have to think about, when exactly the loop ...

1 year ago | 0

| accepted

Answered
Clear persisent variable in for loop
Hello Deepa Maheshvare, According to documentation persistent variables can be cleared by clearing the function from memory. If...

1 year ago | 0

Answered
Doubt in MATLAB coding.
Hi Joy Salomi, Thanks for the paper. The differential equation should be written in spherical coordinates (edit: I think there ...

1 year ago | 0

| accepted

Answered
Doubt in MATLAB coding.
Hi Joy Salomi, the implementation of a boundary value problem with singular term has to be done a bit different than you did. ...

1 year ago | 0

Answered
find the mean for each category and summarize it
Hi Mohammad Aljarrah, the function that calculates the desired values can be exchanged according to your needs. I used the "mea...

1 year ago | 2

Answered
Shade an area between 5 lines
Hi tom thornton, have a look here: https://de.mathworks.com/matlabcentral/answers/467419-how-to-get-different-colours-for-diffe...

1 year ago | 1

Answered
Make a bode plot without bode()?
Hi Jeroen von der Klip, Your task sounds as you want to omit the use of a toolbox. Even though the control system toolbox offer...

1 year ago | 1

Answered
Transport Delay of Zero
Hi Shane Cheshire, There is plenty of hints in Matlab documentation on how to fix algebraic loops. Most conveniant is to introd...

1 year ago | 0

Answered
sketch a signal function
Hi mohamad sawli, your question lacks some descriptive text. I guess you would like to plot the function. % define function m...

1 year ago | 0

Answered
deleting numbers in cell array
Hi sam van Bohemen, Thank you for your description. I guess the following code will do the trick: dInput = [10 11 10 28 9;...

1 year ago | 0

| accepted

Answered
fillmissing if the amount of NaN smaller than 15% in all table.
Hi Behzad Navidi, please test whether these two lines fulfill your requirements: nanPercent = cellfun(@(cIn) sum(isnan(cIn.pre...

1 year ago | 1

| accepted

Answered
Can I make dynamic name for the structure?
Hi Zeynab Mousavikhamene, You can but you should not. Dynamically named variable names are prone to errors and make code diffic...

1 year ago | 1

Answered
How to simplify the loops of a matrix
Hi Xinyuan, the code snippet you are providing does not make any use of the two for-loops. You can remove them, since the funct...

1 year ago | 0

| accepted

Answered
Add n days to juliandate
Hi Asatur Khurshdyan, According to documentation example juliandate() you may use caldays() to add calendar days to a datetime-...

1 year ago | 0

| accepted

Answered
Plotting Binary step function
Hi Linu Pinto, You could plot each section separately. x = -10:0.1:10; y = sin(x); z(y<0) = 1; z(y>=0) = 0; nZNew =[0 fi...

1 year ago | 0

Answered
Placing radiobuttons with relative locations
Hi Ryan1234321, When creating GUIs by command without the use of GUIDE I do place all elements in absolute position. I take car...

1 year ago | 1

| accepted

Answered
Converting cell array to struct
Hi hamzah khan, it is not clear to me how your output should look like. Documentation of cell2struct reports several examples. ...

1 year ago | 0

Answered
curve fitting for multiple variable
Hi zohre vash, that depends strongly on what kind of model function you are using. cftool provides a bunch of functions and a G...

1 year ago | 0

| accepted

Answered
structures to matrix for preparing for classification
Hi Amir Naderi, if all data to concatenate are within the field 'property' and have same size of matrix you can apply struct2ce...

1 year ago | 1

| accepted

Answered
Find and remove a value from an array
Hi Zenia Askar, Assuming the content of your variables 'done' and 'next' are numeric your code cannot remove a single value fro...

1 year ago | 0

| accepted

Answered
Could anyone help me how to overcome the error in the following code:
Hi jaah navi, To display the legend use lgd = legend('show'); The property/method 'NumColumns' does not exist. What is the pu...

1 year ago | 0

Answered
cant get a good fit
Hi Thaer Ismail, the following plot command is not correct: plot(Sw,F(x,Pc)) According to your data handling it should be pl...

1 year ago | 0

Answered
We want to get colors on edit text in GUI. How can we do this ?
Hi cevdet kopuz, if you use uicontrol()-elements in your GUI, you can make use of the properties "ForegroundColor" and "Backgro...

1 year ago | 0

Answered
Display string and variable value in a window in a GUI or different output
Hi chris bowman, there are some issues within the code snippet you provided: Matlab does not need an initiation of variables a...

1 year ago | 2

| accepted

Answered
Problem to output value from custom GUI with radiobuttons
Hi Sarah, the way how handles are assigned and used in guidata is not correct. Please refer to the documentation of guidata(). ...

1 year ago | 0

| accepted

Answered
Repeat elements of a vector as matrixes in a multidimensional array.
Hi Marius Adom, If I understood your task correctly, you can use arrayfun() to create each x-y-Matrix and concatenate them usin...

1 year ago | 1

| accepted

Load more