Community Profile

Yasasvi Harish Kumar

49 total contributions since 2018

Yasasvi Harish Kumar's Badges

View details...

Contributions in
View by

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

10 meses ago | 0

| accepted

Solved

Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

10 meses ago

Solved

Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

10 meses ago

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

11 meses ago | 0

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

11 meses ago | 0

| accepted

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

11 meses ago | 1

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

12 meses ago | 0

Solved

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

12 meses ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

12 meses ago

Solved

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

12 meses ago

Solved

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

12 meses ago

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

12 meses ago

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

12 meses ago

Solved

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

12 meses ago

Solved

Given a and b, return the sum a+b in c.

12 meses ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

12 meses ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

12 meses ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

12 meses ago

Solved

Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

12 meses ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

12 meses ago

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

12 meses ago | 0

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

12 meses ago | 0

| accepted

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

12 meses ago | 0

| accepted

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

12 meses ago | 1

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

12 meses ago | 1

| accepted

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

12 meses ago | 0

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

12 meses ago | 0

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

12 meses ago | 0

| accepted

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

12 meses ago | 0

| accepted