Answered

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

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

20 days ago | 0

Answered

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

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

25 days ago | 1

| accepted

Answered

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

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

28 days ago | 0

| accepted

Answered

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

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

2 months ago | 2

Answered

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

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

2 months ago | 0

Answered

Reading CSV files in a sequence based on numeric value in file name

d = dir('*.csv'); filenames = {}; index = 0; k = 0; for i = 1:length(d) % Using regexp with lookaround on the file name t...

Reading CSV files in a sequence based on numeric value in file name

d = dir('*.csv'); filenames = {}; index = 0; k = 0; for i = 1:length(d) % Using regexp with lookaround on the file name t...

2 months ago | 0

| accepted

Answered

How to index a random matrix with set conditions?

For a list of the negative values: negM = M(M<0) For the indices of the negative values: [i,j] = find(M<0) To display only t...

How to index a random matrix with set conditions?

For a list of the negative values: negM = M(M<0) For the indices of the negative values: [i,j] = find(M<0) To display only t...

3 months ago | 1

| accepted

Answered

How to identify points that are located in a polygon when this polygon passes through the meridian?

It seems that you are using the mapping toolbox, Then you can use ingeoquad: ingeoquad([35,45],[0,10],[30 40], [355 5]) Your ...

How to identify points that are located in a polygon when this polygon passes through the meridian?

It seems that you are using the mapping toolbox, Then you can use ingeoquad: ingeoquad([35,45],[0,10],[30 40], [355 5]) Your ...

4 months ago | 2

Submitted

remotest(points,boundary)

Finds the position within or on a boundary that is farthest from any member of a set of points.

4 months ago | 4 downloads |

Answered

I have set of latitude and latitude of a specific region which has the mobile towers deployed and now I want to know the best possible location to deploy new mobile towers to overcome the coverage issues, which algorithm or what will be best way to ?

Obviously, optmal locations will depend on many factors, such as topography and signal interference risk. But as a first approx...

I have set of latitude and latitude of a specific region which has the mobile towers deployed and now I want to know the best possible location to deploy new mobile towers to overcome the coverage issues, which algorithm or what will be best way to ?

Obviously, optmal locations will depend on many factors, such as topography and signal interference risk. But as a first approx...

4 months ago | 3

| accepted

Answered

how can i get an improved Euler's method code for this function?

There are two problems with your code: The analytical solution is incorrect You increment x inside the for loop. Don't. The f...

how can i get an improved Euler's method code for this function?

There are two problems with your code: The analytical solution is incorrect You increment x inside the for loop. Don't. The f...

4 months ago | 2

| accepted

Solved

Simulate one complete step in the Biham–Middleton–Levine traffic model

The <http://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model Biham–Middleton–Levine traffic model> is ...

5 months ago

Answered

saving real roots in a vector; "solve" gives me weird results

The code below will solve your problem as stated. In the general case with other parameters it may not be robust. You may need...

saving real roots in a vector; "solve" gives me weird results

The code below will solve your problem as stated. In the general case with other parameters it may not be robust. You may need...

5 months ago | 0

| accepted

Submitted

Curvature of a 2D or 3D curve

Calculates the local radius of curvature as well as the cumulative arc length and the curvature vector along a 1D curve in 2D or...

5 months ago | 81 downloads |

Answered

How to find the arclength and radius of curvature for a set of 3D data points?

I was inspired by your question to write a functon that calculates the arc length and curvature of a 1D curve in 2D or 3D space....

How to find the arclength and radius of curvature for a set of 3D data points?

I was inspired by your question to write a functon that calculates the arc length and curvature of a 1D curve in 2D or 3D space....

5 months ago | 0

| accepted

Solved

Find the stride of the longest skip sequence

We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

7 months ago

Solved

Integer Sequence - II : New Fibonacci

Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

7 months ago

Solved

Is X a Fibonacci Matrix?

In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

7 months ago

Solved

Sum the Infinite Series

Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

7 months ago

Answered

'For ' loop for every day for one minut fequency sea level data

Your problem seems to be the selection of data to calculate min and max values. The code below should help you on your way. Con...

'For ' loop for every day for one minut fequency sea level data

Your problem seems to be the selection of data to calculate min and max values. The code below should help you on your way. Con...

8 months ago | 1

| accepted

Solved

Five steps to enlightenment

This problem asks you to identify valid variations of the famous <https://en.wikipedia.org/wiki/Sum_and_Product_Puzzle sum and p...

9 months ago

Answered

Curve fitting with an integral involved

function theta = Gil data = [ 0.5 1 1.1 0.83 1.6 0.74 2.2 0.55 2.5 ...

Curve fitting with an integral involved

function theta = Gil data = [ 0.5 1 1.1 0.83 1.6 0.74 2.2 0.55 2.5 ...

9 months ago | 3

| accepted

Answered

I am creating a date file using the following script, i want it to print DATES[] in the file my_dates.txt but it's only printing one date which is 2.0171e+09, that is when i type A(1,1)...i pleading for help?

The problem with your file is that you overwrite your Date_num value whenever you calculate a new one. Your DATA variable has n...

I am creating a date file using the following script, i want it to print DATES[] in the file my_dates.txt but it's only printing one date which is 2.0171e+09, that is when i type A(1,1)...i pleading for help?

The problem with your file is that you overwrite your Date_num value whenever you calculate a new one. Your DATA variable has n...

9 months ago | 0

| accepted

Solved

The sliding puzzle: 15

If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

9 months ago

Solved

Pandigital Multiples of 11 (based on Project Euler 491)

A "Pandigital number of order X" is one that contains all of the numbers from 0 to X, but with no leading zeroes. If X>9, the cy...

10 months ago

Solved

Joining Ranges

You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

10 months ago

Solved

Longest run of consecutive numbers

Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

10 months ago

Answered

How to determine the centroid of this fan(triangle) where the coordinates of one of the vertices is only known and the distance is also known?

In my comment there was a typo in the expression for the centroid. A factor of 1/3 was missing. Sorry about that. Here is a ...

How to determine the centroid of this fan(triangle) where the coordinates of one of the vertices is only known and the distance is also known?

In my comment there was a typo in the expression for the centroid. A factor of 1/3 was missing. Sorry about that. Here is a ...

10 months ago | 0

Answered

How to output specific rows from tables depending on values within the table?

I am a little uncertain about the type of data structure you use. For completeness I therefore entered your data in an Excel wo...

How to output specific rows from tables depending on values within the table?

I am a little uncertain about the type of data structure you use. For completeness I therefore entered your data in an Excel wo...

11 months ago | 0

Answered

switch in text file

I think a simple if ... else would be better that switch in your case: if isempty(strfind(C,'exp_sse2.c')) % Actions ...

switch in text file

I think a simple if ... else would be better that switch in your case: if isempty(strfind(C,'exp_sse2.c')) % Actions ...

11 months ago | 0

| accepted