Answered

default_getDatatipText.m MATLAB R2014+

(courtesy of stackoverflow) add the following to your startup.m file: set(0,'defaultFigureCreateFcn',@(s,e)datacursorextra(s))...

default_getDatatipText.m MATLAB R2014+

(courtesy of stackoverflow) add the following to your startup.m file: set(0,'defaultFigureCreateFcn',@(s,e)datacursorextra(s))...

1 día ago | 0

Answered

How can select apecific rows from text files

% Read all your data into a cell array. 'Delimiter','' means to import % everthing into one column, which I believe is better f...

How can select apecific rows from text files

% Read all your data into a cell array. 'Delimiter','' means to import % everthing into one column, which I believe is better f...

20 días ago | 0

| accepted

Answered

recall updated vector from a loop

nLoops = 5; % number of times to loop nElem = 18; % number of elements in each vector (let's use it as long as you know what it...

recall updated vector from a loop

nLoops = 5; % number of times to loop nElem = 18; % number of elements in each vector (let's use it as long as you know what it...

20 días ago | 2

Answered

How to detect if a plot has already existed?

Try this... (note I'm using "exist" instead of "isexist") clear % I'm starting with no 'h1'. This checks the "False" condition ...

How to detect if a plot has already existed?

Try this... (note I'm using "exist" instead of "isexist") clear % I'm starting with no 'h1'. This checks the "False" condition ...

20 días ago | 0

| accepted

Answered

How can I use a vector inside an @fun?

Assign 'a' first, then assign 'fun'. In your application I don't believe you can do it the other way around.

How can I use a vector inside an @fun?

Assign 'a' first, then assign 'fun'. In your application I don't believe you can do it the other way around.

21 días ago | 0

Answered

fitting line for the first part of the graph

% let's say you want to fit the first 10 elements ROI = (1:10); % I'm just sorting your data by X so it plots from left to ...

fitting line for the first part of the graph

% let's say you want to fit the first 10 elements ROI = (1:10); % I'm just sorting your data by X so it plots from left to ...

21 días ago | 0

| accepted

Answered

read a matrix from a text file

A = readmatrix('output1.txt'... % filename ,'LineEnding',{']'}... % defines ']' as the end of each row instead of a carriag...

read a matrix from a text file

A = readmatrix('output1.txt'... % filename ,'LineEnding',{']'}... % defines ']' as the end of each row instead of a carriag...

22 días ago | 0

Answered

How do you determine the average values in second column of an excel data corresponding to a particular range of values in first column ?

Here's another approach. Because of the size of your dataset I would recommend avoiding loops. the accumarray function applies s...

How do you determine the average values in second column of an excel data corresponding to a particular range of values in first column ?

Here's another approach. Because of the size of your dataset I would recommend avoiding loops. the accumarray function applies s...

22 días ago | 0

| accepted

Answered

Readtable function reads the return of CRSP data as cell array

This will convert that column to numbers (assuming all elements in that column can be converted to numbers) (EDIT: sorry I have...

Readtable function reads the return of CRSP data as cell array

This will convert that column to numbers (assuming all elements in that column can be converted to numbers) (EDIT: sorry I have...

alrededor de 1 mes ago | 0

| accepted

Answered

Changing from char variable to another input

Your *.mot files are coming in as one very long character array. You can either try to parse it character-by-character into a c...

Changing from char variable to another input

Your *.mot files are coming in as one very long character array. You can either try to parse it character-by-character into a c...

alrededor de 1 mes ago | 2

| accepted

Answered

Check if all data in a table are numbers

This is how I would approach it... DataTable = readtable(filename,'Sheet','Sheet1'); % load your data TF = cellfun(@isnumeric,...

Check if all data in a table are numbers

This is how I would approach it... DataTable = readtable(filename,'Sheet','Sheet1'); % load your data TF = cellfun(@isnumeric,...

alrededor de 1 mes ago | 1

| accepted

Answered

Using two vectors to get the third one

x = [0,1,2,4,5,7,8,9,10,12,13,14,16,17,18,20,21,23]; % here's your first column y = x*rand()+rand(); % here's a vague represent...

Using two vectors to get the third one

x = [0,1,2,4,5,7,8,9,10,12,13,14,16,17,18,20,21,23]; % here's your first column y = x*rand()+rand(); % here's a vague represent...

alrededor de 1 mes ago | 1

| accepted

Answered

Make an array Arr where element Arr(m,n)=i(m)+j(n)*i(m), and i is changing from -5 to 20 and j is changing from -13 to 9.

Make a nested For Loop with a loop for each dimension. Something like this: for ii = 1:26 i = ii-6; for jj = 1:23 ...

Make an array Arr where element Arr(m,n)=i(m)+j(n)*i(m), and i is changing from -5 to 20 and j is changing from -13 to 9.

Make a nested For Loop with a loop for each dimension. Something like this: for ii = 1:26 i = ii-6; for jj = 1:23 ...

alrededor de 1 mes ago | 0

Answered

importing excel spreadsheet as 3d matrix

May not be the most efficient, but this is what I came up with: Here's my sample data based on my interpretation of your descri...

importing excel spreadsheet as 3d matrix

May not be the most efficient, but this is what I came up with: Here's my sample data based on my interpretation of your descri...

alrededor de 1 mes ago | 0

Answered

How to skip NaN values in cross correlation between 2 time series datasets.

I encountered this same issue a few weeks ago. My solution was to use fillmissing() to patch up the NaN's. I also used resample...

How to skip NaN values in cross correlation between 2 time series datasets.

I encountered this same issue a few weeks ago. My solution was to use fillmissing() to patch up the NaN's. I also used resample...

3 meses ago | 0

Answered

Trouble using pchip to interpolate

You'll need to pre-process your data to resolve this. However, the method is up to you and depends on what you're trying to do. ...

Trouble using pchip to interpolate

You'll need to pre-process your data to resolve this. However, the method is up to you and depends on what you're trying to do. ...

3 meses ago | 2

| accepted

Answered

How to generate random points and place it within a rectangular/ square boundary?

Check out the intersect function. Here is one approach: % generate a rectangular boundry rectX = [0.1 0.1 0.9 0.9]; rectY = ...

How to generate random points and place it within a rectangular/ square boundary?

Check out the intersect function. Here is one approach: % generate a rectangular boundry rectX = [0.1 0.1 0.9 0.9]; rectY = ...

4 meses ago | 1

| accepted

Question

Adding secondary r axis to polar plots

I would like to add a secondary r-axis to a polarplot with different limits. The analogous in cartesian would of course be util...

5 meses ago | 0 answers | 0

Question

Strategies for reducing calculation time: Finding values in a large array

I have multiple individual large arrays (each are as much as 1 million rows) making up a "complete dataset". Each has two column...

5 meses ago | 1 answer | 0