Answered

Can anyone confirm whether this code will work on matlab online?

This is from ios. <</matlabcentral/answers/uploaded_files/251585/CEE86801-5B6C-4B55-BFC8-A55D70705A43.png>>

Can anyone confirm whether this code will work on matlab online?

This is from ios. <</matlabcentral/answers/uploaded_files/251585/CEE86801-5B6C-4B55-BFC8-A55D70705A43.png>>

6 Monate ago | 1

| accepted

Answered

Select numbers from a vector under a specific condition

<https://www.mathworks.com/help/matlab/matlab_prog/find-array-elements-that-meet-a-condition.html>

Select numbers from a vector under a specific condition

<https://www.mathworks.com/help/matlab/matlab_prog/find-array-elements-that-meet-a-condition.html>

6 Monate ago | 0

Answered

I am trying to plot my spline with clamped conditions and I am not sure why it is not letting me plot

%% clamped boundary conditions -0.5 to 0.5 t = [160 180 195 225 250 280 300]; y = [78.3 81.4 84.5 85.1 89.3 91.7 94.8]; cs =...

I am trying to plot my spline with clamped conditions and I am not sure why it is not letting me plot

%% clamped boundary conditions -0.5 to 0.5 t = [160 180 195 225 250 280 300]; y = [78.3 81.4 84.5 85.1 89.3 91.7 94.8]; cs =...

6 Monate ago | 1

| accepted

Answered

How to arrange time series data into yearly groups?

Start by importing your data with either readtable or readtimetable (timetable is more powerful when working with dates, but can...

How to arrange time series data into yearly groups?

Start by importing your data with either readtable or readtimetable (timetable is more powerful when working with dates, but can...

6 Monate ago | 1

Answered

generating 4 d tuple

Matlab doesn't have a tuple class, but uses arrays. If I'm understanding you, you want to end up with a 4x100 array. The mos...

generating 4 d tuple

Matlab doesn't have a tuple class, but uses arrays. If I'm understanding you, you want to end up with a 4x100 array. The mos...

6 Monate ago | 1

Answered

Change plot properties generated from a curve fitting

Since the object contains 2 lines try calling them specifically. For example: h(1).Marker='none' h(2).Color=[.5 .5 .5]

Change plot properties generated from a curve fitting

Since the object contains 2 lines try calling them specifically. For example: h(1).Marker='none' h(2).Color=[.5 .5 .5]

6 Monate ago | 0

| accepted

Answered

stackedplot without yticklabels?

No. stackedplot is missing a lot of common property controls. Hopefully they continue to develop this function in future release...

stackedplot without yticklabels?

No. stackedplot is missing a lot of common property controls. Hopefully they continue to develop this function in future release...

7 Monate ago | 0

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

7 Monate ago | 1

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

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

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

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

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

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

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

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

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

8 Monate 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,...

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

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

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

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

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

10 Monate 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 = ...

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

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

12 Monate ago | 1 answer | 0