回答済み
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...

21日 前 | 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...

23日 前 | 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...

24日 前 | 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(:...

24日 前 | 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...

24日 前 | 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(...

24日 前 | 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...

24日 前 | 0

| 採用済み

回答済み
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.

25日 前 | 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...

26日 前 | 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...

26日 前 | 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 ...

26日 前 | 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...

27日 前 | 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 ...

27日 前 | 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...

27日 前 | 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...

29日 前 | 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...

29日 前 | 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...

29日 前 | 1

| 採用済み

回答済み
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...

30日 前 | 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...

30日 前 | 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...

約1ヶ月 前 | 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...

約1ヶ月 前 | 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...

約1ヶ月 前 | 0

| 採用済み

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

約1ヶ月 前 | 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...

約1ヶ月 前 | 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...

約1ヶ月 前 | 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...

約1ヶ月 前 | 0

| 採用済み

回答済み
Split and search strings
There's new set of higher-level functions that will do the first... >> str2double(extractAfter(split(DetailInfo,";"),"=")) ans...

約1ヶ月 前 | 1

回答済み
Data store only importing 2 columns
DateTimeUTC,AIMHeading,AccX,AccY,AccZ,Surge,Sway,Heave,Roll,Pitch,Inclination,Yaw,HeaveAtRadar,RadarValue,CompensatedRadarValue,...

約1ヶ月 前 | 0

| 採用済み

回答済み
Adding additional data to previous table
If it's not time-critical, it's trivial to just dynamically append -- presuming the table exists initially and the content of th...

約1ヶ月 前 | 0

| 採用済み

回答済み
Splitting time series into segments
Use findgroups to segregate the state groups and plot() over those group indices. Converting the array to a table makes things ...

約1ヶ月 前 | 0

Load more