Answered

How to find data points within 2% tolerance of curve

Sounds like a nice homework problem. You'll probably want to use logical indexing to find the indices of the Y data that are w...

How to find data points within 2% tolerance of curve

Sounds like a nice homework problem. You'll probably want to use logical indexing to find the indices of the Y data that are w...

6 months ago | 0

| accepted

Answered

Plotting multiple graphs from multiple ranges in excel

The easiest way is probably to read the full range of data all at once, then loop through the different ranges you want to plot....

Plotting multiple graphs from multiple ranges in excel

The easiest way is probably to read the full range of data all at once, then loop through the different ranges you want to plot....

6 months ago | 0

Answered

Getting a filter error today when yesterday didn't?

I suspect that yesterday you weren't including x in the filter. Yesterday you were filtering the d signal, which is just [1 0 0 ...

Getting a filter error today when yesterday didn't?

I suspect that yesterday you weren't including x in the filter. Yesterday you were filtering the d signal, which is just [1 0 0 ...

6 months ago | 0

Answered

How do I fix my display of the x and y values? They should be x = 1.15 and y = 3.85.

The double equals is defining x and y as a boolean. It's saying x = 1 if minimum_voltage equals acosd(B/2*A)*5/180. Let's find o...

How do I fix my display of the x and y values? They should be x = 1.15 and y = 3.85.

The double equals is defining x and y as a boolean. It's saying x = 1 if minimum_voltage equals acosd(B/2*A)*5/180. Let's find o...

6 months ago | 0

Answered

How can i create these three images in one figure?

If you're question is about how to make subplots, here's how. figure subplot(3,1,1) plot(sind(1:1e4)) subplot(3,1,2) plot...

How can i create these three images in one figure?

If you're question is about how to make subplots, here's how. figure subplot(3,1,1) plot(sind(1:1e4)) subplot(3,1,2) plot...

6 months ago | 0

Answered

How can I compute the mean value over a time interval?

Hi Anna, welcome to the forum. With these types of questions it always helps if you can provide a minimal working example. But...

How can I compute the mean value over a time interval?

Hi Anna, welcome to the forum. With these types of questions it always helps if you can provide a minimal working example. But...

6 months ago | 0

Answered

What MATLAB functions are underappreciated?

One of the most powerful functions I know of took me years from hearing about its existence to using it regularly, because it's ...

What MATLAB functions are underappreciated?

One of the most powerful functions I know of took me years from hearing about its existence to using it regularly, because it's ...

6 months ago | 3

Answered

What MATLAB functions are underappreciated?

I rarely see anyone use the lighting functions, but they're incredibly powerful and can make data come to life. They're provide ...

What MATLAB functions are underappreciated?

I rarely see anyone use the lighting functions, but they're incredibly powerful and can make data come to life. They're provide ...

6 months ago | 1

Question

What MATLAB functions are underappreciated?

Open question: What MATLAB function(s) do you wish you had discovered sooner? Are there any functions that no one talks about, b...

6 months ago | 8 answers | 4

Answered

How to plot the point where two complicated graphs cross?

Does this do it for ya? https://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections

How to plot the point where two complicated graphs cross?

Does this do it for ya? https://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections

6 months ago | 0

Answered

Array indices must be positive integers or logical values.

I think this is the error t(2*pi*j/(2*d)) The first time through the loop, j=3, which means 2*pi*j/(2*d) = 0.02 It's tryin...

Array indices must be positive integers or logical values.

I think this is the error t(2*pi*j/(2*d)) The first time through the loop, j=3, which means 2*pi*j/(2*d) = 0.02 It's tryin...

6 months ago | 1

| accepted

Answered

How to create a bubble plot with Antarctic Mapping Tool

Hey @Raffaello Nardin, First off, excellent job on creating a minimal working example. That really helps me understand where y...

How to create a bubble plot with Antarctic Mapping Tool

Hey @Raffaello Nardin, First off, excellent job on creating a minimal working example. That really helps me understand where y...

6 months ago | 4

| accepted

Answered

Multi Surface Plotting & Color Control of each surface

Try setting the facecolor option using the RGB values. Here are a red [1 0 0] and a blue [0 0 1] surface, using built-in example...

Multi Surface Plotting & Color Control of each surface

Try setting the facecolor option using the RGB values. Here are a red [1 0 0] and a blue [0 0 1] surface, using built-in example...

6 months ago | 0

Answered

How to make variable matrix?

In Matlab, the first index of any variable is 1, so T(0) will produce an error. Try T(1) to T(n+1).

How to make variable matrix?

In Matlab, the first index of any variable is 1, so T(0) will produce an error. Try T(1) to T(n+1).

6 months ago | 0

| accepted

Answered

Ackley Function 3D plot

It looks like the code stops at the line that says return. Try putting the function at the bottom of the script and ending it wi...

Ackley Function 3D plot

It looks like the code stops at the line that says return. Try putting the function at the bottom of the script and ending it wi...

6 months ago | 0

| accepted

Answered

Uniformly distributed random variables

Ah, this is a fun question, because the concept it's getting at is quite common across science and engineering. The process of...

Uniformly distributed random variables

Ah, this is a fun question, because the concept it's getting at is quite common across science and engineering. The process of...

6 months ago | 1

| accepted

Answered

How to select the starting point of a curve and tare all x, y plot data to this point

Perhaps you could find the index of the location where the chage in Y exceeds some critical threshold. You'll have to manually t...

How to select the starting point of a curve and tare all x, y plot data to this point

Perhaps you could find the index of the location where the chage in Y exceeds some critical threshold. You'll have to manually t...

6 months ago | 0

| accepted

Answered

Contour plot of spatial distribution of temperature

The regular quarter-degree spacing of the data suggests that no interpolation is necessary for this dataset--it just needs to be...

Contour plot of spatial distribution of temperature

The regular quarter-degree spacing of the data suggests that no interpolation is necessary for this dataset--it just needs to be...

7 months ago | 0

Answered

Calculate mean of gray Value

Try this. Below I'm creating an example matrix M, and calculate the mean of only the values that exceed zero: M = peaks(100); ...

Calculate mean of gray Value

Try this. Below I'm creating an example matrix M, and calculate the mean of only the values that exceed zero: M = peaks(100); ...

7 months ago | 1

Answered

Interpolation or meshgrid...Error using matlab.internal.math.interp1

Ah, it looks like tt_sort and tt2_sort are in fact sorted, but they contain some duplicate values. The easiest way to work aroun...

Interpolation or meshgrid...Error using matlab.internal.math.interp1

Ah, it looks like tt_sort and tt2_sort are in fact sorted, but they contain some duplicate values. The easiest way to work aroun...

7 months ago | 0

Answered

Median filter for an imported Excel file (removing spikes from a signal)

For a 3-point moving median, you can medfilt1 as you suggest, like this: weg_f = medfilt1(weg,3); Or similarly, you could us...

Median filter for an imported Excel file (removing spikes from a signal)

For a 3-point moving median, you can medfilt1 as you suggest, like this: weg_f = medfilt1(weg,3); Or similarly, you could us...

7 months ago | 0

| accepted

Answered

How to extract specific parts of a matrix

Let's see if I understand what you're trying to do. As I understand it, you have a 512x512 matrix with lots of values of 98 on t...

How to extract specific parts of a matrix

Let's see if I understand what you're trying to do. As I understand it, you have a 512x512 matrix with lots of values of 98 on t...

7 months ago | 1

| accepted

Answered

Plotting the trend line without plotting the data

Or more simply, polyplot(wspd_3yr,msid_3yr) using the polyplot function found here.

Plotting the trend line without plotting the data

Or more simply, polyplot(wspd_3yr,msid_3yr) using the polyplot function found here.

7 months ago | 0

Answered

trend line plotting question

I've written a simple function called polyplot to add a linear trend line to plots. Get it on the File Exchange here.

trend line plotting question

I've written a simple function called polyplot to add a linear trend line to plots. Get it on the File Exchange here.

7 months ago | 0

Answered

How to Plot Time Series Data of a Temperature Map

Hi John, A couple of things: Location number 7 is in Antarctica! The sea surface temperature data is all NaN on land, so ave...

How to Plot Time Series Data of a Temperature Map

Hi John, A couple of things: Location number 7 is in Antarctica! The sea surface temperature data is all NaN on land, so ave...

7 months ago | 1

| accepted

Answered

Climate Data Toolbox: how can i calculate correctly a trend with trend function?

Hi Alessandro, I think you've mostly got it. One key point to note is your sampling frequency is monthly, so 12 times per year...

Climate Data Toolbox: how can i calculate correctly a trend with trend function?

Hi Alessandro, I think you've mostly got it. One key point to note is your sampling frequency is monthly, so 12 times per year...

7 months ago | 0

| accepted

Answered

Making a Map Image from a Matrix

With the Climate Data Toolbox you could do it like this: T = flipud(reshape(load('TS20040101.txt'),[72 144])); % loads, reshape...

Making a Map Image from a Matrix

With the Climate Data Toolbox you could do it like this: T = flipud(reshape(load('TS20040101.txt'),[72 144])); % loads, reshape...

7 months ago | 2

| accepted

Answered

Control Text Label on plot with categorical axis

Have you tried using the 'vertical' and 'horizontal' alignment options? plot(5,6,'o') text(5,6,'default text') text(5,6,'ab...

Control Text Label on plot with categorical axis

Have you tried using the 'vertical' and 'horizontal' alignment options? plot(5,6,'o') text(5,6,'default text') text(5,6,'ab...

7 months ago | 1

| accepted

Answered

Calculating values of a dependent variable at a using a range of independent variables

Welcome to the world of Matlab, Tom. Indeed, I think this is pretty straightforward. To make a range of values of Temp between...

Calculating values of a dependent variable at a using a range of independent variables

Welcome to the world of Matlab, Tom. Indeed, I think this is pretty straightforward. To make a range of values of Temp between...

7 months ago | 0

| accepted

Answered

Mapping sea surface temp with specific location? Struggling with geoshow function?

For 3D data cubes of things like ocean temperature, you most often need to permute the first two dimensions when reading in from...

Mapping sea surface temp with specific location? Struggling with geoshow function?

For 3D data cubes of things like ocean temperature, you most often need to permute the first two dimensions when reading in from...

8 months ago | 1

| accepted