Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


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

oltre 13 anni fa

Risolto


Is my wife right?
Regardless of input, output the string 'yes'.

oltre 13 anni fa

Risposto
How do I concentrate my interpolation coloring around specific data ranges?
The simplest solution would be to change the mapping of data values to the colormap using <http://www.mathworks.com/help/matlab/...

oltre 13 anni fa | 0

| accettato

Risposto
I want use Simpson numerical integration method
If you want your integral to be a function of all the parameters, you could define the following: function y = fintegral(k,...

oltre 13 anni fa | 0

| accettato

Risposto
I want to initialize class variables through array type class object using a function
The main problem is that in the command Initialize( n,i,noOfNodes); the output isn't assigned to |n|. You need n = ...

oltre 13 anni fa | 0

Risposto
How to integrate an array properly in matlab
Assuming you are trying to integrate over |theta|, a good approach is to create a function for your integrand like this: fu...

oltre 13 anni fa | 0

| accettato

Risposto
value classes - do you use them? I must be doing something wrong...
I have no idea what your method |double| does or what your class constructor does with the input, so I'll create a trivial examp...

oltre 13 anni fa | 0

Risposto
Subplot titiles in one command
You could just have the title command inside the inner loop. Suppose you have some sort of function |yourTitleHere(i,j)| for cre...

oltre 13 anni fa | 1

Risposto
Interpolating / Fitting to 3D Data
Have a look at <http://www.mathworks.com/help/matlab/ref/triscatteredinterp.html TriScatteredInterp>.

oltre 13 anni fa | 0

Risposto
non linear minimization
The simplest approach would be to invert the equation to get Q = ((T-T0).*k +(H.*z.^2))./z; This will give you three est...

oltre 14 anni fa | 0

Risposto
t Copula Fit
That's just a consequence of the small sample size, and consistent with the 95% confidence estimate ( |nuci| ) you get for |nuha...

oltre 14 anni fa | 0

Risposto
fortran 128 bit precision
The default numerical type is |double|, which has 53 bit precision (the other 11 bits being for exponents and sign). If you have...

oltre 14 anni fa | 0

Risposto
Troubleshooting tips
I tried it, and it doesn't complain if you provide values for all the constants and make sure that |V| has two elements, for exa...

oltre 14 anni fa | 0

| accettato

Risposto
Overriding "get"-able properties.
The problem occurs because you have to redefine the property |foo| in addition to the method |get.foo|. In <http://www.mathworks...

oltre 14 anni fa | 0

Risposto
Writing a Matlab function for the first time
I think what you are trying to do is convert a row vector into a matrix with |total_sets| number of rows. You can do this with t...

oltre 14 anni fa | 0

| accettato

Risposto
How to update struct array fields with mutiple values
What timing! It happens that the <http://blogs.mathworks.com/pick/2012/03/02/when-deal-doesnt-work-disperse-2/?utm_source=feedbu...

oltre 14 anni fa | 0

Risposto
calculating average
Here is some code that might do the job. I am assuming that your image is truecolor, so the data have dimensions |M x N x 3| for...

oltre 14 anni fa | 0

| accettato

Risposto
compass plot offsetting the origin
You could make a couple of subplots: subplot 211 compass(...) subplot 212 compass(...) *EDIT*: However, if you really...

oltre 14 anni fa | 0

Carica altro