Réponse apportée
How to shift data in a 3D plot?
You just need to pass x and y data to surf. surf(1:256, 0:255, Z)

plus de 4 ans il y a | 0

Réponse apportée
How to plot 2d & 3d contour with xy coordinates with corresponding z values?
If you had the geometry saved, e.g. as .stl file, then you could just pass some constraints to the delunayTriangulation. However...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
4 x 4 Mask to Identify Regions on Map with Highest Value
Using imresize from the image processing TB %non-overlapping (use conv2 method 'valid' for overlapping) A = imresize(Z,0.5,'b...

plus de 4 ans il y a | 1

Réponse apportée
Plotting multiple axes that are adjacent to each other
Use this FEX function https://se.mathworks.com/matlabcentral/fileexchange/27991-tight_subplot-nh-nw-gap-marg_h-marg_w

plus de 4 ans il y a | 1

Réponse apportée
How can I shade the background of a timeseries plot based on another value.
You could do something like this, %some data days = 100:199; PA = repmat([0 0 0 0 1 1 1 1 1 1],1,10); %PA = 1 -> blue ba...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Extracting Numbers from a mixed string
out=regexp(b,'\d*\.?\d+','match') Your expression will fail when there are more than 1 digits before the decimal sign, as ? is ...

plus de 4 ans il y a | 0

Réponse apportée
Removing the first row in data with multiple headers
As per isakson said, use detectimportoptions to fine-tune your table import. fname = 's03_lab_base.c3d.txt'; opts = detectImp...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How can I create a variable number of arrays and plot in the same image?
Something like this? data = readmatrix('example.txt') x = data(:,1); v = data(:,2); id = find(x == 0); im = reshape(v,id(2)...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
Remove leading zeros from dates strings
You can use histogram() to count occurences, either with datetime or categoricals as input. dates = datetime(2010,1,12) + rand...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Cannot get mod to return correct value
You could try this FEX TB by John D'Errico. https://se.mathworks.com/matlabcentral/fileexchange/22725-variable-precision-intege...

plus de 4 ans il y a | 0

Réponse apportée
Changing the value of a spinner from another spinner
I'll just put it here for future reference :) Like most other objects, the slider is adjusted by changing the value field ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
How to plot 3d from scattered dataset captured from xlsx file?
You need gridded data to use surf. You have scattered data. xyz = readmatrix('sample.xlsx'); [x,y,z] = deal(xyz(:,1),xyz(:,2)...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Animating a complicated 3d graph
I just made some changes to your code to show you a different way of getting a similar result. Basically, just update the ydata ...

plus de 4 ans il y a | 0

Réponse apportée
Drawing line segments in a 3d plot
Something like this? A = rand(6,5); startv = [A(:,1),A(:,2),A(:,5)]; endv = [A(:,3),A(:,4),A(:,5)]; figure;hold on scatter3...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
How to use the same .mat files in different activities AppDesigner
You could put the content of the .mat file in a public property. Go to code view > select properties > add a public property. ...

plus de 4 ans il y a | 0

Réponse apportée
Time plotting in MATLAB
You can delete the secondary label (undocumented property), delete(ax.XAxis.SecondaryLabel) ...but I would just plot the data ...

plus de 4 ans il y a | 0

Réponse apportée
Daily average of several years data
This will probably work [~,~,G] = unique([SST(:,1),SST(:,2)],'rows') out = splitapply(@mean,SST(:,4),G); You should end up wi...

plus de 4 ans il y a | 0

Réponse apportée
how to create diagonal stripes in a specific area of plot
Try this FEX function https://se.mathworks.com/matlabcentral/fileexchange/30733-hatchfill This could also work for i = -size(...

plus de 4 ans il y a | 0

Réponse apportée
Finding time difference that meet criteria
First make sure your data is in duration format. %making up some data t1 = (hours(10):hours(2):hours(24))'; t2 = t1 + rand(nu...

plus de 4 ans il y a | 0

Réponse apportée
Using Pie Charts as nodes in a plot of a graph
I was quite surprised to find a FEX function that seems to do exactly what you're looking for. You could try this: https://se.m...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
How to increase xticks and labels?
You can specify the xticks manually. For example: ax = gca; dist = days(10); ax.XTick = date(1):dist:date(end) You may want ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
3D plotted shape is not following curvature of data points
Try this FEX function https://se.mathworks.com/matlabcentral/fileexchange/63730-surface-reconstruction-from-scattered-points-cl...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
hello everyone please can someone help me with stock price prediction. That is I wrote this code and from the I vector , I want a code that will remove indexes from the I vector more than 60 seconds. Thanks
You can adapt this to your needs A = readtable('LSE1.csv') t = datetime(A{:,1},'inputformat','dd.MM.yyyy HH:mm:ss.SSS') dat...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
convert csv file and write to another .m file
Error message says that table class is not supported. You can pass the content of the table or just read the data as a matrix di...

plus de 4 ans il y a | 1

Réponse apportée
Converting Colors to Other Colors
Load image RGB = imread('image.png'); Image is stored as a nxmx3 matrix, where the 3 layers are red, green and blue pixel inte...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
take averages of obvervations for each month
Try this instead retime(T,'monthly','mean') where T is a timetable example t = (datetime(2020,1,1):days(1):datetime(2021,1,1...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
problem with csv to .m conversion
try readmatrix() or readtable() instead Data = readmatrix('100Cr6.csv','NumHeaderlines',1,'DecimalSeparator',',');

plus de 4 ans il y a | 1

Réponse apportée
Scroll bar on App designer
In 2019a you can check the "Scrollable" box under Interactivity. I've tested it for uipanels and the main uifigure.

presque 5 ans il y a | 0

Réponse apportée
How to make section distance of temperature
Simply skipping the loop and changing the line inmask = inpolygon(xg(:),yg(:), bx , by );%define which pixel exist in the poly...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Change color outside region of polyshape
load data.mat % Gridded data in = inpolygon(X,Y,lon,lat) uvi_mean=uvi_mean'; uvi_mean(~in)=NaN; pcolor(X,Y,uvi_mean); shad...

environ 5 ans il y a | 2

| A accepté

Charger plus