Answered
Exact value in excel sheet of function
Hi, you can see on command window by enter following lines: format long y(783) In this way you can see on command wi...

4 years ago | 1

| accepted

Answered
How to fix axes in dynamic plot
Hi, you can add in your code xlim and ylim functions close all x=@(t)(sin(4*t)).^2; y=@(t)cos(5*t); z=pi; figure(1) for...

4 years ago | 0

Answered
Specifying row and columns in writetable function
Hi, see https://www.mathworks.com/help/matlab/ref/writetable.html on how to use writetable function. writetable(T,'myData.xls'...

4 years ago | 1

Answered
Plot grided latitude and longitude as pixels on map
I obtain this result: by running the following code: load lati.mat load loni.mat [LONG, LAT] = meshgrid(loni,lati); Z =...

4 years ago | 3

| accepted

Answered
Am I doing this right? (a Math formula to Matlab language)
Hi, A and B terms are wrong. What you wrote is the square of sum of differences. Instead formula is the sum of square of diffe...

4 years ago | 1

Solved


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...

4 years ago

Solved


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

4 years ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

4 years ago

Solved


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...

4 years ago

Solved


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...

4 years ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

4 years ago

Answered
my plot is not sinusoidal wave
Hi, the argument of cosine "(m*pi.*x)/el" returns you always one. This happens because your cosine argument is expressed in t...

4 years ago | 1

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

4 years ago

Solved


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...

4 years ago

Solved


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...

4 years ago

Answered
Import variable names and vaues from a .txt file
Hi, you can try "eval" matlab function to solve your problem For example: T = readtable(filename,'Delimiter',' '); [r,c] =...

4 years ago | 0

Solved


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...

4 years ago

Solved


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...

4 years ago

Solved


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...

4 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

4 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

4 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

4 years ago

Answered
How do I stop patch from making my squares into rectangles?
Hi, you can add to your code the following line: axis equal In this way you obtain the following result: You can see: h...

4 years ago | 0

| accepted

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 years ago

Solved


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...

4 years ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

4 years ago

Solved


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

4 years ago

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

4 years ago

Solved


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

4 years ago

Solved


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4 years ago

Load more