Respondida
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...

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 0

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

más de 6 años hace | 1

| aceptada

Respondida
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...

más de 6 años hace | 0

Respondida
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(...

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 1

| aceptada

Respondida
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.

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

Respondida
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 ...

más de 6 años hace | 1

| aceptada

Respondida
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...

más de 6 años hace | 1

| aceptada

Respondida
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 ...

más de 6 años hace | 0

| aceptada

Respondida
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...

más de 6 años hace | 1

Respondida
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...

más de 6 años hace | 1

| aceptada

Respondida
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...

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 3

| aceptada

Respondida
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...

más de 6 años hace | 0

Respondida
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...

más de 6 años hace | 1

Respondida
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...

más de 6 años hace | 0

| aceptada

Respondida
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...

más de 6 años hace | 0

| aceptada

Respondida
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...

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

Respondida
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...

más de 6 años hace | 1

| aceptada

Respondida
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...

más de 6 años hace | 0

| aceptada

Respondida
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...

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 1

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

más de 6 años hace | 0

| aceptada

Respondida
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...

más de 6 años hace | 0

| aceptada

Cargar más