Community Profile

# Are Mjaavatten

### Mjaavatten Consulting

246 total contributions since 2015

View all

Contributions in
View by

Solved

Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

2 días ago

Solved

What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

3 días ago

Solved

Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

3 días ago

Submitted

H2 and CO2 thermodynamics
Tool for effective thermodynamic calculations. Includes high-accuracy thermodynamic models for H2 and CO2.

Submitted

test_derivatives
Tool to verify that analytical derivatives are correct

Fsolve don't work good with trigonometric
Your function has several different zeros. Which one fsolve finds will depend on the starting point. I ran: f = 100; while no...

alrededor de 1 mes ago | 0

Submitted

polyfix(x,y,n,xfix,yfix,xder,dydx)
Fit polynomial p to data, but match exactly at one or more points

Question

Help text does not work for user-defined functions
I just installed R2019b and the help function does not work. Example: I created the addme function from the Add Help for Your P...

alrededor de 1 mes ago | 0 answers | 0

### 0

Question

Is there a way to avoid repeating time-consuming calculations from odefun in the events function?
The right-hand side in my ODE is quite time-consuming. In the course of calculating dy/dt I calculate a variable u that I also u...

5 meses ago | 2 answers | 0

### 2

Submitted

nistdata(species,T,p)
Create tables of thermophysical properties for gases

First order ODE parameter fit to dataset
The challenge is how to use your table of temperatures in your updateStates function. At a given time t, you must interpolate y...

5 meses ago | 0

| accepted

How to calculate a curve for different variables?
Here is one way to do it. I have reduced the number of elements in your Time and V vectors in order to make a nicer surface plo...

6 meses ago | 0

| accepted

datetime default stetings 12/24
Use HH instead of hh for the hours: >> datetime.setDefaultFormats('default','hh:mm:ss yyyy-MM-dd') >> t = datetime(2019,8,10,...

7 meses ago | 4

| accepted

How to read a file containing non numerical characters and commas?
The 22 lines of text are easily dealt with using the 'HeaderLines' option. Next you must convert your strings to doubles. Below...

7 meses ago | 0

| accepted

Cell Array Dynamic Size
If you are happy with storing the data as a matrix for each sheet : filename = 'Q.xlsx'; n_sheets = 2; DP = cell(1,n_sheets);...

7 meses ago | 0

| accepted

Solved

Fill the matrix - 1
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

8 meses ago

I have IgorTime data in which time:units = "seconds since 1904-01-01". I would like to convert this seconds to datevc.
First: Are you sure your T vector is in seconds? If so, your time list covers about 48 milliseconds around 01-Jan-1904 11:41:29....

8 meses ago | 1

Solved

Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

8 meses ago

Solved

Data Regularization
Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...

8 meses ago

Solved

Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

8 meses ago

filename = 'testdata.xlsx'; header = {'name', 'Age'}; A = [12.7;5.02;-98;63.9;0;-.2;56]; B= [12.7;5.02;-98;63.9;0;-.2;56]; c...

8 meses ago | 1

| accepted

Plot multivariable function,can't get the plot right ?
The main problem with your plot is simply that the large values of f for y > 0.5 dwarf the variations at lower values. Changing...

9 meses ago | 1

| accepted

Matrix divison or calculating slope
There is a syntax error with your use of parentheses. Also, the slope for the last row is not defined. This should work: nro...

9 meses ago | 0

| accepted

fitting a curve (3D) to pointcloud data
Assuming that the points are listed in sequence along your curve, you can express x, y, and z as functions of the (approximate) ...

9 meses ago | 1

| accepted

Word Search Words Overlapping
I was fascinated by your problem, so I wrote my own version. This gave me some insights: I recommend that you first create an ...

11 meses ago | 0

How to find same element in txt file (in a coloumn) and find the amount for averaging the value of another coloumn ?
There may be more elegant ways to read the file, but I often prefer to use textscan to read a text file into a cell array of str...

11 meses ago | 1

| accepted

Degrees-Minutes-Seconds Separation
It simplifies things if you use a doubke quote (") instead of two single qotes ('') to denote seconds. I enclose the modified ...

11 meses ago | 0

| accepted

reading a txt file with rows of different length
fid = fopen(filename); lines = textscan(fid,'%s','delimiter','\n'); fclose(fid); lines = lines{1}; % The points data are in ...

alrededor de 1 año ago | 2

Reading data row by row into matlab.
I often find it useful to read the file into a cell array of strings using textscan. Then I can easily experiment with how to b...

alrededor de 1 año ago | 0