Community Profile # Dyuman Joshi

Last seen: Today Active since 2012

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

Programming Languages:
Python, MATLAB
Spoken Languages:
English, Hindi
Pronouns:
He/him
Professional Interests:
Fluid Dynamics, Aerospace Engineering, Aerodynamics, Computational Fluid Dynamics (CFD)

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

Simple Vector Indexing Question
FYI, a 6000x50 array is not a vector, it's a 2D array. You can select the rows directly - activeVector = vector([540:1238 14...

34 minutes ago | 0

Mean of values in acolumn depending on VARYING values of another column
in =readmatrix('Book2.xlsx'); disp(in) out = accumarray(in(:,2),in(:,1),[],@mean)

5 hours ago | 0

| accepted

plotting 2 y-axis in one graph
The ylabel() call for the left y-axis should be done before changing the y-axis to right. Refer to this example - https://in.ma...

6 hours ago | 0

| accepted

Shuffle order of cell array without repeating rows
A brute force approach tailored to the example you have posted - A = {"string1"; "string2"; "string3"; "string1"; "string2"; "...

7 hours ago | 0

| accepted

LaTeX text in legend command
s=tf('s'); G=725/((s+1)*(s+2.5)*(s+25)); Go=G/(s+1); DeltaG=-s/(s+1); IDG=1/DeltaG; F=1; T1=feedback(F*G,1); figure h...

8 hours ago | 0

| accepted

How to get x-values in bar?
Change the x values to categorical data type - x=[1:3,8]; y=[500 500 500 500 69 535 1354 42 97 498 1357 48 73 ...

10 hours ago | 1

| accepted

How to compress data into numerical intervals
Here's an approach - %Load the data load('CTD.mat'); arr = CTD.Depth; n = numel(arr); %Pre-allocate the variable in wh...

2 days ago | 0

| accepted

Plots are generated as a screenshot of whole screen using Publish Tool?
Use the robust exportgraphics function.

2 days ago | 0

How to vectorize function on vectors stored in 3D tensor
Try this - function sumeol = sum_over_line(tau, L, zstruct, rstruct, P) before = zeros(P.Ntimes_An, rstruct.rlength); i=1:P....

2 days ago | 0

| accepted

replace characters (like 'n/a') with 0 inside a .txt text file

2 days ago | 0

| accepted

How to perform the following data splitting?
%Random data t = 5.2:0.002:5.3; x = 1:numel(t); %Define bins to group data into cats = min(t):0.02:max(t); %Group the ...

3 days ago | 0

| accepted

Generating random decimals with a range
%Change the display format format longg %Generate random number between [min max]*10^(num_of_demicals) %and divide the outp...

3 days ago | 3

| accepted

How to get a specific shape of a contour plot in MATLAB
One simple way to obtain that is to fill the upper half with white color - x = linspace(0,1,11); y = linspace(0,1,11); Z = [...

3 days ago | 3

not correct output when using fprintf with multiple lines
Arrange the values to make a 2xn vector. fprintf('class %d: number of students %d\n',[1:5; 15 17 12 18 15]) The values are use...

4 days ago | 1

| accepted

How to add map to an output
When using heatmap, colormap has to be specified in the call. See below - % Load your data data = readmatrix('subtowersutm.xl...

4 days ago | 0

Index exceeds the number of array elements (10)
I guess you are trying to do this - var = cell(CC.NumObjects,1); for j = 1:n var{j,1} = double(image(CC.PixelIdxList{1,j})))...

4 days ago | 0

If inputs are matrix why is output no matrix in a for loop?
Because you have not used element-wise division while defining theta4_neg and theta3_neg. The simple backslash operator (/) pe...

5 days ago | 0

interpolation of gaze trajectory data
Check out fillmissing

5 days ago | 0

How to plot with ticks but without figures
Remove the tick labels - %Example %Plot fplot(@(x) sin(x), [-5 5]) %Adjust ticks xticks(-5:0.5:5) %Remove the tick labels...

5 days ago | 0

splitting output of a loop into multiple parts
Dynamically growing arrays is not a good coding practice. Instead, Preallocate a cell array and vectorize the inner for lop. R...

5 days ago | 1

| accepted

Save the handles of each plot then delete accordingly. %Example figure hold on [X,Y] = meshgrid(0:6,0:6); U = 0.25*X; ...

5 days ago | 1

| accepted

i am unable to plot the following signals can anyone help me? 1. x(−1 − t) 2. (x(t)+x(−t))u(t−1)
Define a piecewise function and use subs to obtain the function for the different inputs. syms t %Define x(t) x = piecewise...

6 days ago | 0

| accepted

Importing multiple files using a loop
This is a general idea - n=30; %Preallocate A = cell(1,n); %Storing data for k=1:n A{k} = importdata(sprintf('0%d...

6 days ago | 0

| accepted

Find all x-axis values to a certain y-axis value
Logical indexing is the way to go. Also refer to Find Array Elements That Meet a Condition

6 days ago | 1

| accepted

Why are is the zeros or zero(size) function in a for-loop function?
"Why are is the zeros or zero(size) function in a for-loop function?" y = zeros(1,100); This is called Pre-allocation. It is d...

6 days ago | 1

How to remove the textbox on geoplot()?
You can not remove that particular textbox. That textbox is embedded in the geobasemaps that are provided by external sources, p...

6 days ago | 1

function not plotting, but no error message
The code after the semi-colon in this line of code seems to be a typo opts = odeset('RelTol',1e-6,'AbsTol',1e-8);function [dXdt...

7 days ago | 0

How determine prime numbers after checking if they're odd
Check for prime numbers using isprime

7 days ago | 1