Community Profile

photo

Deepak Gupta


Last seen: 3 days ago
43 total contributions since 2020

Deepak Gupta's Badges

  • Solver
  • Thankful Level 1
  • 3 Month Streak
  • Revival Level 1
  • Knowledgeable Level 2
  • First Answer

View details...

Contributions in
View by

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 days ago

Answered
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 months ago | 0

Answered
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 months 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 months ago | 1 answer | 0

1

answer

Answered
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 months ago | 0

| accepted

Answered
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 months ago | 1

| accepted

Answered
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 months ago | 1

| accepted

Answered
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 months ago | 1

Answered
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 months ago | 0

Answered
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 months ago | 0

Answered
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 months ago | 1

Answered
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 months ago | 1

| accepted

Answered
urgent help, please
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 months ago | 0

Answered
Array indices must be positive integers or logical values
Hi Abhijit, Here you don't need to use index. I think you are trying to create a function of x with f(x), but as you have alre...

7 months ago | 0

Answered
Writing a program to combine multiple arrays
Hello Grace, You can simply concate 2 or more arrays in below fasion. If A and B are 2 row arrays and you want A being appende...

7 months ago | 0

Answered
Error: Function definition not supported in this context. Create functions in code file.
Hi Augstin, In matalb, you need to write your function in a seperate matlab file and then you can call this function either fro...

7 months ago | 1

| accepted

Answered
Putting array indexes into a larger one
Hello Mert, I am not completely sure what you want to do but got some impression so have made some modification in your code. ...

7 months ago | 1

| accepted

Answered
f=@(x) function handle with range + conv
Hi Aqeel, Piecewise function is very helpful in writing conditional functions. Check it out: https://in.mathworks.com/help/sym...

7 months ago | 0

| accepted

Answered
Displaying chracters with the given input number
Hi Ahmet, You can try below code for your requirement. clear all; clc; size = double(input('Enter Size: ')); x(1:size) = '.'...

7 months ago | 1

Answered
Error when using "pspectrum" with "spectrogram" option.
Hello Ana, There is a different between data sets normal and SmallY. In dataset SmallY, values are extremly small. i.e. max v...

7 months ago | 1

| accepted

Answered
Add a variable in eventdata
Hi, I am assuming your eventdata is a table(because you want to keep the variable names). Let's say event data has 2 columns on...

7 months ago | 0

| accepted

Answered
Running 2 counters in 1 for loop simultaneously
Hi, you just need to define j outside the loop. And then use it with i as index. j = 0:12:12; for i= 1:2 % Write your co...

7 months ago | 0

Answered
While Loop Errors with Opperators
Hi Paul, As Walter has mentioned in his answer, inputdig returns data in cells and not numeric values. And therefor cell values...

7 months ago | 0

Answered
Encoder and Decoder Problem
Hi Neshant, your code is almost correct except a couple of mistakes. In read-write script you need to provide encripted messa...

7 months ago | 0

| accepted

Answered
Ordenar vector en función de otro vector
Hi, You can save both arrays a and b in another 2 dimentional array and then short this 2D array according to your array a then...

7 months ago | 0

Answered
Plotting damped sine travelling wave equation in Matlab
Your y1 seems to be function of two variables x and t so yes, you will need to use plot3 at it will plot y1 against two variable...

7 months ago | 0

Answered
why the size function for matrix count less?
Hi, You are getting error, because inside loop, you are deleting rows from the matrix so it's not of the same size as you compu...

7 months ago | 0

| accepted

Answered
Indexing between values of a 2D vector?
Hi Reinder, Yes, you can directly use conditions as index. A = 100*rand(1,100); X = A(A>5); Here, X will contain all the val...

7 months ago | 0

Answered
wavelet coherence index is incorrect
Hi Ben, wcoherence(x,y,seconds(fs)); This line has error. I am assuming fs is your samping rate. and then you are directly con...

7 months ago | 0

| accepted

Answered
how can ı find min value using for loop in matrice
You really don't need to use for loop in matlab to find min term. If you have a matrix A, then min(A) will give you minimum val...

7 months ago | 0

Load more