Community Profile

# Dyuman Joshi

Last seen: Today Attivo dal 2012

Mechanical Engineer IITG'20

Programming Languages:
MATLAB
Spoken Languages:
English
Professional Interests:
Fluid Dynamics, Aerospace Engineering, Aerodynamics, Computational Fluid Dynamics (CFD)

All

#### Content Feed

Visto da

Risposto
Get back variables out of function inside a for loop
J = [2.5 27 56]; WZ = [12.2 23.2 33]; M1 = 22; I1 = 2600; slope=(J-M1)./(WZ+3750-I1) [minval,minid]=min(slope) Jval=J(mi...

circa 9 ore fa | 1

Risposto
How to check if an integer is above or below 0.5 continuously ?
If you have numeric data, you can do something like this - x=0:0.01:3; y=abs(sin(pi*x)); %original plot plot(x,y,'k-') hol...

1 giorno fa | 1

| accettato

Risposto
how to change decimal point place
To answer your queries - format long z=3.261505126953125; z1=z*1e15 This is the best output you will get with double precisi...

1 giorno fa | 0

Risposto
How to increase yticklabel?
Change the y-limits ylim([1 5]) %or more than 5, whatever value is preferable

4 giorni fa | 0

| accettato

Risposto
How to delete a row if the value of a certain cell in a table is less than the first cell? and then carry out the same condition for the cell after it again.
%random data for example y=rand(10,2) %index of rows that don't satisfy the constraint idx=find(y(2:end,2)<=y(1,2))+1 %delet...

4 giorni fa | 1

| accettato

Risposto
I want make a (t,h)graph. But I can 't solve a problem ㅜㅜ.
- y1 is not defined in the code - If you want to perform vector operation using function handle, use element wise operations f...

4 giorni fa | 1

| accettato

Risposto
Question about searching a number in file suffix

4 giorni fa | 0

| accettato

Risposto
Get both values and indices
X = [4; 5; 1; 0; -7; 3; 0; 1; -4]; row = find(X>0 & X<6) val = X(row)

6 giorni fa | 0

| accettato

Risposto
How to multiple a vector by a scaler?
It still applies, regardless of the size of the array m=rand(1,200) mat=m/0.279

6 giorni fa | 0

Risposto
How can we insert a row matrix without altering the rest of the values?
A = reshape(1:15,3,5)' %pre-allocation y=zeros(size(A,1)*2,size(A,2)); y(1:2:end,:)=A; y(2:2:end,:)=A*10

7 giorni fa | 2

| accettato

Risposto
apply if-else-statement to a 3D matrix
The syntax for comparing multiple conditions is individualistic in MATLAB, i.e. you have to write code for each condition indivi...

13 giorni fa | 1

| accettato

Risposto
How i can concatenate the binary values of each two cell arrays into one binary value cell array?
as = {'1011','0001','0100','0110','1111','0111'}; str=strcat(as(1:2:end),as(2:2:end))

13 giorni fa | 0

| accettato

Risposto
Format x and y axis
use xticks to specify the points (years in this case) you want

14 giorni fa | 1

Risposto
Invalid Array Indexing when trying to plot the function
You forgot operation signs in a few places ((O^(1-n))./(4^n*a*x*pi^(1-n)*p))*(d_i^(2*n+1)+2*a(2*n+1)(4*O./pi)^(n)*t)^((2*n-1)....

14 giorni fa | 1

Risposto
specific RGB color in plot3
A=randi(100,10,3); %Marker size 5 is a bit small for a good visual plot3(A(:,1), A(:,2), A(:,3), 'LineStyle', 'none', 'Marker'...

18 giorni fa | 0

| accettato

Risposto
Error during integration after differentiation
When you declare x as a symbolic variable, g will defined a symbolic variable as well. And as the error states, integral3 requir...

25 giorni fa | 0

Risposto
Why does matlab plot the unit step like a straight line?
Because that's what the step response of the transfer function you mentioned looks like. You might be looking for heaviside sy...

circa un mese fa | 1

Risposto
Referring to an element within a cell array element
%pre-allocation x=cell(1,5); x{1}=[1;2;3]; for i=1:4 x{i+1}=x{i}+5; end value=x{3}(2)

circa un mese fa | 2

| accettato

Risposto
how to split table with different time values
Finding the indices where the minute starts/changes/ends - a = readtable('tb.csv'); [~,~,~,h,m,~]=datevec(a.time); y=unique([...

circa un mese fa | 1

| accettato

Risposto
Finding the averages for a unique text value
Just a FYI - MATLAB recommendation is not to use xlsread. y=readtable("data.xlsx", "VariableNamingRule","preserve") [a,~,c]=un...

circa un mese fa | 2

Risposto
print 2d array using nested foor
%Updating your solution %pre-allocation a=zeros(10); for i=1:10 for j=1:10 a(i,j)=10-i; end end a You...

circa 2 mesi fa | 2

Risposto
char to num (of datetime)
datetime() does not output string, it itself is an independent data type. t = datetime('now','Format','y/d/M HH:mm') If you wa...

circa 2 mesi fa | 1

Risposto
Plot the shape of a squid based on mathematical equations
There are some mistakes while defining tot. 3rd line inside atan it should be 384/25 and the immediate next symbol should be +...

2 mesi fa | 2

| accettato

Risposto
Computing Equation values for its unknown variables
It seems like you have copy-pasted the expression from somewhere, and the text is not compatible. Manually write the expression...

3 mesi fa | 0

| accettato

Risposto
Why won't Matlab plot anything?
Use break instead of return. As when you use return, any code after it won't be executed From the documentation - "Be careful...

3 mesi fa | 1

| accettato

Risposto
Sn*= sum of integers dividable by 11, write a script program that inputs a large positive integer M, computes the smallest integer n∗such that Sn∗> M, then displays n∗and Sn∗.
You have done quite well despite your limited understanding of the question. Your code requires only a few modifications - %M=...

3 mesi fa | 1

Risposto
choosing function in array problem
Table = [ 1 2 3 4 5; 7 8 9 11 15; 0.8 1.5 3 -3.4 2; ...

3 mesi fa | 0

| accettato

Risposto
How to avoid adding same elements
You can use unique to get the elements without repetition (subject to sum being less than 9007199254740992, as mentioned below) ...

3 mesi fa | 0

| accettato

Risposto
How to Graph with the endpoints excluded from values
d=0.01; r=(2+d:d:10-d); %not including 2 and 10 vtop = (2*pi*r.^3)/3; Cost_Top = 400*(2*pi*r.^2); Cost_total = 600*pi*r*((50...

3 mesi fa | 0

Risposto
How to draw with semiology in MATLAB?
The graph is correct. The y axis values are shown in log values as you wanted them to be. And, for the last two values of Q, th...

3 mesi fa | 2