Réponse apportée
Extrapolation: How do I extrapolate a curve with minimum error.
Here's what I put together. The extrapolation uses the 4-coefficient model returned by fit in your code: xx = 1:1000:40000; y...

plus de 4 ans il y a | 0

Réponse apportée
Organizing array of data skipping empty values
I don't think you need nested for-loops. Use the 1st column of the data read as an index into the M.Rexxxx structure to direct ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to assign corresponding Z value to gridded X,Y data ?
Try replacing interp2 with griddata, like this: [X,Y] = meshgrid(min(lla(:,1)):0.1:max(lla(:,1)), min(lla(:,2)):0.1:max(lla(:,2...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Use latex with bar command in categorical array
This should work: set(gca,'xtick',x,'XTickLabel',s,'TickLabelInterpreter','latex'); Above, x contains the tick values and s is...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Read specific column from dat file
No need to use textscan. Just use readmatrix: f = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/676208/trial...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Bar Graph legend & x axis
Change line 3 from t = datetime; to t = linspace(datetime('yesterday'), datetime('tomorrow'), length(InspectionPlan)); For p...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Sketch the graph using matlab
I think this is what you are looking for. NOTE: My script is based on code in Find Tangent Plane to Surface which you should re...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Align text of different entries in legend
A simple solution is to use a sans serif font, such as courier, and pad with spaces: % test data d = rand(3,5); bar(d'); l...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Reading values across an array
The position of each element in an array is the element's index. The element can be retrieved for operations, such as relationa...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
arrange columns side by side using matlab
n = 5000; % number of files to read basefilename = 'temp'; % change as necessary M = []; % preallocate if you know the numbe...

plus de 4 ans il y a | 0

Réponse apportée
Find matrix (meshgrid) indices near plotted vector (points)
If by symmetry you mean fewer points but closer to the line, then reduce the number of query points, or points in the line: xva...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Reverting the caxis index
To reverse the order of colors, just change colormap(myColorMap); to colormap(flipud(myColorMap));

plus de 4 ans il y a | 0

Réponse apportée
Sort columns in a matrix with respect to the means of each column
Here's one way to do this: M = [1 6 2; 1 2 3; 2 7 5; 2 8 4] [~, idx] = sort(mean(M)); M(:,idx) = M Output...

presque 5 ans il y a | 0

Réponse apportée
How do I specify a specific color for a specific value for velocity in seismic velocity modelling?
I think this is more or less what you are after. The code includes an example of adding text and a rectangle. You can customiz...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
readtable reading string columns as matrix when lots of empty rows.
You ask: Is there a way to set specific columns to be read as cells? Yes, you can do this: opts = detectImportOptions('filenn...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how to add 4D matrix in row
OK, then... D = cat(4, A, B, C)

presque 5 ans il y a | 0

Réponse apportée
Connecting plots of time series from a matrix data set?
I assume you're expecting a lot of clutter, since you are plotting 48 points for each of 62 days. Just use plot(SS48h) Here's...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to plot two bar plot in the same figure?
There are a few ways to do this. The best option in any situation depends on how your data are organized (or can be organized) ...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
I want to know how I can apply filter to my signal which I have plotted from a graph
Here's a simple approach to ploting the wave with some filtering added: f = 'https://www.mathworks.com/matlabcentral/answers/up...

presque 5 ans il y a | 0

Réponse apportée
Write points at x axis Ploteditor
If you want text labels with greek symbols, set the x ticks and x tick labels for the axis. Here's the general idea: x = 0:0.5...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to get a line plot without markers, on a logarithmic scale in a for loop?
As noted clearly by @dpb, you need to not use the 'o-' syntax to get the lines without markers: i = 1:10; alpha = rand(1,10); ...

presque 5 ans il y a | 1

Réponse apportée
How to find the point of interception between the two lines?
I think this is more or less what your are looking for. The crossover indices are idx1 and idx2. Just for fun, and since you m...

presque 5 ans il y a | 2

| A accepté

Réponse apportée
How to Write a matlab code to plot the amplitude modulated signal in time domain.
Here's one way to do this. I'm showing two graphs, one with 5 Hz amplitude modulation, one with 5 kHz amplitude modulation. I'...

presque 5 ans il y a | 2

| A accepté

Réponse apportée
Converting String Column Data to Number
No need to use textscan. Just read the data into a MATLAB table. The 2nd column (TIME) will be treated as durations. You can ...

presque 5 ans il y a | 0

Réponse apportée
Axis ticks alternating between appearing on either side of the plot.
I think this achieves what you are after (although I concur with @DGM that it may not fully resolve the issue you note): % test...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
I keep receiving "Error using / Arguments must be numeric, char, or logical." when I try to find value of sym function
If a function calls another function that takes input variables, you need to define the function to pass the variables through t...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Renaming Fit rsquare value
ft1=fittype('m*x+b'); [Fit1,gof]=fit(A',T',ft1) R1 = gof.rsquare

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Re-sizing matrixes extracted from NetCFD files
I think you can leverage the image stretching function imresize to your application. The destination matrix can be any size and...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
in each iteration I want to get the sum of all elements except of the i element
for i = 1:length(a) s = sum(a)-a(i) end

presque 5 ans il y a | 0

| A accepté

Charger plus