Answered
How to sum up different values of a matrix?
doc arrayfun % and hide the looping construct (but it's still there) *ADDENDUM* Actually, "what was I thinking?" :) B...

10 years ago | 0

Answered
I a having an issue with correcting the magnitude of a FFT. The code runs but the corrected magnitude value shows as zero for all frequencies.
for i = f(1:nfft/2+1) doesn't do what you want it to...use the debugger to step thru and see what happens here and thru th...

10 years ago | 0

Answered
Basic Question: How to index into table by a text column
Presuming you used the names when creating the table, index by the desired name values-- <http://www.mathworks.com/help/matla...

10 years ago | 0

| accepted

Answered
what is an accurate function for linear regression?
Which Toolboxen do you have? There's *fit* in the Curve Fitting TB and *LinearModel.fit* in the Statistics Toolbox. *polyfit* ...

10 years ago | 1

| accepted

Answered
How do you find the mean and standard deviation for the current and power?
i_max=2; Max current isn't 2; the current distribution was given an normal(0,2).

10 years ago | 0

Answered
Make a plot using value from a certain line of matrix
# plot(Y(:,5)) # clabel(C,h,[v(1) v(end)])

10 years ago | 0

Answered
Why does signal still contain a large number of spikes after FFT
Well, if your original signal is full of a large number of frequency components, the spectrum will be, too. This looks like a f...

10 years ago | 0

| accepted

Answered
Why my var6 appear divide by 1000?
You've not showed use the display in question, but more than likely it's simply the Matlab logic to display widely disparate val...

10 years ago | 0

| accepted

Answered
copy matrix and random it's value within certain range
Bmn=2; Bmx=4; % ranges for B ix=iswithin(B,Bmn,Bmx); % rule for positions C(ix)=(ra...

10 years ago | 0

Answered
Obtaining amplitude values from an FFT
If have Signal Processing toolbox, see doc findpeaks Otherwise, peaks cannot be found easily simply by comparing values....

10 years ago | 0

Answered
loops and xlsread.
A=[[0.5:0.5:21[ 22:35]; % use colon; recommend using the "Getting Started" tutorials See the FAQ <http://matlab.wikia.com...

10 years ago | 0

| accepted

Answered
Undefined function 'IndicatorsCalculus' for input arguments of type 'double'
'IndicatorsCalculus' ~= ‘IndicatorCalculus’

10 years ago | 0

Answered
How to locating the linear segment of a curve data and calculate the slope and interception?
Well, cleaning up the dataset does help at least some...it's pretty flimsy test and probably not at all robust, but you might st...

10 years ago | 0

Answered
Directory for File Exchange
Stephen answered the basic question; I'll point out that I (and I expect most experienced users) keep a specific "Utilities" dir...

10 years ago | 1

Answered
Using a for loop to change a matrix
Given a function that returns the vector of areas given the node and coordinate arrays, then ix=triArea(nodes,coordinates)<...

10 years ago | 0

| accepted

Answered
How to let the data transfer into logarithmic formal?
data(:,3)=log(data(:,2)); % natural log data(:,3)=log10(data(:,2)); % base 10 log take your pick...

10 years ago | 0

| accepted

Answered
Add Whitespace to Plot
If I understand the issue, use the _'position'_ property and reduce the width value from its default to something less...that sh...

10 years ago | 0

| accepted

Answered
Extract x and y coordinates for points in a multivariable function
Given a z [i,j]=find(z); % indices for lookup into x,y

10 years ago | 0

| accepted

Answered
Converting Time Intervals into seconds
I don't have recent release so can't use *datetime* class, but *datenum* returns time in days and fractions thereof. Simply con...

10 years ago | 0

Answered
Problem with solving equation with 'FSOLVE'
Don't blame *fsolve*; the issue is you're providing solution points as initial guesses that aren't feasible for the system equat...

10 years ago | 1

| accepted

Answered
Renaming a file the same as a variable
As written, just movefile('Original.txt', [x '.txt']) More general and where you were probably trying to head would be so...

10 years ago | 0

| accepted

Answered
"Assignment has more non-singleton rhs dimensions than non-singleton subscripts" error
_"...colored but i turn them in gray"_ But you didn't do that in the loop where you try to build the array, only in the first...

10 years ago | 0

| accepted

Answered
How to sum different functions
Your textbook problem is specific to a given geometry; is the problem you wish to solve the same one exactly or are you looking ...

10 years ago | 0

| accepted

Answered
Use data from excel, input them into an equation in matlab that creates the points to be plotted in Matlab
_"...i have to put the xls file in the matlab folder I am working with..."_ No, not really; you simply have to provide a full...

10 years ago | 0

| accepted

Answered
Extract same columns from multiple excel files
Several things-- # *xlsread* only will handle one range expression per call # _data_ is a single variable so each pass thru ...

10 years ago | 1

Answered
Put pi in tick label for 2012
The TeX interpreter isn't enabled for 'X|Y|ZTick' labels yet in R2012, sorry. You can write them with *text* if desired. *AD...

10 years ago | 0

Answered
Adding log-linear trend to scatterplot
Fit the log(y), compute the fitted result and add... b=polyfit(data1,log(data2),1); % ln y = mx + b yhat=exp(polyval(da...

10 years ago | 0

| accepted

Answered
I am not getting correct answer of following hexadecimal addition and sustraction
Oh, I think you're getting the correct answer, you just didn't write the code for the desired problem! :) k=num2str(dec2he...

10 years ago | 0

Answered
How do I count vectors with a specified value in an array of equal length vectors in Matlab?
Presuming the phrase _'array of vectors'_ means a 2D "ordinary" array, arrange them by column and then the answer is simply ...

10 years ago | 0

| accepted

Load more