Community Profile

# Deepak Gupta

##### Last seen: Today
58 total contributions since 2020

View details...

Contributions in
View by

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

alrededor de 5 horas ago

Solved

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

alrededor de 5 horas 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]; ...

alrededor de 5 horas 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...

alrededor de 5 horas 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...

alrededor de 5 horas ago

Solved

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

alrededor de 5 horas 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...

alrededor de 5 horas ago

Solved

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

alrededor de 5 horas 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 ...

alrededor de 5 horas 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...

alrededor de 5 horas 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:...

alrededor de 5 horas ago

how to extract some elements in the array using matlab?
Hello Mr. Khan, Slice_z = Slice_z(Slice_z >= 0 & Slice_Z<=3) Should work. Cheers, Deepak

alrededor de 9 horas ago | 0

| accepted

How to create a graph time vs value n
Hi Emilia, Placed of toc in the function will just display the elapsed time there instead you need to return the elapsed time f...

alrededor de 9 horas ago | 0

Is there any missing in my simulation via lsim?
Hi Volkan, I am not being sarcastice, just a suggetion, i think you should go through the basics of state space modeling. for b...

alrededor de 10 horas ago | 1

| accepted

How to fill table column value with string during creation?
Hi Sara, From what i understand you want to create table, and want to populate first column values for all rows. Here is a pi...

alrededor de 11 horas ago | 0

Solved

Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

9 días ago

How to retrieve the row value using the column value and row-column intercept value when using 2D look up tables?
I think this might work. x_found = t.x((t.y==39)&(t.z==3.2))

3 meses ago | 0

Single sided spectrum of vector y obtained using fft
You can refer FFT Documentation. There are multiple examples to obtain this. https://in.mathworks.com/help/matlab/ref/fft.html

3 meses ago | 0

Question

Creating a new object from existing object but after excluding one specific property.
Hi All, I want to copy an object from exsiting object but don't want to copy all the properties, more specifically one perticul...

4 meses ago | 1 answer | 0

### 1

doubt in the specific lines
':' means 'All'. For example in your code you have created a mask of size 4*20 and initialized it with zeros. i.e. mask = zer...

4 meses ago | 0

| accepted

Moving Average filter window size automatically up-scaled by 1
Hi Varun, In filterDesigner, you have mentioned filter order as 15 and filter taps or length of filter is order+1. The N genera...

4 meses ago | 1

| accepted

Difference 'bandpower' with time-dependent signal or 'bandpower' with PSD
Hi Inti, Bandpower function by default uses hamming window and in the psd calculation you have used rectangular window which is...

5 meses ago | 1

| accepted

Divide by 2 every second double column without losing structure of cell array
Below program should work for your problem: test = {[10, 15], [20, 30]}; for index = 1: length(test) test{index}(:, 2) ...

6 meses ago | 1

How to replace a string in a table
I am providing a solution, i suspect it's not the ideal solution but it should work. test = table(); test.month{1} = 'JANUARY'...

6 meses ago | 0

How to plot magnitude and phase spectrum of the function
Star Strider has given the answer but just FYI: X = tf([1 0], [1 -2 1]); bode(X), grid This will work too. You can know more...

6 meses ago | 0

What does "Index exceeds the number of array elements (6)." mean?
Hello Jonathan, It's hard to root cause the problem without having the xlsx sheet you are using in your program. But in general...

6 meses ago | 1

how to draw two y axis?
As suggested by Madhan, you can use yyaxis function to show 2 different scales on yaxis. In your case, x=[0,0,0,0,0,76,344,60...

6 meses ago | 1

| accepted

If you want to enter the values one by one, then you can use a loop: N=input("Enter the number of stories: ") for index = 1:N ...

6 meses ago | 0