統計
All
Feeds
回答済み
i am trying to write a function to find the second max number
In your function you can write res = sort(v) SeMax = res(end-1) It will give you the last second value after sorting...
i am trying to write a function to find the second max number
In your function you can write res = sort(v) SeMax = res(end-1) It will give you the last second value after sorting...
7年以上 前 | 1
解決済み
Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...
7年以上 前
解決済み
Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...
7年以上 前
解決済み
Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...
7年以上 前
解決済み
Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...
7年以上 前
回答済み
How can I delete my Mathworks ID?
You should contact MathWorks Support for that http://www.mathworks.com/support/contact_us/index.html
How can I delete my Mathworks ID?
You should contact MathWorks Support for that http://www.mathworks.com/support/contact_us/index.html
7年以上 前 | 1
回答済み
Add rows of a vector in a for loop
Hey, so you can first declare a large matrix of (8*cornerpoints*2) x 2 and declare a variable k and then every time inside the l...
Add rows of a vector in a for loop
Hey, so you can first declare a large matrix of (8*cornerpoints*2) x 2 and declare a variable k and then every time inside the l...
7年以上 前 | 1
| 採用済み
解決済み
Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...
7年以上 前
解決済み
Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...
7年以上 前
回答済み
how can wirte this integration in matlab.
fun = @(q) q^4/(2*pi*(k^3)*((q + qs)^2)*sqrt(1-(q/2*k)^2)); jdp(k) = integral(fun,0,2*k);
how can wirte this integration in matlab.
fun = @(q) q^4/(2*pi*(k^3)*((q + qs)^2)*sqrt(1-(q/2*k)^2)); jdp(k) = integral(fun,0,2*k);
7年以上 前 | 0
回答済み
please give me mat-lab code for these following expression
f_u2 = 0.5*(G/hg*(sqrt(b + (4*hg*l*f_ul/G)) - (G*b/hg + 2*f_ul)))
please give me mat-lab code for these following expression
f_u2 = 0.5*(G/hg*(sqrt(b + (4*hg*l*f_ul/G)) - (G*b/hg + 2*f_ul)))
7年以上 前 | 1
| 採用済み
回答済み
3D plot of a matrix
You can do it like this, since you have not given position I have assumed (1, 2, 3, 4) to be the position. A = [ 200 30...
3D plot of a matrix
You can do it like this, since you have not given position I have assumed (1, 2, 3, 4) to be the position. A = [ 200 30...
7年以上 前 | 0
回答済み
Loop and element-by-element operation on table
Hey, you have first loaded the values from text file in h, t and rho and then you have assigned them the value 1,2,3...20 so the...
Loop and element-by-element operation on table
Hey, you have first loaded the values from text file in h, t and rho and then you have assigned them the value 1,2,3...20 so the...
7年以上 前 | 0
| 採用済み
解決済み
Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...
7年以上 前
解決済み
Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
7年以上 前
回答済み
How to make this plot
Hey, you can extract the data of P in two different vectors, one with all true(1) value and one with false(0) and plot both of t...
How to make this plot
Hey, you can extract the data of P in two different vectors, one with all true(1) value and one with false(0) and plot both of t...
7年以上 前 | 0
解決済み
The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...
7年以上 前
解決済み
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
7年以上 前
解決済み
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
7年以上 前
解決済み
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...
7年以上 前
解決済み
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
7年以上 前
解決済み
Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...
7年以上 前
解決済み
Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...
7年以上 前
解決済み
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
7年以上 前
解決済み
Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
7年以上 前
回答済み
Questions about the elapsed time of Enumeration
Hey in your code you are adding a row in weight every time the loop runs, instead of this while initializing weight give total n...
Questions about the elapsed time of Enumeration
Hey in your code you are adding a row in weight every time the loop runs, instead of this while initializing weight give total n...
7年以上 前 | 0
解決済み
Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...
7年以上 前
回答済み
License Manager Error -97 の解決方法
Hey the question is already answered, check out the answer by Mathworks Support Team on this link - <https://www.mathworks.c...
License Manager Error -97 の解決方法
Hey the question is already answered, check out the answer by Mathworks Support Team on this link - <https://www.mathworks.c...
7年以上 前 | 0



