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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

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

casi 7 años hace | 0

| aceptada

Respondida
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])=...

casi 7 años hace | 0

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

casi 7 años hace | 3

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

Respondida
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!

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 2

| aceptada

Cargar más