回答済み
how to plot index (rownumbers) in a larger dataset as range?
Presuming you don't try do do the logical addressing until the data array is defined so you don't have the initial error shown, ...

3年以上 前 | 0

| 採用済み

回答済み
Connecting two data points in a plot with a line, and determining this line's slope
For just between two points, may as well just use m=(y2-y1)./(x2-x1); % slope between two points Or, if specify by choosin...

3年以上 前 | 1

| 採用済み

回答済み
How do I run a MatLab script via the windows command prompt such that it does not output back to the terminal when using the -batch argment?
stderr is the second output stream and its redirection symbol syntax is "2>" To redirect both to same place use > nul 2>&1 Th...

3年以上 前 | 0

回答済み
Hide trendlines on plots, via app designer
You forgot to show us how you're creating the plot, but if you will save the line handles when plotting, then you can toggle the...

3年以上 前 | 0

| 採用済み

回答済み
loop in a 3D matrix
OK, that's kinda' what I thought but wasn't sure...to average each frequency over the 120 planes, you don't need any loops at al...

3年以上 前 | 1

| 採用済み

回答済み
Is there a simple method to exclude empty categories from charts
It's a little extra code to write, but it should be able to be made generic -- follow the lead of @Cris LaPierre in that thread;...

3年以上 前 | 0

| 採用済み

回答済み
I wrote 2 functions and I don't know why they don't work-even when I change the file name to the name of the first function I recive error
"...and I got the error: Unrecognized function or variable 'calcTailorExp'." "Even though I've define it as the same file of my...

3年以上 前 | 0

| 採用済み

回答済み
How to plot using errorbar but the error bar only in every 5 points
First, 3) above isn't so -- if you plot the same data with plot() and with errorbar() the two lines will overlap identically; th...

3年以上 前 | 1

回答済み
How to write the data to a file with a specific format?
>> fmt=[repmat('%14.6E',1,size(X,1)) '\n']; >> fprintf(fmt,X.') 0.000000E+00 1.250000E-01 1.250000E-01 0.000000E+00 2.50...

3年以上 前 | 0

回答済み
Unexpected high memory usage in MATLAB.
Absolutely no way anybody here can diagnose something without seeing the code -- it's quite possible your code has an inadverten...

3年以上 前 | 1

回答済み
Downsample and reconstruct a subsection of a vector?
If they're just vectors, I think the simplest is probably the best and likely the quickest... LO=geo.FineSamplingBox(1); HI=geo...

3年以上 前 | 0

回答済み
How to make non iterative code faster than the iterative when using line by line backslash inverse ?
"Is there any other solution ?" Yeah, go on to the next step in your overall problem. There's nothing wrong with for...end loo...

3年以上 前 | 1

回答済み
How to change comma to dott for multiple text files and save the changes in the same text files?
Your variable MyFiles is a dir() struct containing the list of files; addressing it does NOT open the file, simply refers to the...

3年以上 前 | 1

回答済み
How do I delete a repeated element in a single array cell?
In [~,b3] = find(sam_pulse(x,:) == max(sam_pulse(x,:))); %find the cell with max value you're doing the wrong thing using ma...

3年以上 前 | 1

| 採用済み

回答済み
how do I extract subsets from a vector
One way just using the form of the file... S=readlines('yourfile.txt'); % import as string array ixFrom...

3年以上 前 | 0

回答済み
Log-log plot with error band that has negative numbers
You simply can't plot negative numbers on a log axis...they don't exist (well, they do, but they're complex). It's not the fill...

3年以上 前 | 0

| 採用済み

回答済み
How can I remove rows containing Nan values in table?
ixnan=(isnan(tTable.TAVG)|isnan(tTable.Tfreezing)); % logical vector either variable nan tTable(ixnan,:)=[]; ...

3年以上 前 | 0

回答済み
How to add error bars as a region about the data?
Very crude but with some data at hand illustrates one way... X=1:numel(c); hL=plot(X,c,'kx-'); % plot orig...

3年以上 前 | 0

| 採用済み

回答済み
Error writing a cell to a text file having numerical value separated by space
OK revisitng with the previous comments -- as thought, using the MATLAB fixed-width import object makes things much simpler to d...

3年以上 前 | 1

| 採用済み

回答済み
Extracting extremum X,Y coordinates from plot
findpeaks in the Signal Processing TB can be very helpful for such -- remember a minimum is the maximum of a negated signal. Pe...

3年以上 前 | 1

| 採用済み

回答済み
Problem using retime for timetables
Your issue is the input time sampling isn't actually on precisely a one-minute interval; the recorded timestamps include fractio...

3年以上 前 | 0

| 採用済み

回答済み
How to replace the values of a vector from desired location to its end?
The log scale plot was helpful to visualize the situation...good idea, but then you're far more aware of what the data are than ...

3年以上 前 | 0

| 採用済み

回答済み
Error writing a cell to a text file having numerical value separated by space
I'd do the conversion first, then make whatever mods are desired...I'm assuming the file has been corrupted by the display artif...

3年以上 前 | 1

回答済み
How to present randomly 70 different images on 70 different trials from a set of 161 images which is stored in a particular folder ?
Your code works except you're not doing anything inside the loop with each image in turn; you're just reading in and overwriting...

3年以上 前 | 0

| 採用済み

回答済み
Have code check if file exists and if not, continue
... dL = dir(fullfile(directory,'*HLF*BX NOM.txt')); dH = dir(fullfile(directory,'*HHF*BX NOM.txt')); for i = 1:numel(inf) ...

3年以上 前 | 0

回答済み
A quick way to make sure the columns in each row are decreasing for matrix A
That'll take iterating over the columns...and could be necessary to be recursive depending upon the input data. But, for the on...

3年以上 前 | 0

| 採用済み

回答済み
add 'dd-MMM-yyyy' data to datetime array in form 'HH:mm:ss:SSS' with rollover
Let's try a little mod on @Star Strider's idea... Times = ['23:59:59:873' '23:59:59:893' '23:59:59:933' '23:59:5...

3年以上 前 | 1

回答済み
When converting datenum to datetime, days are off by 1 and years are incorrect
Per documentation, Excel uses funky time conventions; use the conversion from Excel and all will be well...I saved only about 25...

3年以上 前 | 0

| 採用済み

回答済み
Fraction in Matlab label axis without using latex interpreter?
Can't always have what we want, unfortunately. It's been a frustration "for since forever" that there's inconsistent and limite...

3年以上 前 | 0

回答済み
clear distinction between positive and negative values in plot
Try mymap=[0 0 1;1 1 0]; mesh(peaks) colormap(mymap) If the mean of your surface isn't zero, you might want to plot sign(Zpl...

3年以上 前 | 0

| 採用済み

さらに読み込む