Answered
How do I input two different vectors, r and h, into an equation?
I am not sure where is the issue.I have just tweaked the second half of your code a little bit. The second loop uses values of (...

6 years ago | 0

Answered
Making plot with two x-axis and two y-axis
I think this will help.

6 years ago | 0

| accepted

Answered
Can Matlab be used to design a chatbot?
Yes of course. Infact something like this has already been done. See here. Hope this helps!!

6 years ago | 0

Answered
How do i write algorithms
Many ways of doing this problem. Below is one way: ni=input('Enter initial value:'); nf=input('Enter final value:'); A=zeros(...

6 years ago | 1

| accepted

Answered
Script using loop and if statement
There are many ways to do this. Since your problem specifically asks for use of 'loops', you can use something like this: A = i...

6 years ago | 0

Answered
Why is my MATLAB code not executing properly?
Hi, 1) In your first if-else part of code, I feel it is better to add a default condition also to take care of any value out of...

6 years ago | 0

Answered
why nothing changes on my excel file when it is open
MATLAB cannot access and write data into a file when it is already open in another application i.e. Microsoft Excel. You have to...

6 years ago | 1

| accepted

Answered
How to plot simulink data saved to the workplace?
I assume you want to plot velocity w.r.t time on one side and gear/improved gear w.r.t time on other side of graph. Your code sh...

6 years ago | 0

| accepted

Answered
How can I get the simulation time on which my signal gets over a certain value?
Put your exponential function as a triggered sub system with the output of constant function as the trigger. Use trigger type as...

6 years ago | 0

Answered
I need help in understanding and deducing the filter used.
Ok. So what I understood is that you need a bandpass filter with passband range from 0.001Hz to 1Hz. Your input is the data arra...

6 years ago | 0

| accepted

Answered
want to get only all positive real roots
Use this: p=[1 2 -7 0 3] % Your Polynomial equation coefficients matrix A=roots(p) % All roots of equation B=A(A>=0) % Only p...

6 years ago | 1

Answered
could anyone help me how to solve the issue.
Use display(randperm(total_number_of_partitions,1),'idx')

6 years ago | 0

Answered
Obtaining value of cost function from LQR?
Are you making a model in simulink or script in MATLAB? In my case I have made a SImulink closed loop model with LQR controller ...

6 years ago | 0

| accepted

Answered
Control System Toolbox (no access to tune PID)
Since your controller model is in SIMULINK, you need "Simulink Control Design" toolbox in addition to "Control system" toolbox. ...

6 years ago | 0

Answered
How can I set a reference value in PID in Matlab code/script?
Since you have put "step(Mc)" the closed loop system Mc is showing step response plot and tracking the value '1'. Your requirem...

6 years ago | 1

Answered
I appreciate if anyone could help me with this problem
Name = {'Alex';'Morgan';'Erik';'Montana';'Molko';'Kelsie'}; Marks = [19;12;15;13;10;16]; % Create a table InputTable = table(...

6 years ago | 0

| accepted

Answered
How can I keep just the arrays with 2 is before 3 after random swap 2 numbers.
Try this: s=[1,2,3,4,5] %First random swap x=randi([1,4],1,1); if s(x)~=2 s([x x+1])= s([x+1 x]); else s([x x-1])=...

7 years ago | 0

Answered
Error converting discrete to continous transfer function
Your error message is self explanatory. If you dont specify any method for 'd2c' it takes zero order hold method by default and ...

7 years ago | 3

| accepted

Answered
Simulink generating sine waves
You can use the "Matlab Function" block to write your equation and get the output. That's one way.

7 years ago | 0

Answered
Multiplication of matrices with Multiple variables
Not sure how you are getting the 'same value'. Your code as it is will not run in the first place. Try this: %case I th1 = 0;...

7 years ago | 0

| accepted

Answered
How to campare index number of a matrix with other
for i=1:numel(A) A(i)=B(A(i)); end Also please see this.

7 years ago | 0

| accepted

Answered
Simulation of Discrete time transfer function
Correct me if I am wrong but i think "lsim" works for both continuous (S Domain) and discrete (Z Domain) transfer functions. "T...

7 years ago | 0

| accepted

Answered
Change a parameter during the simulation Simulink
In cases like this where you have to give a customized input, I prefer to go to excel to create that input as a time series. In ...

7 years ago | 0

Answered
How to sort rows of a matrix without using sortrows function?
How about doing a small search and putting a little effort before dumping your homework question here! See this.

7 years ago | 0

Answered
how to make 3 differents inputs with if else statement
Try this: Toefl=input('Toefl=') Math=input('Mathematic=') Bio=input('Biologi=') if((Toefl >= 601) && (Toefl <= 670)) && ((M...

7 years ago | 0

Answered
How to copy a simulink model to a new blank model transfering the same configurations?
In addition to copy pasting your model, try doing this. Hope this helps!

7 years ago | 0

| accepted

Answered
how to fix MATLAB Function block issue?
Your question itself is self explanatory and the error message is the solution to your problem. Many inbuilt MATLAB functions li...

7 years ago | 1

Answered
Create a difference loop from a cumulative matrix
Suppose 'A' is your 831x1 matrix. Use this: B=diff(A); Apure=[A(1);B]; If you are specific with "for loop" then you can use t...

7 years ago | 0

| accepted

Answered
how we write condition in for loop?
k=0; while k<j k=k+1 end

7 years ago | 0

| accepted

Answered
can not use PID tuner in simulink
This will help clear your doubts: https://in.mathworks.com/matlabcentral/answers/57916-what-is-the-difference-between-simulink-...

7 years ago | 2

| accepted

Load more