Answered
Is there a way to improve max & min functions in matlab?
Well, the first question would be can you vectorize the loop and then do the min/max operation over the array result instead of ...

9 years ago | 1

Answered
How to merge text files into one file ?
d=dir('Yourfile*.txt'); % directory of suitable wildcard to find the desired files fidOut=fopen('YourOutputFile.txt','w');...

9 years ago | 2

Answered
See maximum value (in pixels) of a figure
[row,col]=size(yourimagearray)

9 years ago | 1

Answered
hello i have problem displaying the lowest value from comparation process.
Because you never found the minimum...if you want the global minimum in the end, then for fileidx = 1:numel(templatefiles) ...

9 years ago | 0

| accepted

Answered
??? Attempted to access y(2); index out of bounds because numel(y)=1. Error in ==> TrapecioF at 7 s1=s1+2*y(i);y=y(i);
y=input('Digitar los valor de y= '); ... for i=2:n-1 s1=s1+2*y(i); y=y(i); ... This code means your us...

9 years ago | 0

| accepted

Answered
How to obtain Equation from plotted curve?
Another poster had same (or close enough) question just the other day... <https://www.mathworks.com/matlabcentral/answers/344633...

9 years ago | 0

Answered
Is there a way to know how many hours or days we have spent coding on Matlab ?
I'm sure there are some system monitors that could do that...they'd have to be running as system service or such. You could a...

9 years ago | 1

Answered
I am facing the dimension error during generating the second order transfer function can any one help me please. i have attached the error pic and code as well.
|*ord2*| generates the _num,den_ for a system given the natural frequency wn (ωn) and damping factor z (ζ). It is not a vectori...

9 years ago | 0

Answered
Calculate mean of columns for a unique value of column variable?
>> [~,~,ib]=unique(A(1,:)); >> C=A(2,:); >> accumarray(ib,C,[],@mean) ans = 3.1667 3.0000 >> Unfortunatel...

9 years ago | 0

Answered
How to get the mean of a vector ?
M=mean(cbr.contrast); Field names are case sensitive in Matlab; it's _.Contrast_' *NB:* capitalization in the table of ...

9 years ago | 0

| accepted

Answered
Filtering out indices of vector A based on restrictions applied to vector B
ix=B<thresh; % logical addressing vector of the condition C=A(ix); % use it to access A you can,...

9 years ago | 0

Answered
Copy content of each rows into a new column
Not sure why, but >> ary{4}=ary(1:3).' ary = 'Hello' 'Hi' 'Good_Morning' {3x1 cell} >> ary{4} ans = ...

9 years ago | 0

Answered
why at the end of the program gg isnt equal to 0??
See the <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F <FAQ>> For your partic...

9 years ago | 0

| accepted

Answered
How to extract specific columns and rows from a large CSV file?
And, just for documentation, the above (essentially) written in Matlab using the previously-mentioned looping construct...it use...

9 years ago | 0

Answered
how to plot graph
u=[-200:200].'; % presume all elements are present histogram(A(:),[u-0.5;u(end)+0.5]) % histogra...

9 years ago | 0

| accepted

Answered
How to get data in excel from a plot of multiple plots ?
xlswrite('YourExcelFile.xls',[hft1(:) hft2(:) hft3(:) hft4(:) hft5(:)]) This begs the question of how you got the sequentia...

9 years ago | 0

Answered
How to Compare a vector with for loop iterations in a nested if statement in a for loop
... for i= 3:length(DeltaO2Concentration) if ismember(i,USER_INPUT_VECTOR) % USER_INPUT_VECTOR is your list variable,...

9 years ago | 0

| accepted

Answered
How to extract specific columns and rows from a large CSV file?
Alternative solution albeit not totally Matlab, it worked pretty well here it seems-- Rather than trying to parse the humongo...

9 years ago | 0

Answered
Plotting two x axis in one plot, but both at the bottom.
See answer I gave <https://www.mathworks.com/matlabcentral/answers/343864-how-can-i-plot-a-bar-chart-with-4-different-y-axis-and...

9 years ago | 1

Answered
Plotting a square wave
If you have Signal Processing TB, then use |*square*| function. Without, you'll have to compute the transition spacings ( |*lin...

9 years ago | 0

Answered
How to change number of ticks, tick position, and value on plot?
Set the tick values and the limits, not tick labels. Tick labels just write the label values on the tick marks that have been o...

9 years ago | 1

Answered
Mean over arrays with different length
In case Guillaume isn't back for a while, his response was going to be M3=mean([resample(M2(:,2),length(M1),length(M2)) M1(...

9 years ago | 0

Answered
how to convert power-law plot to loglog plot
ezplot('2000 * x^(-.5)') set(gca,'yscale','log','xscale','log') xlim([0.1 10]) or, of course, use |*loglog*| fnE...

9 years ago | 0

| accepted

Answered
Changing the polynomial coefficients
Syntax problem--analgously to |structure| dynamic field names, the string after the dot is interpreted as literal character stri...

9 years ago | 0

| accepted

Answered
Axis interval of scatter plot
Except ticks are property of the axes and |*gscatter*| as other plotting routines returns handle(s) to the object(s) it creates,...

9 years ago | 0

| accepted

Answered
Finding frequency of repetition of a data point in a pattern
(Final_Load(1,j)>=Linear_fit1(i,2)>=Final_Load(1,j+1)) | ... There's not a compound comparison construct such as this in Mat...

9 years ago | 0

| accepted

Answered
how to add axes x and y in the middle of figure 2D then i rotate x with an angle theta?
Well, may not be what looking for but it was hot out and I didn't feel like battling 100F for a while here... axes camro...

9 years ago | 0

Answered
How to find X value
fnSigma = (x) (M*b)/(pi*a*b^3/4)-pi*(a-x)*(b-x)^3)/4; % anonymous function builds in a,b,M x=fsolve(@(x) fnSigma-sigma,x0)...

9 years ago | 0

| accepted

Answered
How to extract specific columns and rows from a large CSV file?
Use |*textscan*| with the appropriate formatting string to read and skip the necessary columns. There are examples in the docum...

9 years ago | 0

| accepted

Load more