Community Profile

photo

Dyuman Joshi


Last seen: Today Active since 2012

Mechanical Engineer IITG'20

Programming Languages:
MATLAB
Spoken Languages:
English

Statistics

All
  • MATLAB Mini Hack Participant
  • Treasure Hunt Participant
  • Pro
  • Thankful Level 2
  • Project Euler I
  • Indexing II Master
  • 5-Star Galaxy Level 1
  • Personal Best Downloads Level 1
  • R2016b Feature Challenge Master
  • Famous
  • Likeable
  • Puzzler

View badges

Content Feed

Answered
Please how to give different color for each plot for this case
One way is to use rand. Colors here will be choosen randomly x = [-2:0.1:2]; a = [.5, 1, 1.3, 1.95]; figure; for i=1:length(...

ungefär 9 timmar ago | 1

Answered
Add and subtract matrix element consecutively
What you are doing in a loop, can be done via element-wise multiplication as well. You can make an array for the corresponding ...

en dag ago | 0

Answered
How to determine outside perimeter of an array?
Note - a_perim vector doesn't correspond to the outer elements of a in the example you mentioned. Here's how you can achieve th...

6 dagar ago | 1

| accepted

Answered
How to get variable r recognised when inputting a matrice? eg matrix1 = [1, 0; 2/r, 1]
Use syms to make a symbolic variable (Note - It requires the symbolic math toolbox) syms r matrix1 = [1, 0; 2/r, 1] Or if you...

7 dagar ago | 1

| accepted

Answered
How I can write in code for the Maximum value of 'Y' from left hand side not from right hand side in following figure?
Answering according to the image x=[1 2 3 4 5 6 7 8 9 10 11 12]; y=[3 4 3 2 1 2 3 4 5 6 5 4]; plot(x,y) locmax=islocalmax(y)...

8 dagar ago | 0

| accepted

Answered
I am unable run this code , can i know where is wrong
The way you have defined your function is wrong. See Declare function name, inputs, and outputs function [theta_p, epsilon_max...

9 dagar ago | 0

Answered
Why am I not getting a colorcoded plot?
You are using plot3 to make your graph, in that case, you can not change the color of the points in line individually. Use scat...

9 dagar ago | 0

Answered
Problem with output of fprintf command
You can make it in a single line. (Though 200 glycol feels a bit weird, you might wanna add an unit) input(2) function input(...

10 dagar ago | 0

Answered
How do I plot a function with multiple outputs?
You are calling the function rwABRule incorrectly. Also, there's a spelling mistake in your function call. [VVectA3,VVectB3] ...

11 dagar ago | 1

| accepted

Answered
How to store n iterations of randomly generated matrices
n = 10 ; bounds = [1 100] ; %interval over which the random number generator will produce values randA_all=zeros(3,3,n); for ...

11 dagar ago | 0

Answered
Sorting return by dates
%to get the year of a date [year,~,~] = datevec(727594) %storing the years in y (months and dates are not necessary) %dates a...

12 dagar ago | 0

Answered
How do I concatenate cell arrays and line up the rows according to matching items in a column?
Sort by IDs and then join [~,idhe]=sort(string(high_empathy_ID_factors(:,1))); high_empathy_ID_factors=high_empathy_ID_factors...

13 dagar ago | 0

Answered
Find overlapping days across two datetime variables
%random data dt1=datetime(2022,6,1):datetime(2022,7,27); %1st June to Today dt2=datetime(2022,7,1):datetime(2022,9,1); %1st Ju...

13 dagar ago | 1

| accepted

Answered
How to generate random variable theta for F(theta)=N(1 - (mu*B)/(k*T)*cos(theta)). For N=1 and mu*B/k*T=0.01
syms theta fplot(1-0.01*cosd(theta)) xlim([0 180]) ylim([0.99 1.015])

19 dagar ago | 1

Answered
finding the orthogonal vectors for a series of vectors
Another method will be - for i=1:size(vec,1) v=vec(i,:); %generate a random vector r=rand(1,3); %check it ...

19 dagar ago | 3

Answered
Plotting performance vs inlet temp for jet engine and measuring performance as dh as shown. What am I doing wrong?
The for loop indexing is incorrect close all clear all P1 = 101 ;%pressure in kpa T1 = 298;%temperature in kelvin n = 1.4; ...

20 dagar ago | 1

Answered
To split class in a cell array
Looks like a simple variable assignment %random data y=num2cell(rand(10,30)) class_1 = y(:,1:15) class_2 = y(:,16:30) %if y...

21 dagar ago | 1

| accepted

Answered
Splitting n by 1 matrix
mat2cell approach (gives 1x24 instead of 24x1) A=transpose(1:12552); B=mat2cell(reshape(A,24,[])',ones(1,12552/24)) B{3}'

23 dagar ago | 0

Question


integral() not working properly?
I am trying to integrate a function, however integral() doesn't seem to give the correct value - f=@(t) sin(t.^3./3); y=integ...

26 dagar ago | 1 answer | 0

1

answer

Answered
long integers in matlab
You can use Java. import java.math.* y=BigInteger('10').pow(100) z=BigInteger('10').pow(100).add(BigInteger('1')) sub=z.su...

27 dagar ago | 0

Answered
Changing elements of row after certain element
For a matrix run a loop through the rows x=[-1,-0.65,-0.45,0,0.3,0.8,1,0.4,0.2,-0.1] %Code edited according to the question x...

27 dagar ago | 1

Answered
Conversion to cell from double is not possible.
It looks like you want to store your data in a cell array, with a matrix as an element. Try this %random number n = 4; alpha2...

27 dagar ago | 0

Answered
identify respective ranks of two columns in matrix and match them
You can perform sorting without changing the original data. data = [1 0 0 0.0669378275070259 2 12.1056041717529 2 12.00264...

27 dagar ago | 1

| accepted

Answered
How do I remove elements of an array from another array?
Try this - r1=[];r2=[];%preallocating to find index for k = 1:size(allpoint_i,1) countP = ismember(Pp, allpoint_i(k,:),'...

28 dagar ago | 0

| accepted

Answered
matlab plot for non separable function
syms x y fimplicit(sin(x*y)+y+2==0)

30 dagar ago | 3

| accepted

Answered
Partial Differentiation of a function with exponential is different from other calculators
There's nothing wrong with your answer, it's just simplified version of it. 2 from numerator and denominator is cancelled out an...

ungefär en månad ago | 2

| accepted

Answered
changing timestamp t and plotting the results.
I am not sure if pause works here on the online/live editor, but it works nicely offline. %building on Torsten's code n=5; dt...

ungefär en månad ago | 0

Answered
Storing a variable and calling it out again to use and plot
How can you plot with different numbers of x values and y values? x =-0.8:0.8:5; T=ones(1,5); T(1,5)=40; numel(x) numel(T) ...

ungefär en månad ago | 0

Answered
adding a variable into a vector
Your deltax is incorrectly defined and due it all subsequent calculations are incorrect as well. %It should be L=0.8; gridpoi...

ungefär en månad ago | 1

Answered
where is the error in my code?
syms doesn't go with function handles. fplot is purely for symbolic function, not function handles. V1 = @(w) -acosh(10*(w./(2...

ungefär 2 månader ago | 0

Load more