Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 0

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 0

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

fast 13 Jahre vor | 1

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

fast 13 Jahre vor | 0

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

Mehr laden