Answered

getting min & max of a function for different y's

Try this: x = -10:0.1:10; for i=1:200 y= 0.005*i; f1 = @(x) trapmf(x,[-2 0 0 2])-y; for ij = -10:0.01:10 ...

getting min & max of a function for different y's

Try this: x = -10:0.1:10; for i=1:200 y= 0.005*i; f1 = @(x) trapmf(x,[-2 0 0 2])-y; for ij = -10:0.01:10 ...

nästan 5 år ago | 0

Answered

Is it possible to numerically label a segmented image?

Hello! Try this: M = im2uint8(label/NUM); imshow(M) s = regionprops(M, 'Centroid'); hold on for k...

Is it possible to numerically label a segmented image?

Hello! Try this: M = im2uint8(label/NUM); imshow(M) s = regionprops(M, 'Centroid'); hold on for k...

nästan 5 år ago | 0

| accepted

Answered

How to orthogonalize a signal in respect of another signal ????

Hello! Have a look at this thread: <http://www.mathworks.com/matlabcentral/answers/2216-projecting-a-vector-to-another-vecto...

How to orthogonalize a signal in respect of another signal ????

Hello! Have a look at this thread: <http://www.mathworks.com/matlabcentral/answers/2216-projecting-a-vector-to-another-vecto...

nästan 5 år ago | 0

Answered

Why is my function not defining my outputs and just returning "ans"?

In the script where you are using the function you need to define a variable e.g ABC = noise_removal(data); Then it will ...

Why is my function not defining my outputs and just returning "ans"?

In the script where you are using the function you need to define a variable e.g ABC = noise_removal(data); Then it will ...

nästan 5 år ago | 0

| accepted

Answered

Binning 2D set of coordinates

imagesc flips the image I think. This is from the help: imagesc(x,y,C) displays C as an image and specifies the bounds of the x-...

Binning 2D set of coordinates

imagesc flips the image I think. This is from the help: imagesc(x,y,C) displays C as an image and specifies the bounds of the x-...

nästan 5 år ago | 0

Answered

How to convert 27625 to base 10 from base 7 ?

It cannot have number 7 in it if it is in base 7. Otherwise you would do it like this: base2dec('26625',7)

How to convert 27625 to base 10 from base 7 ?

It cannot have number 7 in it if it is in base 7. Otherwise you would do it like this: base2dec('26625',7)

nästan 5 år ago | 2

| accepted

Answered

How to shift date-time variable to a common start-date/time

Try this: shifted_date = datetime(actual_dates) - t_diff

How to shift date-time variable to a common start-date/time

Try this: shifted_date = datetime(actual_dates) - t_diff

nästan 5 år ago | 2

Answered

Matlab crashes on me every time I get an error message in the command window.

Also, looking at the crash log generated by matlab could help to find the reason. Look at this thread: http://www.mathworks.com...

Matlab crashes on me every time I get an error message in the command window.

Also, looking at the crash log generated by matlab could help to find the reason. Look at this thread: http://www.mathworks.com...

nästan 5 år ago | 0

Answered

My code primarily depends on the diameter or "d" as it is defined, however changing it to a smaller value beyond 0.001, all the results just go to infinity. How do i get around the rounding issue (it seems) ?

I think it's not a rounding issue. In Vy(i+1) = (Cd*A*rho*(Uy-Vy(i))^2*dt)/(2*m) + Vy(i); The fraction (Cd*A*rho*dt)/(2*m) is ...

My code primarily depends on the diameter or "d" as it is defined, however changing it to a smaller value beyond 0.001, all the results just go to infinity. How do i get around the rounding issue (it seems) ?

I think it's not a rounding issue. In Vy(i+1) = (Cd*A*rho*(Uy-Vy(i))^2*dt)/(2*m) + Vy(i); The fraction (Cd*A*rho*dt)/(2*m) is ...

nästan 5 år ago | 0

Solved

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

nästan 5 år ago

Solved

Area of an equilateral triangle

Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

nästan 5 år ago

Solved

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

nästan 5 år ago

Solved

Side of a rhombus

If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

nästan 5 år ago

Solved

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

nästan 5 år ago

Solved

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

nästan 5 år ago

Solved

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

nästan 5 år 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...

nästan 5 år ago

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

nästan 5 år 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...

nästan 5 år ago

Solved

Create a Matrix of Zeros

Given an input x, create a square matrix y of zeros with x rows and x columns.

nästan 5 år ago

Solved

Normalize by maximum

Subtract the maximum value in a column from the corresponding columns of a matrix.

nästan 5 år ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

nästan 5 år ago

Solved

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

nästan 5 år ago

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

nästan 5 år 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...

nästan 5 år ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

ungefär 5 år ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

ungefär 5 år ago