Answered
Import single raws from excel using the find function.
You should use the first return values from xlsread to read numberical data, such as year = xlsread('ESCvinnere-2','A1:E64'...

11 years ago | 0

Answered
Is it possibe to find the equation from two data vector like x=0 10 20 30 40 50 60 y=78.54 76.19 73.65 70.86 67.72 64.20 60.19
You can use polyfit to fit a polynominal to your data. A polynominal of order 2 gives a nice fit p = polyfit(x, y, 2); p...

11 years ago | 0

Answered
How to read text files from different sub folders in a folder ?
Use getAllFiles from <http://stackoverflow.com/questions/2652630/how-to-get-all-files-under-a-specific-directory-in-matlab/26449...

11 years ago | 0

Answered
convert hexadecimal to string
hexnum = '63727970746F'; num = hex2dec(hexnum)

11 years ago | 0

Answered
XTick labels and Stacking in bar plot
1. bar(1, PErr(1),'FaceColor', 'r') hold on bar(2, PErr(2),'FaceColor', 'b') set(gca, 'XTick', [1 2]) set(gca,...

11 years ago | 5

| accepted

Answered
How do I access array elements in for loop?
K = [2 5]; for i = 1:2; B(i) = 2*K(i); end D = B(1) E = B(2) F = 3*D^2 + 4*E^2 G = 3*D*E + 4*D*E This could...

11 years ago | 0

| accepted

Answered
What exactly algorithm does MATLAB use in the function imadjust?
You can have a look at the source code of imadjust to see what Matlab is doing. type imadjust or edit imadjust (...

11 years ago | 0

Answered
converting binary to hexadecimal
You have a script and try to define a function in line 19. This is not allowed. You have to either define b2h in a different fil...

11 years ago | 0

| accepted

Answered
How to add a legend for bar and line plot on one figure?
x = rand(10, 4); h(:, 1) = bar(x) h(:, 2) = plot(x) legend(h(:), {'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H'})

11 years ago | 0

Answered
Error: In an assignment A(I) = B, the number of elements in B and I must be the same.
I think it shouldn't be diff(i) but Diff(i) There are some further issues with your code; You define BatteriLaddni...

11 years ago | 0

| accepted

Answered
How can I convert a vector to 2D matrix correctly?
That's correct. Note that reshape works along order of dimensions, so in this case the first 177 values of A would go to the fir...

11 years ago | 1

Answered
Is it possible to extract bars from the hist or histogram function?
The values you are looking for are returned by the histogram function: h = hist(x); plot(h)

11 years ago | 1

Answered
write an equation from algorithm
It interpret your question such that you do not ask for the equation, but for the Matlab implementation. It's pretty straigh...

11 years ago | 0

Answered
What is this power function doing?
I guess it computes 10.^(PD/10).

11 years ago | 0

Answered
How to create many variables from a dataset?
You can reshape your data data = reshape(data, 26, 14198, 2); You can even let Matlab figure out the elements along the...

11 years ago | 0

Answered
How can I implement these equations in Matlab programming?
If you have your height values in a 2D matrix Z, use sa = mean2(abs(Z)); sq = sqrt(mean2(Z.^2)) sz = max(Z(:)) - min(Z(:...

11 years ago | 1

Answered
Plot different values with different axes
help plotyy

11 years ago | 0

Answered
Format Issues - will not accept a character or a double
It would be helpful to know 1) what you want to achieve in your code and 2) how are the variables defined, like x_src_c, X_rot, ...

11 years ago | 0

Answered
What's the effect to start up Matlab with -nojvm?
You cannot use anything related to Java.

11 years ago | 0

| accepted

Answered
Extrapolating a loop to a threshold
y = 2; threshold = 10; % sample threshold while y < threshold y = y^2 % sample calculation, put your function here...

11 years ago | 0

| accepted

Answered
Splitting a vector into 'on' periods
I found a solution here: <http://stackoverflow.com/questions/27076618/how-to-split-vector-by-zeros-in-matlab> w = [false v~...

11 years ago | 0

Answered
Extracting data from a matrix
a = [1;88;37;6;75;3;7;43;30;45;954;24;87;63;24;12;0] a1 = a(1:4:end) a2 = a(2:4:end)

11 years ago | 1

| accepted

Answered
Plot window appears at the end of the script. Why?
After the plot, use drawnow

11 years ago | 2

Answered
How to create and name several excel files in a loop?
Just create a new filename in each loop and write to this file: filename = sprintf('data%03d.xls', i);

11 years ago | 0

| accepted

Answered
problem with regexp when multiple file in a folder
Returns the indices of cells in source_files.xlsx.name that contain the string 'Test Record' idx = find(not(cellfun(@isempt...

11 years ago | 0

Answered
How to cleanly display dates on X axis
You can try to reduce the FontSize

11 years ago | 0

Answered
gname for labelling lines in a plot
legend({'a', 'b', 'c', 'd'})

11 years ago | 0

Answered
How to implement the counter (really simple)?
You can write idx = ~(all(A > 0, 2) & all(B < 100, 2))

11 years ago | 0

Answered
Filter data into different Phases using multiple conditions.
The indices three positions after C is > 1 can be found using ind = find(C > 1) + 3; Ensure that the indices are not larg...

11 years ago | 0

Answered
How to divide a matrix by certain numbers?
A./repmat(v, 1, size(A, 2))

11 years ago | 0

Load more