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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 5

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

Respondida
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'})

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

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

más de 10 años hace | 1

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 1

Respondida
Plot different values with different axes
help plotyy

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 2

Respondida
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);

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

Cargar más