已回答
How to create a spherical graph with points that are latitude and longitude?
If you don't have the Mapping Toolbox, you can always use the standard Matlab function |sph2cart| to represent the Earth as a sp...

7 years 前 | 3

已回答
Animation: Color changing over time
Hi Sarah, Indeed, a loop is the way to do it. Change the cdata each time through the loop. Be sure to set the color axis (ca...

7 years 前 | 2

已回答
Generate 1 matrix from 3 data columns
I think you can do this with <https://www.mathworks.com/matlabcentral/fileexchange/56414 |xyz2grid|>. Syntax is simply Dat...

7 years 前 | 0

已回答
Why can't my user defined function use a variable it calculates?
The problem is your |t=I/T| line is printing the value of |t| to the command window, but it's not saving it to a variable. So ch...

7 years 前 | 1

已回答
How can I run a Low Pass Filter over a Digital Elevation Model to Reduce Noise?
It looks like <https://www.mathworks.com/help/matlab/ref/imwrite.html#inputarg_fmt |imwrite|> will not write double to tiff form...

7 years 前 | 0

已回答
Optimize my for loop with vectors
I really appreciate your interesting in vectorizing. It will take you far in life. First things first, 1^2 will always be 1, so ...

7 years 前 | 0

已回答
How to plot streamlines ?
One way is to define a bunch of random seed locations within the domain like this: N = 75; % number of seed locations x...

7 years 前 | 2

| 已接受

已回答
Optimize my for loop with vectors
Hi olabaz, It looks like |eps| is getting overwritten each time through the loop, so you'll just end up with |eps| = 1. As I...

7 years 前 | 0

已回答
Saving images from figure window in Matlab.
I recommend using <https://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig |export_fig|>, which crops the white sp...

7 years 前 | 1

| 已接受

已回答
access to default line colors
You can define any colors |col| and do col = jet(5); set(gca,'colororder',col)

7 years 前 | 0

已回答
How to create animated scatter plot that plots all the points one by one?
Try this. First plot the very first point by |lat(1),lon(1)| figure; colormap(customMap); axes('position',[0 0 1 1]);...

7 years 前 | 1

| 已接受

已回答
Two line simple animation
It seems you want *two* animated line objects. h1=animatedline; h2=animatedline; axis([0,10,0,10]); time=[0 1...

7 years 前 | 0

已回答
Put name in all side of scatter 3d plot?
Do you want this? xlabel('this is the x axis') ylabel('this is the y axis') zlabel('this is the z axis')

7 years 前 | 0

已回答
How to make two images of similar visual size the same scale and coordinate system.
If you have x and y data corresponding to the rows and columns of each image, you can simply do image(x,y,I) for each ...

7 years 前 | 0

已回答
plotting data by month/year
Alternatively, you can call this after plotting in <https://www.mathworks.com/help/matlab/ref/datenum.html |datenum|> format. da...

7 years 前 | 0

已回答
How can I insert 2 figures in one figure?
How were you calling |subplot|? Did you do it like this? figure subplot(2,1,1) pcolor(X,Y,interf); shading flat...

7 years 前 | 1

| 已接受

已回答
How can I find abrupt changes in a signal in MATLAB 2015b (32bit)?
Indeed, |findchangepts| is a Signal Processing Toolbox function that was introduced in 2016a. If you're simply looking for steps...

7 years 前 | 0

已回答
Personalized colormaps with thresholds and NaN
You can make the NaNs transparent and make the background axes black like this: % A sample matrix: Z = 75*peaks(5)+100...

7 years 前 | 2

已回答
how to find the best curve fit for a set of data
Often the term "best fit" refers to linear regression, so perhaps you want <https://www.mathworks.com/help/matlab/ref/polyfit.ht...

7 years 前 | 0

已回答
How to label different lines in a loglog plot
Here's two ways. You can use a legend or you can use |text| to manually place a label where you want it: x = logspace(-1,2...

7 years 前 | 0

已回答
How to use QGIS geotiff in matlab?
Hi Anna, This situation comes up a lot. If the tiff data are regular in lat/lon, you'll need to know the extents (in lat and...

7 years 前 | 0

已回答
ylabels on the yyplot command
The method of labeling both y axes is shown in the examples for the <https://www.mathworks.com/help/matlab/ref/yyaxis.html |yyax...

7 years 前 | 0

已回答
Question about columns and multiplying within new columns
Hi Owen, I think you can do this without a loop. To take the cumulative sum, there's a built-in Matlab function called |cums...

7 years 前 | 0

已回答
I want to convert the Julian date 273.791667 to calendar day and time
You'll have to specify a year, but for 2017 you can get a date vector like this: datevec(datenum(2017,0, 273.791667)) o...

7 years 前 | 2

| 已接受

已回答
How to plot a Damped and driven oscillation
Hi Lukas, For starters, it looks like you're doing a lot of unnecessary steps. I think the code above can be rewritten simpl...

7 years 前 | 0

已回答
Matlab does not save the entire figure
I recommend using <https://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig |export_fig|> instead of |print|. It's ...

7 years 前 | 0

已回答
How to filter out x-y coordinates and data from a plot, covering exactly the boundary of some region?
To find points in a polygon use |inpolygon|, just as I suggested in the other post. If you're using Mouginot's annual velocity d...

7 years 前 | 0

| 已接受

已回答
How do i make a line of datapoints between 2 points on map, and use their index for later.
There's an example of how to calculate the flux of Thwaites Glacier in Antarctica in the documentation for measures_interp <http...

7 years 前 | 0

已回答
How to correct the alignment of quiver on a plot?
That looks like Amery Ice Shelf appearing as tiny red arrows in the middle of the eastern Ross Sea. Comparing its shape to the t...

7 years 前 | 0

| 已接受

已回答
Problems with m_proj for specific area of the world
Can you do it with <https://www.mathworks.com/matlabcentral/fileexchange/47638-antarctic-mapping-tools Antarctic Mapping Tools>?...

7 years 前 | 0

| 已接受

加载更多