Answered
Simplifying code for plot.
Simplest is probably to write the function as anonymous function then just loop over the t0 values building the array-- fy=@...

10 years ago | 0

Answered
How do I make equation output matrix?
You missed the 'dot' operator for the divide... Tau_a=eta0*x./((1+(eta0*x/Tau_c).^2).^((1-n)/2)); *NB:* I removed one le...

10 years ago | 2

| accepted

Answered
How can I generate the axes which change exponentially?
Ignoring the "why?" part, you can use *loglog* but you'll have to fudge the _y_ axis data to use *abs()* and then manually label...

10 years ago | 0

Answered
i would like to draw one bar graph to combine with different y-axis but has the same x-axis
Try hB=bar([y nan(size(y))],'b'); % bar() y data w/ dummy placeholder for z hold on ...

10 years ago | 0

Answered
How to caculate annual averge from daily data (i have just one column data for 15 years)
Simpler would be to create an indexing array of calendar years and then use *accumarray* to compute the means by the year. ...

10 years ago | 0

| accepted

Answered
moving label for secondary axis
The axis labels are centered on the axis to which they're attached. It appears you used the third (2nd from bottom) subplot to ...

10 years ago | 0

| accepted

Answered
Least Square Curve Fitting, finding the initial start values in lsqcurvefit function in Matlab
Starting points means initial "guesses" for what the values of the parameters are; for nonlinear equations sometimes figuring ou...

10 years ago | 1

| accepted

Answered
Curve fitting tool output as array
The curvefit tool doesn't save the predicted values; save the fit to the structure and then evaluate it for the input points to ...

10 years ago | 0

Answered
How to detect whether 72 hours have passed after the occurrence of a certain event? - datenum gives error for longer time series.
_"if future date datevec(3) - past date datevec(3) == 3, consider 3 days have passed till the past date."_ Except what if _fu...

10 years ago | 0

| accepted

Answered
I want write a data to excel;the data are generated from integration
xlswrite('trial_2',A,'1','A1'); Is there actually a sheet named '1'? Default Excel names are Sheet1, etc. If intending th...

10 years ago | 0

Answered
Error with latex interpreter and text function
Try text(x,y,'$\leftarrow$ thistext');

10 years ago | 2

| accepted

Answered
Finding x values for y=0
_"from the graph I know that there are like 20+ values where Vprime=0."_ NO! You don't know that at all; what the graph show...

10 years ago | 0

Answered
How to combine multiple excel worksheet into single workbook?
See the first "Related Content" link to the right of your question... Alternatively, don't create multiple sheets in the firs...

10 years ago | 0

Answered
writing an array to excel
You only provided a single cell in the range 'B2:B2' so you got what you asked for...use rnge=num2str(length(m_co2_g_sec)+1...

10 years ago | 0

| accepted

Answered
Can i adjust each thickness of each histogram bar of an image differently ? and can i plot or extract an exact value of the x axis in the histogram ?
The bar chart in Matlab is extraordinarily difficult to do anything with that's "out of the box". To your specific question...

10 years ago | 0

Answered
Clarification regarding text in figure
>> help text text Text annotation. text(X,Y,'string') adds the text in the quotes to location (X,Y)... Note ...

10 years ago | 0

| accepted

Answered
xlsread selection of the lines
Just read the sheet. *xlsread* will return the numeric data in an array of the size it is. If there's data prior to the initia...

10 years ago | 0

| accepted

Answered
Replace entries only in specific column
"_...can do in mat file only?"_ Sure, see doc matfile % for all the details Although unless the file is really big, ...

10 years ago | 0

Answered
Taking the mean of rand generated matrix.
Somewhere/sometime earlier in your session you've created an array entitled _mean_ which has aliased the builtin *mean* function...

10 years ago | 1

| accepted

Answered
For Loop iteratio record results
You've already got all the columns as individual vectors -- Full_Matrix(:,n) where _n_ is the column of interest. The p...

10 years ago | 0

Answered
Matrix operations (switching around rows/columns)?
>> B=[1 1; 0 0]; >> C=[1 1; 0 1]; >> A=[B(:) C(:)].' A = 1 0 1 0 1 0 1 1 >>

10 years ago | 0

| accepted

Answered
how can I store for loop result in different row(for each i) and column(for each j given i)?
Keep another index variable incremented for the purpose-- ... k=0; for i = 19:35; k=k+1; accum = []; ...

10 years ago | 0

Answered
How to find the coefficients for an equation having the experimental data?
Rearrange as lnP = A - B/T --> -B/T + A which has form of mx+b for x=1/T, m=-B, b=A. >> b=polyfit(1./tk,log(pkpa),1); % f...

10 years ago | 0

| accepted

Answered
How can i write a code like this?
Well, this may be a challenge depending on what you're really wanting, but as a starting point... >> y=[ -0.012 -0.024 -0.0...

10 years ago | 1

| accepted

Answered
how to plot two x axes and one y axis?
Follow the example in the "Using Multiple X- and Y-Axes" documentation... hE(1) = errorbar(x1,y1,e1,'r'); % first errorbar...

10 years ago | 0

Answered
Partially-overlapping subplots cause plots beneath to be totally invisible
It's more than that. From the *subplot* doc 'Tips' section: _"If a subplot specification causes a new axes object to overlap...

10 years ago | 3

Answered
How to make only the second plot changing in a loop?
imagesc(pher_mat) hold on % figure(1) % figure won't change unless somewhere else there's another referenced for i=...

10 years ago | 0

| accepted

Answered
how to write a very concise expression for matrix power
>> bsxfun(@power,[1:4],[1:3].') ans = 1 2 3 4 1 4 9 16 1 8 27 64 >>

10 years ago | 0

Answered
Setting x-axis values
x=linspace(0,60,length(y)); plot(x,y)

10 years ago | 0

| accepted

Answered
Need help with FFT of a .csv
There's example of PSD at doc fft % illustrates computation and how to get the frequency

10 years ago | 0

Load more