Community Profile

photo

Yasasvi Harish Kumar


Active since 2018

Followers: 0   Following: 0

Statistics

All
  • Knowledgeable Level 3
  • 3 Month Streak
  • Solver
  • Knowledgeable Level 2
  • First Answer

View badges

Feeds

View by

Answered
Running Simulink model in a loop
Hi, You can use data store memory block and log the value in the workspace as well. Read more here. Regards

5 years ago | 0

| accepted

Answered
Using vpasolve in a for loop ERROR
Hi, You have an error in your for loop definition and in using vpasolve. I think this should solve it. syms M gamma=1.4; al...

5 years ago | 0

Answered
Missing Vector Scope Block in Simulink Matlab 2018b
Hi, I think you are looking for array plot. Read more Here. Regards

5 years ago | 1

| accepted

Answered
How to clear the workspace from within a program?
Hi, You can have clear all as part of your function or script. Example: clear all; a = 10; b = 5; sum = a + b; Regards

5 years ago | 1

Answered
maximum value of a function
Hi, clear clc syms a; kh=0.1; kv=0; d=26*(pi/180); p=39*(pi/180); lf=0.2; l=0.1; nq=1.35; g=18.4; H=4; kagq=((1+(k...

5 years ago | 0

Answered
i am getting only the last figure as output but i need all the 4 of them separately
Hi, Try using subplot. You can read more about it Here. Regards

5 years ago | 0

Answered
How to change values in an array based on certain rules?
Hi, Something like this should fix your problem. f = 1; for i = 1:length(x) if x(i) == f xx(i) = f; f...

5 years ago | 0

| accepted

Answered
how can i create a simulink model for any algorithm?
Hi, Based on what you want to do, you can use the different libraries on simulink. If you are new, I would suggest you start wi...

5 years ago | 0

| accepted

Answered
please, how can I fix this error; Index in position 1 exceeds array bounds (must not exceed 10001)
Hi, This is the reason for your error. The condition is always true and f becomes 1002. f=1; while (Root_array(f,1)==0 && Roo...

5 years ago | 1

Answered
How can I plot a graph within a certain range?
Hi, This should fix your problem, y=[20.50,20.50,20.50,20.50,20.50,20.50,20.60,20.60,20.60,20.60,20.60,20.60,20.60,20.60,20.60...

5 years ago | 1

| accepted

Answered
Problem with accurate conversion of signal from simulink to simscape.
Hi, Try changing the units in the Simulink - PS block. That might help fix your problem. Regards

5 years ago | 0

Answered
how can i shrink my plot to fit into a given range on the x axis
Hi, Say you have y data and x data. count = 0; for i = 1:length(y) if y(i) == 0 count = count + 1; xli...

5 years ago | 0

Answered
Help with axis on a plot
Hi, All you have to do is divide your x-axis by 12. For example: plot(x,y) %gives you the axis in months Change this to, x ...

5 years ago | 0

| accepted

Answered
overlaying 2 plot in one graph
Hi, You can use the command 'hold on' after your first plot command to have the plot overlay. Example: plot(x,y) hold on pl...

5 years ago | 0

| accepted

Answered
Iteration of a formula
Hi, All you need is a loop. This should fix your problem. maxIter=100'; %number of iterations i = 1; x(i)=4; %initial guess ...

5 years ago | 0

| accepted

Answered
How to check the value of simscape signal?
Hi, Simscape has sensors that can be connected to a PS-Simulink converter. This will help you log the required data using scope...

5 years ago | 0

| accepted

Answered
Finding common x values along with the corresponding y values.
Hi, Try something like this, t = 1; for i =1:length(x_exp) for j = 1:length(x_sim) if x_exp(i) == x_sim(j) ...

5 years ago | 0

| accepted

Answered
My plot for directivity is not showing?
Hi, Your xlabel and ylabel need to be in quotes which is missing in your script. % Setting up variables theta and phi. % phi...

5 years ago | 0

| accepted

Answered
Array comparision and replacement
Hey, From what I understand, for each element of A that is compared with C, there is a maximum occurance of one replacement. Yo...

5 years ago | 0

| accepted

Answered
How can I plot a line with just a slope
Hi, So, you can write the equation of the line as y = m*x+c. m = 3.374933333e-6, c = 1. m = 3.374933333e-6; c = 1; x = 0:10:...

5 years ago | 1

Answered
how can I shift the columns of a matrix with the for loop?
Hi, Say your input matrix(t) is an n*m matrix. for i = 1:n for j = 1:m s = t(i,j); t(i,j) = t(i,j+1); t(i...

5 years ago | 0

Answered
How to create a matrix of coordinates
Hi, Try something like this. n = input('Enter value') for i = 1:2 for j = 1:n for k = 1:n if i == ...

5 years ago | 0

| accepted

Answered
Plotting Results of a While Loop
Hi, Use an array to store the values so that you can plot them. % --------------------------------------------------------- %...

5 years ago | 1

Answered
While Loop Running forever (Draining Cylinder Question)
Hi, There are a few problems in your code. Firstly, using a . before an operation indicates element wise operation. Secondly, ...

5 years ago | 1

| accepted

Answered
how to use mat file as a input to simulink
Hi, You can have the file saved in the model workspace from which you can access the data in the mat file. Regards

5 years ago | 0

Answered
Strange behavior of diff function with symbolic variables
Hi, Your expression, D contains only 2 theta1 terms(in bold) whose derivatives cancel each other. Differentiation of theta2 and...

5 years ago | 0

| accepted

Answered
creating a nested loop to change values within a for loop
Hi, I think something like this should help. I am not too sure if I understood your question right, please let me know if you w...

5 years ago | 0

Answered
How obtain the Y value that corresponds to the largest X value for a number of plots?
Hey, I think the following should help. The variable big is an array of the largest x value in each row and the variable bigy i...

5 years ago | 1

Answered
Number of leap years in a range
Hi, The following should be able to solve your problem. The variable count stores the number of leap years. startYear=input(...

5 years ago | 0

Answered
Any suggestion on how to solve this problem using Matlab?
The below code should be able to plot the required. m = 25; mu = 0.55; g = 9.81; for t = 0:90 F(t+1) = mu*m*g/(cosd(t) ...

5 years ago | 0

Load more