Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

Resuelto


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

casi 13 años hace

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

casi 13 años hace | 0

| aceptada

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

casi 13 años hace | 0

| aceptada

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

casi 13 años hace | 0

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

casi 13 años hace | 0

| aceptada

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

casi 13 años hace | 0

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

casi 13 años hace | 1

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

casi 13 años hace | 0

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

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 0

| aceptada

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

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 0

| aceptada

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

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 0

| aceptada

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

alrededor de 14 años hace | 0

Cargar más