# Dyuman Joshi

Mechanical Engineer IITG'20 Time zone - GMT +5.30 (IST)

**Programming Languages:**

MATLAB

**Spoken Languages:**

English

**Professional Interests:**

Fluid Dynamics, Aerospace Engineering, Aerodynamics, Computational Fluid Dynamics (CFD)

**Statistics**

RANK**98**

of 275,857

REPUTATION**1,264**

CONTRIBUTIONS

**7** Questions

**322** Answers

ANSWER ACCEPTANCE **
71.43%
**

VOTES RECEIVED**244**

RANK**10,881** of 18,575

REPUTATION**41**

AVERAGE RATING**5.00**

CONTRIBUTIONS**1** File

DOWNLOADS **18**

ALL TIME DOWNLOADS**363**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Count repeated numbers from a data column and produce new columns

Code edited to include output3 added by OP. @Georgios Tsiledakis, Use repelem() rather than looping over the data (especially w...

1 day ago | 1

Have one array follow another array with a threshhold

Use the same approach for A1 as well. A1 = [1 4 5 8 2 2 4]; A2 = [2 5 8 15 18 24 23]; A2Thresh = A2 < 10 | A2 > 30; A2(A2Thr...

1 day ago | 0

| accepted

"for" cycle to plot the point in a matrix with a certain radius

You should use tolerance to compare floating point numbers. Set tolerance according to the level of precision you want. And use...

1 day ago | 0

When integrating numerically with integral2, the integral function contains a sign variable, causing the integral to keep reporting an error.

You don't need to use symbolic variables for this code. Define A as a function handle and use r values as an input to define the...

1 day ago | 0

| accepted

Getting an error "Error using erfc... Input must be real and full"

The function erfc only supports real inputs (as evident by the error) and the input to erfc here is complex. You can either use...

2 days ago | 0

Newton-Raphson algorithm stuck running after 4 or 5 iterations

Converting to numeric data type is much faster than using symbolic values syms x real %I have defined f to be an explicit func...

2 days ago | 0

| accepted

plot legend that depicts different markes of nodes

The problem here is that legend will only provide labels for what graphics recognizes as individual objects. So in a line plot, ...

3 days ago | 0

| accepted

Find minimum among matrices with different sizes

Your statements contradict each other, but I guess this is what you want to obtain A=[2 8 4; 7 3 9]; B=[1 3 5]; C=min(A,B)

4 days ago | 0

| accepted

i want to solve a set of homogeneous linear equation

Note - Symbolic Toolbox required Note that you might not get a solution for x depending upon the values of A. One such exampl...

4 days ago | 0

| accepted

i don't know code

Define f and g as function handles, and use x and the output of g(x) as inputs respectively - %Using different variable name to...

5 days ago | 1

How to build a function fun that takes as input the matrix A and as output provides the matrix B which is produced out of A in the following ways.

A much simpler way - a=[1 2 3 4;5 6 7 8;9 10 11 12; 13 14 15 16] s=size(a)/2; b=circshift(a,s)

6 days ago | 3

Add data class as additional information on 2D plot

text might be helpful

6 days ago | 1

| accepted

The numbers do not appear in standard format despite the writing (format shortG)

Using format is only applicable to numeric outputs. Change the formatting operator in fprintf to obtain the proper value - for...

6 days ago | 0

How to save index of Values of an item in a matrix?

x=[0,0,0,1,0,0,0,0,1,0,1]; y=find(x>0)

8 days ago | 0

symbolic trigonometrical function tan instead of log and imaginary equation

syms a b x real sol1=solve(a*sin(x) == b*cos(x),x,'Real',true) The solution obtained above can be derived by changing sin and ...

9 days ago | 1

How to obtain vector of specific values in MATLAB

It's not a good idea to dynamically define variables. Read - Why Variables Should Not Be Named Dynamically You can make a 96x16...

9 days ago | 0

How to take an average from range of values?

It seems you have copied the data from Excel and there is a loss of data in doing that. A= [0.0000 0.4341 -0.0000 -0.5910 -0.03...

9 days ago | 0

| accepted

How to prepare normalized feature matrix in MATLAB ?

%Random data D = rand(500,4); %minimum of each row minval=min(D,[],2); %maximum of each row maxval=max(D,[],2); %Vecto...

9 days ago | 0

| accepted

How to create multiple structure variables and assign values to them at one line.

%Assign any type of data to a field [AC.a, AC.b, AC.c, AC.d] = deal(5, 15, {'cell'}, '0'); AC

9 days ago | 0

Grouping values in a matrix according to a value in a row & its index position

Vectorized approach mat=[51 71 0 48.87 63.38 -2.30769230769231 42.15 55.97 -2.30769230769231 40.22...

10 days ago | 1

Find min value of each column of 2D lattice and plot

It is better to define variables not varying with the loop index, out of the loop. Moreso, as you are using figure(). It's not ...

10 days ago | 0

| accepted

How to get the rows and columns from a matrix which do not fall into particular criteria?

Use negation on the logical indexing - x = 0:0.01:10; y = [sin(x); cos(x)]; %Get columns of y in which %first row is less th...

10 days ago | 0

| accepted

Need help with matlab code for below mentioned integrals

Note that you need symbolic toolbox to run this code - syms a b x y tau %Defining functions r(a,b) = exp(-a-b); f(a,x) = exp...

11 days ago | 1

| accepted

Can't run my 'if, elseif, else' code

if-else is not a loop, they are conditional statements. If you want to print/display something, use sprintf or fprintf or disp....

11 days ago | 1

How to change diagonal, subdiagonal and superdiagonal values with respect time while using loop and conditional statement?

xmax=1; ymax=7; m=20; n=29; tmax=100; nt=500; dx=xmax/m; dy=ymax/n; dt=tmax/nt; UOLD=zeros(m,n);VOLD=zeros(m,n); A=zeros(m,...

11 days ago | 0

| accepted

Why do I receive "Not enough input arguments"? or How can I better code this ODE?

I'm not sure why you receive that error, but your code works properly with some tweaks. There is no need to use global here. I...

11 days ago | 1

Error using cross and not calculating correctly

You are using character scalars instead of using variables. The result you get are corresponding to the ascii values of the char...

11 days ago | 0

How do I plot separate graphs in a for loop?

To iterate over the values of a column vector, you need to transpose it to create a row vector and then proceed. Otherwise, the...

11 days ago | 1

how can i return l21 value

As you can see above, l21 is stored as a field in the struct x. You need to use dot indexing to get its value - syms l21 l31 l3...

12 days ago | 0

How to convert double value to int value?

If you want to round the number - d=5.2; %smallest integer less or equal to input floor(d) %nearest integer to the input ro...

12 days ago | 2