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.
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...
10 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.
10 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已解决
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 years 前
已回答
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 years 前 | 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 years 前 | 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 years 前 | 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 years 前 | 0