回答済み
Combine three columns with comma for a lot CSV files
fileDir = 'D:\Examps'; d=dir(fullfile(fileDir,'*.csv'); for i = 1:numel(d) data=readmatrix(fullfile(fileDir,d(i).name),'Num...

6年弱 前 | 0

| 採用済み

回答済み
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
Who's idea to introduce the black background for code? I can read almost nothing now easily with the small contrast between the...

6年弱 前 | 0

回答済み
Error with Uniquetol: " Repetitive numbers not being removed"
Yeah, fix the magnitude of the tolerance interval you want distinguished--by default uniquetol(A) uses 1e-6 for single-precision...

6年弱 前 | 0

回答済み
Find indices of elements for given difference
find and/or ismember will only return EXACT matches -- will NOT return something "on or about" a 10 ms interval. Two possibilit...

6年弱 前 | 0

回答済み
How to save multiple matrix in a .dat file
DON'T EVEN THINK OF IT!!! From the documentation... Use one of the text formats to save MATLAB numeric values to text files. I...

6年弱 前 | 0

回答済み
can meaning of ~= be "equal to" ?
Since MATLAB array counting is 1-based, have to move up by one from the 0-based counting. The solution produces the expected re...

6年弱 前 | 0

回答済み
Locating characters in a string array
OK, got the electrical problem in stable state for time being with power back the main well so cattle are drinking...shop not on...

6年弱 前 | 0

回答済み
How to vectorize this for loop
Bundle(:,6)=sum(Bundle(:,1:4).*cost_bundle,2); % cost per account Bundle(:,7)= seguranca*tax*(sum(Bundle(:...

6年弱 前 | 1

| 採用済み

回答済み
How to vectorize this for loop
i = 1:length(Bundle); Bundle(i+n,6) = ( Presuming Bundle is taller (more rows) than wide (columns), the above unless n=0 wil...

6年弱 前 | 0

回答済み
How to change Y-axis in histfit plot from counts to percents?
hHF=histfit(myVec); Vtot=sum(myVec); arrayfun(@(h) set(h,'YData',h.YData/Vtot),hHF) ... or, w/o the temporary, hHF=histfit(...

6年弱 前 | 0

回答済み
How to adjust the position of a title in a subplot
It's the axis equal that does it -- take out the axis off afterwards and you'll see the position of the title isn't all that fun...

6年弱 前 | 1

| 採用済み

回答済み
Median(here it's middle ) of vector/array of every two adjacent values in array (value(i+1)-value(i)).
Not so sure why this would be puzzling... tm=diff(t)/2; You have one few differences than elements of t, of course.

6年弱 前 | 0

回答済み
How to transform time series into frequency dimain and obtain amplitude and phase
There's really nothing wrong with the code; you have followed the example from the documentation for FFT and the following lines...

6年弱 前 | 0

| 採用済み

回答済み
Count words from wordlist in a text
Start @ <Analyze-text-data-with-string-arrays> You may also find ismember of interest for the last...

6年弱 前 | 0

| 採用済み

回答済み
Breaking data from a large text file into groups
Well, the following is pretty easy as far as counting goes...how it works on real file as far as speed and whether need to read ...

6年弱 前 | 1

| 採用済み

回答済み
Error Explanation Error: File: C.m Line: 169 Column: 5 This statement is not inside any function. (It follows the END that terminates the definition of the function "readeph".)
I edited the function for you ...starting with fixing the indention to be consistent by block...which shows when you get back to...

6年弱 前 | 1

| 採用済み

回答済み
How to define the data type of each column in a struct?
MATLAB is amorphous on type -- everything is stored as the type of the RHS on assignment unless directly addressing the element ...

6年弱 前 | 0

| 採用済み

回答済み
Put the name in the "x axis" of the graph bar every five days or seven days
Well, if you say so... :) tEnersol=readtable('enerosolar.xlsx','Sheet','EneDic'); % read into a table object tEnersol.Propert...

6年弱 前 | 1

回答済み
Put the name in the "x axis" of the graph bar every five days or seven days
Don't put the ticks every day; that's the cause for there being that many--you did it to yourself! :) The bar() command will p...

6年弱 前 | 1

| 採用済み

回答済み
Is there maximum number of characters of the figure title latex interpreter string?
First, you must pass a char() string, not cellstr. You've got too many $ signs for pieces, but a start at what outlined above us...

6年弱 前 | 0

回答済み
Access data within timerange
The timerange object is another of those opaque thingies TMW has fallen in love with that has useful stuff inside it that is hid...

6年弱 前 | 3

| 採用済み

回答済み
Replacing a column values of a table?
Replace [[time2]=modeldata.Time; time = datetime(time2,'InputFormat','MM/dd/yyyy HH:mm:ss:SSS',... 'Format','dd/MM/yyyy HH:mm...

6年弱 前 | 0

回答済み
randn() function command help
nddata = fix(8*randn(10,5,3)) "... I am not sure what 8 is doing here, it is not multiplying the outcome of the random number...

6年弱 前 | 1

回答済み
Error "Index in position 1 exceeds array bounds (must not exceed 1)" for a matrix that has a size of 2000x11
A=(-G(i,j)*(epsilonzz(i-1,j)-epsilonxx(i-1,j)))+tempvalue; You just redefined the whole array A to the RHS consisting of a sing...

6年弱 前 | 0

| 採用済み

回答済み
Error bars drawn asymmetrically in errorbar()
Yeah, the y-axis scale is logarithmic so the positive and negative differences are scaled differently depending where on the lo...

6年弱 前 | 0

| 採用済み

回答済み
iteration with for for a simple computation
One way amongst many... z=acos(m); % precompute the constant array T=c(1)+sum(cell2mat(arrayfun(@(c,i) c*cos(i*z),c(2:end...

6年弱 前 | 0

| 採用済み

回答済み
How to remove common row elements from matrix
[~,ia]=unique(A(:,10:12),'rows'); O=A(ia,:);

6年弱 前 | 0

| 採用済み

回答済み
Linear fit line for multiple Y-axis
You'll get same coefficients if you fit b=polyfit(t,mean(y,2)); % assume columns are variables, rows, observations as will b...

6年弱 前 | 1

| 採用済み

回答済み
How do I use a for loop to index a categorical vector?
If the two indeed correlate, the result should be as expected -- ergo, can only presume they don't correlate as you think...exam...

6年弱 前 | 0

| 採用済み

回答済み
draw a line with known slope and one set of coordinates
m=tan(theta); % tan()=y/x --> slope b=y1-m*x1; % intercept to pass thru x1,y1 at given s...

6年弱 前 | 0

| 採用済み

さらに読み込む