Answered
matrix manipulation, maybe repmat?
a = 1 4 7 10 2 5 8 11 >> b = a([1,1,2,2],:) b = 1 4 ...

15 years ago | 3

Answered
Gauss Hermite Quadrature nodes and weights
try this from the FEX, http://www.mathworks.com/matlabcentral/fileexchange/4540-legendre-gauss-quadrature-weights-and-nodes ...

15 years ago | 0

Answered
condition
your last condition is dead code, your conditions are either less than 4 or greater than 4, so the last 'else' statement is not ...

15 years ago | 0

Answered
optimal selection of rows and columns
I am sure I don't understand your question, but how about: [r,c] = find(X==1); %...?

15 years ago | 0

Answered
Plotting signals captured at different sample rates on same plot
x1 = linspace(0,3,2048); x2 = linspace(0,3,120); y1=cos(2*x1); y2 = sin(2*x2); plot(x1,y1,'b.',x2,y2,'g.')

15 years ago | 3

Answered
Changing size in imshow
imshow('pout.tif','InitialMagnification',200)

15 years ago | 3

Answered
Branching if statements
Just scroll down to http://www.mathworks.com/matlabcentral/answers/11243-branching-if-statements-when-determining-the-days-of-th...

15 years ago | 0

Answered
producing an equation to fit on a plotted data
create a design matrix of your x & y values like this: d = [ones(length(data),1),data(:,1),data(:,2),... data(:,1).^2,data...

15 years ago | 1

Answered
MuPAD
type ver in the command line and look for symbolic math toolbox. If it's not in the list, then you would have to purchas...

15 years ago | 1

| accepted

Answered
Inverse of a Column Matrix
you can try pinv(F) %pseudo inverse of non square matrix don't know if that's what you want

15 years ago | 0

| accepted

Answered
equation using three variables
I'd start with these: lsqcurvefit() lsqnonlin()

15 years ago | 0

Answered
How can I apply variable transparency to a plot using scatter3?
I am not sure I understand the question, perhaps slice() would be useful?

15 years ago | 0

Answered
Solving Nonlinear Equations Repeatedly
define your code as a function function [x,y] =myNewton(A,B,C,D) % your code here end Then save it as myNewton.m Then ...

15 years ago | 2

Answered
for loops and the if statement
n=0 Is an assignment; it assigns the value 0 to the variable n n==0 is a logical test; it tests whether the varia...

15 years ago | 1

| accepted

Answered
Counting the number of digits
One way: numel(num2str(A))

15 years ago | 11

| accepted

Answered
Independence Day weekend puzzler
kind of a hybrid: sprintf('%d',sum(x.*10.^(numel(x)-1:-1:0))+1)-'0'

15 years ago | 2

Answered
finding coordinate of closed region in plot
Maybe this will help: clc;close;clear contour(peaks) hold on [c,h] = contour(peaks,[5,5]); c(:,1)=[]; % extract coordin...

15 years ago | 0

Answered
How do I convert focal length from mm to pixels?
Does the Exif data contain the CCD width information? If so, use: focal length in pixels = (image width in pixels) * (focal leng...

15 years ago | 0

Answered
Least Squares Fitting Method with a Circle
Maybe this will help, it is adapted from "measuring the radius of a roll of tape" demo in the image processing toolbox: r =...

15 years ago | 2

| accepted

Answered
how to read data into matlab
Try this 'trick' c = cell2mat(b); d = c - '0'

15 years ago | 0

| accepted

Answered
Plotting of FRF curves
Frequency resolution is sampling frequency divided by FFT points. So for a one sided spectrum, it is (directly from the documen...

15 years ago | 0

Answered
Plotting of FRF curves
see my answer here http://www.mathworks.com/matlabcentral/answers/10306-frf-plotting

15 years ago | 0

Answered
FRF Plotting
Your x-axis scaling is incorrect. When you do semilogy(aH) it plots the amplitude versus the matrix index. You need to...

15 years ago | 0

Answered
fitting data with power function
Plotting your data it does not seem to fit a power function and seems linear. You can use the backslash operator to do least sq...

15 years ago | 0

Answered
Help with Bootstrap function
you need to have 2 assignments to get the resampled data >> r = 1 + 2.*randn(25,1); >> [x,bootsamp]=bootstrp(25,[],r); >>...

15 years ago | 2

| accepted

Answered
custom fitting to logarithmic fxn
clc;clear;close data = 2.*(1-exp(-.3.*(1:10))); data = data + .5.*rand(1,10); myfun = @(a,x)a(1).*(1-exp(a(2).*x)...

15 years ago | 1

| accepted

Answered
How should I scratch this ticket?
here goes find(magic(5)<7)

15 years ago | 3

Answered
derive an equation from data in a table
use the backslash (mldivide) to solve system of equations doc mldivide

15 years ago | 0

Answered
Attempting to rearrange a 3x3 "magic" matrix
try doc circshift

15 years ago | 0

| accepted

Answered
Lillietest (H=0 and P=0) : How to interpret this result?
Are you sure you are not assigning p to another variable? according to the documentation it should return a value between [.001 ...

15 years ago | 0

Load more