답변 있음
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...

4년 초과 전 | 0

답변 있음
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 ...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 1

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
Bar Graph legend & x axis
Change line 3 from t = datetime; to t = linspace(datetime('yesterday'), datetime('tomorrow'), length(InspectionPlan)); For p...

4년 초과 전 | 1

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 0

답변 있음
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...

4년 초과 전 | 1

| 수락됨

답변 있음
Reverting the caxis index
To reverse the order of colors, just change colormap(myColorMap); to colormap(flipud(myColorMap));

4년 초과 전 | 0

답변 있음
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...

4년 초과 전 | 0

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
how to add 4D matrix in row
OK, then... D = cat(4, A, B, C)

4년 초과 전 | 0

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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) ...

4년 초과 전 | 1

| 수락됨

답변 있음
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...

4년 초과 전 | 0

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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); ...

4년 초과 전 | 1

답변 있음
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...

4년 초과 전 | 2

| 수락됨

답변 있음
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'...

4년 초과 전 | 2

| 수락됨

답변 있음
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 ...

4년 초과 전 | 0

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 1

| 수락됨

답변 있음
Renaming Fit rsquare value
ft1=fittype('m*x+b'); [Fit1,gof]=fit(A',T',ft1) R1 = gof.rsquare

4년 초과 전 | 0

| 수락됨

답변 있음
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...

4년 초과 전 | 0

| 수락됨

답변 있음
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

4년 초과 전 | 0

| 수락됨

더 보기