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...

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...

meer dan 2 jaar ago | 2

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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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;...

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;...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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-...

Add n days to juliandate

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

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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. ...

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. ...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar 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...

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...

meer dan 2 jaar ago | 3

| 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(). ...

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(). ...

meer dan 2 jaar 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...

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...

meer dan 2 jaar ago | 1

| accepted

Answered

Convert all my txt file to graph and save it as image file

Hi kenneth lee, have a look at these two built-in functions: saveas() print() Kind regards, Robert

Convert all my txt file to graph and save it as image file

Hi kenneth lee, have a look at these two built-in functions: saveas() print() Kind regards, Robert

meer dan 2 jaar ago | 0

Answered

Undefined unary operator '.'' for input arguments of type 'function_handle'.

Hi Clarisha Nijman, your b is a function handle to the anonymous function with input arguments x and y. Gradient itself is - as...

Undefined unary operator '.'' for input arguments of type 'function_handle'.

Hi Clarisha Nijman, your b is a function handle to the anonymous function with input arguments x and y. Gradient itself is - as...

meer dan 2 jaar ago | 0

| accepted

Answered

lsim: Remove input signal from plot

Hi cricketking13, if you don't want to have lsim plot the default plot, just "collect" the output and plot as you desire: %% L...

lsim: Remove input signal from plot

Hi cricketking13, if you don't want to have lsim plot the default plot, just "collect" the output and plot as you desire: %% L...

bijna 3 jaar ago | 0

| accepted

Answered

Whiteout/Remove some part of the contour plot

Hi Muhammad Usman, instead of assigning Zero to the nodes you don't want to use, apply "nan"-Values. That will be treated as if...

Whiteout/Remove some part of the contour plot

Hi Muhammad Usman, instead of assigning Zero to the nodes you don't want to use, apply "nan"-Values. That will be treated as if...

bijna 3 jaar ago | 2

| accepted

Answered

How can I write this code in matlab and have it run? ( all variables have been defined but it keeps giving me an error on this line)

Hi Adam Sabah, when I run your code I get this error message: ue = 1-4*sin((3*pi*x)/(2*L))*exp(-tmax(A/B))+4*sin((7*pi*x)/(2*L...

How can I write this code in matlab and have it run? ( all variables have been defined but it keeps giving me an error on this line)

Hi Adam Sabah, when I run your code I get this error message: ue = 1-4*sin((3*pi*x)/(2*L))*exp(-tmax(A/B))+4*sin((7*pi*x)/(2*L...

bijna 3 jaar ago | 0

Answered

Concatenate cell with numeric array in tables

Hi Marcus Watson, an straight-forward solution would be checking the variable types stored in the table. In case they don't mat...

Concatenate cell with numeric array in tables

Hi Marcus Watson, an straight-forward solution would be checking the variable types stored in the table. In case they don't mat...

bijna 3 jaar ago | 0

| accepted

Answered

How to get rid of Nan when calculating mean

Hi Emmanuel Gonzalez-Figueroa, The function mean() commes with a so-called nanflag: https://de.mathworks.com/help/matlab/ref/me...

How to get rid of Nan when calculating mean

Hi Emmanuel Gonzalez-Figueroa, The function mean() commes with a so-called nanflag: https://de.mathworks.com/help/matlab/ref/me...

bijna 3 jaar ago | 1

| accepted

Answered

'String scalar or character vector must have valid interpreter syntax:' for Sigma

Hi Yaser Khojah, I found the following description in the documentation of corrplot(): "Variable names to be used in the plots...

'String scalar or character vector must have valid interpreter syntax:' for Sigma

Hi Yaser Khojah, I found the following description in the documentation of corrplot(): "Variable names to be used in the plots...

bijna 3 jaar ago | 0

| accepted

Answered

Summation issue using loop

Hi Ali aaa, in your code parts are missing. Without knowing any constraints about the variables, I suggest the following soluti...

Summation issue using loop

Hi Ali aaa, in your code parts are missing. Without knowing any constraints about the variables, I suggest the following soluti...

bijna 3 jaar ago | 0

Answered

How to open files with similar names

Hi Carlo Speranza, first of all, get rid of the eval()-command. That is usually not needed, difficult to debug and prone to err...

How to open files with similar names

Hi Carlo Speranza, first of all, get rid of the eval()-command. That is usually not needed, difficult to debug and prone to err...

bijna 3 jaar ago | 0