Answered

error in task 6 of robotic vacuum stateflow

Hi @andre, I understand that you are going through the ‘Stateflow Onramp’ course and facing this issue. I went through this...

error in task 6 of robotic vacuum stateflow

Hi @andre, I understand that you are going through the ‘Stateflow Onramp’ course and facing this issue. I went through this...

3 months ago | 0

Answered

Cannot run Simscape code

Hi @Najla, The 'C code' tab appears when you want to generate code, either by using 'ctrl + b' shortcut or when you use any of ...

Cannot run Simscape code

Hi @Najla, The 'C code' tab appears when you want to generate code, either by using 'ctrl + b' shortcut or when you use any of ...

3 months ago | 0

Answered

Nozzle Design Error: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.

Hi, The reason you are getting this warning is because some matrices used in the code contain NaN values. On debugging the cod...

Nozzle Design Error: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.

Hi, The reason you are getting this warning is because some matrices used in the code contain NaN values. On debugging the cod...

3 months ago | 0

| accepted

Answered

Issue regarding a data plot

Hi Rahul, I think the reason your graph shoots up so suddenly is due to the way you have defined the ‘percentage_difference_gI’ ...

Issue regarding a data plot

Hi Rahul, I think the reason your graph shoots up so suddenly is due to the way you have defined the ‘percentage_difference_gI’ ...

3 months ago | 0

| accepted

Answered

Why isn't the numerical value assigned by matlab verified using == function.

Hi @Yogesh, the 'format' command does not change the precision of your variables. It only changes the format in which the output...

Why isn't the numerical value assigned by matlab verified using == function.

Hi @Yogesh, the 'format' command does not change the precision of your variables. It only changes the format in which the output...

3 months ago | 0

Answered

Kindly guide how to add the single edit field for each RLC like [0.01, ...] and different time interval [10, 20, 30] in app designer and also the phase result on interfaces

Hi @Ehtisham, from what I understand you want to get a numerical vector from an edit field when you enter a string like “[10,20,...

Kindly guide how to add the single edit field for each RLC like [0.01, ...] and different time interval [10, 20, 30] in app designer and also the phase result on interfaces

Hi @Ehtisham, from what I understand you want to get a numerical vector from an edit field when you enter a string like “[10,20,...

3 months ago | 0

Answered

Invalid setting in 'Model' for parameter 'Gain'.

Hi @SM, from my understanding you are calling the ‘F3’ function iteratively and based on the output from the function changing t...

Invalid setting in 'Model' for parameter 'Gain'.

Hi @SM, from my understanding you are calling the ‘F3’ function iteratively and based on the output from the function changing t...

3 months ago | 0

Answered

calling function from separate document for fitting

Hi @Jack, the error that you are recieving is because you are passing 'x' as an argument of 'TA_fitting_function' but not defini...

calling function from separate document for fitting

Hi @Jack, the error that you are recieving is because you are passing 'x' as an argument of 'TA_fitting_function' but not defini...

4 months ago | 0

Answered

After upgrading Win11, MATLAB garbled characters

Hi @第四, it looks like you have opened a 'pcode' file (file with extension '.p'). 'pcode' files are MATLAB program files in a pro...

After upgrading Win11, MATLAB garbled characters

Hi @第四, it looks like you have opened a 'pcode' file (file with extension '.p'). 'pcode' files are MATLAB program files in a pro...

4 months ago | 1

Answered

How to create a dialog box in the plot window.

Hi @Ruben, you can use MATLAB’s ‘UIControl’ objects to build the user interface of your game. You can learn more about ‘UIContro...

How to create a dialog box in the plot window.

Hi @Ruben, you can use MATLAB’s ‘UIControl’ objects to build the user interface of your game. You can learn more about ‘UIContro...

4 months ago | 0

| accepted

Answered

Trouble simulating an RC low and high pass filter with trapoziodal aproximation

Hi @Dayan, The reason your plot is not matching to the one in the lecture is because you are calculating ‘va2’ with old value...

Trouble simulating an RC low and high pass filter with trapoziodal aproximation

Hi @Dayan, The reason your plot is not matching to the one in the lecture is because you are calculating ‘va2’ with old value...

4 months ago | 0

Answered

inverse kinematics (self made function) errors

Hi @Manuel, the reason you are getting constant values for ‘joint2’ is because in the definition of ‘cos_joint2’ the sum of ‘ter...

inverse kinematics (self made function) errors

Hi @Manuel, the reason you are getting constant values for ‘joint2’ is because in the definition of ‘cos_joint2’ the sum of ‘ter...

4 months ago | 0

Answered

Comparing difference in values between values in an array - Using For Loop

Hi @Ammar, the reason you are getting an error is because the distance variable is not pre defined as a vector so it is not able...

Comparing difference in values between values in an array - Using For Loop

Hi @Ammar, the reason you are getting an error is because the distance variable is not pre defined as a vector so it is not able...

4 months ago | 0

| accepted

Answered

How to save multiple figures generated from a single script?

Hi @yojitha etikala, Instead of saving figures from the scope, you could save the data from the scope into matlab workspace and...

How to save multiple figures generated from a single script?

Hi @yojitha etikala, Instead of saving figures from the scope, you could save the data from the scope into matlab workspace and...

1 year ago | 0

Answered

how convert field struct in cellarray

Hi @aldo Rank_DisplayIdxsis is already a cell array. When cell arrays are used as a value for struct field, then an array of st...

how convert field struct in cellarray

Hi @aldo Rank_DisplayIdxsis is already a cell array. When cell arrays are used as a value for struct field, then an array of st...

1 year ago | 0

Answered

Initializing UI Table App Designer

Hi Richard, This error is caused because you are converting the string arrays into cell arrays, because of which while concaten...

Initializing UI Table App Designer

Hi Richard, This error is caused because you are converting the string arrays into cell arrays, because of which while concaten...

1 year ago | 0

Answered

How to solve the matrix P in the Lyapunov equation "A'P+PA=- Q" in Simulink

Hi LIULYAN, You can use a MATLAB function block and call the lyap function inside it to calculate P. Implement MATLAB Function...

How to solve the matrix P in the Lyapunov equation "A'P+PA=- Q" in Simulink

Hi LIULYAN, You can use a MATLAB function block and call the lyap function inside it to calculate P. Implement MATLAB Function...

1 year ago | 0

Answered

hi i have a function with 5 constraints , i need someone to help me write the 5th one

Hi Anwar, If your constraint is |S[k] - S[k-1]| > dSOCmin then the condition in the if statement should be if any(abs(dx)<=dS...

hi i have a function with 5 constraints , i need someone to help me write the 5th one

Hi Anwar, If your constraint is |S[k] - S[k-1]| > dSOCmin then the condition in the if statement should be if any(abs(dx)<=dS...

1 year ago | 0

Answered

Unable to Package App on App Designer

Hi Kuber, The import tool is not supported for code generation, so if you are using it in your app it will not work. Here's a v...

Unable to Package App on App Designer

Hi Kuber, The import tool is not supported for code generation, so if you are using it in your app it will not work. Here's a v...

1 year ago | 0

Answered

How to code following equation in MATLAB ?

Hi Charu, There are a few issues with both your methods and I also have some doubts about the equation. Is B(m) a function of m...

How to code following equation in MATLAB ?

Hi Charu, There are a few issues with both your methods and I also have some doubts about the equation. Is B(m) a function of m...

1 year ago | 0

Answered

what ever follows "end" has error: parse error at time: usage might be invalid matlab syntax

Hi Yao, Functions always come at the end of a matlab script. So just put those commands before the function definition and it s...

what ever follows "end" has error: parse error at time: usage might be invalid matlab syntax

Hi Yao, Functions always come at the end of a matlab script. So just put those commands before the function definition and it s...

1 year ago | 0

| accepted

Answered

UAV package delivery flight starting point

Hi, I think your problem might be solved by changing the initial world position. You may try using this: set_param(Plant, "I...

UAV package delivery flight starting point

Hi, I think your problem might be solved by changing the initial world position. You may try using this: set_param(Plant, "I...

1 year ago | 0