Community Profile

# Dyuman Joshi

Last seen: Today Active since 2012

Mechanical Engineer IITG'20

Programming Languages:
MATLAB
Spoken Languages:
English

All

#### Content Feed

View by

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

Solved

Pandigital number n°2 (Inspired by Project Euler 32)
After Problem 2319. An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For example, the 5-...

ungefär 20 timmar ago

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

Solved

Given two arrays, find the maximum overlap
Given two arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. If s1 = [1 2 3 4 5]...

2 dagar ago

Solved

Apply Function to Each Field of a Structure Array: Part 2
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

4 dagar ago

Solved

Apply Function to Each Field of a Structure Array: Part 1
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

4 dagar ago

Solved

Identify Reachable Points
Given a vector of 2-D Points and a vector of 2-D Deltas create an array of all Locations that can be reached from the points usi...

6 dagar ago

Solved

Momentum Calculation
A shopping cart of mass 'm1' is traveling with velocity 'u' and collides with a second shopping cart of mass 'm2.' The two shopp...

6 dagar ago

Solved

Monty Python and the Holy Grail: Crossing the Bridge of Death
To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

6 dagar ago

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

Solved

Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...

7 dagar ago

Solved

Length of shortest path in a directed graph.
Given a directed graph and a start and end node in the graph, return the minimum number of hops required to reach the end node f...

7 dagar ago

Solved

Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

7 dagar ago

Solved

Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

7 dagar ago

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

Solved

Create numeric palindromes and their square roots
Given a number n (1<=n<=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. ...

7 dagar ago

Solved

Cyclotomic polynomial
Given a Natural number (N), return the corresponding Cyclotomic Polynomial.

8 dagar ago

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

Solved

Parametric Array
Create a row vector, 1xN (Integer, >1), such that the mean of the vector is M (Real number) and the standard deviation of the ...

8 dagar ago

Problem

Cyclotomic polynomial
Given a Natural number (N), return the corresponding Cyclotomic Polynomial.

9 dagar ago | 1 | 4 solvers

Problem

Parametric Array
Create a row vector, 1xN (Integer, >1), such that the mean of the vector is M (Real number) and the standard deviation of the ...

9 dagar ago | 1 | 3 solvers

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

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

Solved

Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

10 dagar ago

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

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

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

Solved

Consecutive Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

12 dagar ago