Community Profile

Contact

Top 5% contributor

This package provides units conversion factors and enforces unit algebra for Matlab

7 downloads

3 years ago

You need to transpose e: xlswrite ('Cumulative_flow.xlsx',e',1,'D2:D17521') alternatively, create your d vector in the s...

accepted

0

Answered 3 years ago

This looks like it will do what you want: index=[0 0 0 1 0 0 0 0 0 0]; a=0; i = 1; while i < length(index) ...

1

I think you want to use events then. try something like this: function main % example to count zeros using events options = ode...

3629 views

Responded 4 years ago

you can use the interp1 function to make a function out of data. here is a little example: function main a = 1; [X,Y] = ode45(...

You can use heaviside functions like this: f = @(t) (heaviside(t) - heaviside(t- 0.5))*2.*t + (heaviside(t - 0.5) - heaviside(t...

2472 views

Responded 3 years ago

Hi, I have developed a class that extends the double class and adds units to it. The class keeps track of the units and prevent...

1534 views

Posted 4 years ago

Thanks!

1285 views

I am working with a class I developed, and I have this problem. I had to overload subsref because my class extends double. howev...

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

Solve this!

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

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

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

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

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

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

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

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

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

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

I would like to overload the ode15s function in a class definition of units. Basically I want to 1. pass arguments with units ...

1275 views

How about: M2 = zeros(size(M)); M2(:) = -inf; M2([2 4],2) = M([2 4],2); [val ind] = max(M([2 4],2));

1014 views