Andy L
Followers: 0 Following: 0
MATLAB user since the start of Uni. Full time Engineer - I also play Rugby for a dose of violence at the weekends. Professional Interests: Powertrain Engineering, Control Systems, Systems Engineering.
統計
All
Feeds
解決済み
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...
6年弱 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
8年以上 前
解決済み
Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...
10年弱 前
解決済み
Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...
10年弱 前
解決済み
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...
10年弱 前
解決済み
Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...
10年弱 前
解決済み
Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...
10年弱 前
解決済み
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...
10年弱 前
解決済み
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.
10年弱 前
解決済み
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...
10年弱 前
解決済み
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...
10年弱 前
解決済み
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
10年弱 前
解決済み
Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]
10年弱 前
解決済み
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...
10年弱 前
解決済み
Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...
10年弱 前
解決済み
Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...
10年弱 前
解決済み
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...
10年弱 前
解決済み
Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...
10年弱 前
解決済み
Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.
10年弱 前
解決済み
Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...
10年弱 前
解決済み
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...
10年弱 前
解決済み
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
10年弱 前
解決済み
Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
10年弱 前
解決済み
Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...
10年弱 前
解決済み
Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...
10年弱 前
解決済み
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....
10年弱 前
回答済み
Problem reading my results
Try format long in your code. MATLAB should recognise that these are just the short form of these numbers.
Problem reading my results
Try format long in your code. MATLAB should recognise that these are just the short form of these numbers.
約10年 前 | 0
回答済み
How to find a trend in a sequence?
Try this thread for a similar problem <https://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/244401 https://www.m...
How to find a trend in a sequence?
Try this thread for a similar problem <https://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/244401 https://www.m...
約10年 前 | 0
回答済み
Storing points into an array
For the first question I think that if you change the following line of code p = img('75,104,361'); to p = img(75,1...
Storing points into an array
For the first question I think that if you change the following line of code p = img('75,104,361'); to p = img(75,1...
約10年 前 | 0
| 採用済み
回答済み
ode45 not enough input argument
You need to vectorise your inputs to ode1 as below: %Ode function: function dTdt = ode1(t,T,d,e) becomes functio...
ode45 not enough input argument
You need to vectorise your inputs to ode1 as below: %Ode function: function dTdt = ode1(t,T,d,e) becomes functio...
約10年 前 | 0