Beantwortet
how can i find a fuction which define input and output of a system?
Use: p = polyfit(x,y,n) % n is degree of polynomial, use a value that best fit your data To check the fitting: y_fi...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
How to concatenate several matrices into one matrix?
Perhaps, you mistyped. It is C = [A; B] for different number of rows, but similar number of columns. Anyway, how your matrices a...

fast 10 Jahre vor | 3

| akzeptiert

Beantwortet
Multi level sorting and filtering
[~, ~, D] = xlsread('Multilevel_sorting.xlsx'); A = D(3:end,1:2); % your data in table 1 G = {'Group1','Group2','Gro...

fast 10 Jahre vor | 1

Beantwortet
Acceleration vs Time data into FFT
Define the number of DFT points N, and then perform the fft. N = pow2(nextpow2(length(signal))); y = fft(signal,N); ...

fast 10 Jahre vor | 1

Beantwortet
Recode strings in Cell array
indx = 0; for k = 1:size(codes,1) if strcmp(codes(k,1),'Home') && strcmp(codes(k,2),'5') indx = indx+1; ...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
Solving system of nonlinear euations
syms x y [x,y] = vpasolve(x^2 + y^3 == 1, 2*x + 3*y == 4, x,y)

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
manually draw shapes (like using a pencil to draw on figure) on opened image
Try: roipoly

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How Can I Assign variable Name?
x = 1:5; eval([datestr(date,'mmmm_dd_yyyy') '= x']); x is stored in a new variable named based on today's date. If you r...

fast 10 Jahre vor | 1

Beantwortet
Compound Poisson Distribution Model
I am not sure if I understand your question correctly. I guess once you get P, then you would like to choose its elements random...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How is this an exponential curve?
Convert your difference equation into differential equation: y(i+1) = y(i)-y(i)*h; y(i+1) - y(i) = -y(i)*h; (y(i+1) -...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
Stuck with electronic circuit simulation..
R = 1; L = 1; C = 1; % replace by your values w = 50; % replace by frequency Z = R+1j*w*L+1./(1j*w*C); % impedence of th...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
Generating row combination from a set of data
T = rand(37,25); fil = 1:37; b = combntns(fil,3); for k = 1:size(b,1) out(:,:,k) = T(b(k,:),:); end

fast 10 Jahre vor | 1

Beantwortet
Combination of the value of different vectors into one matrix ?
out = combvec(A,B,C)'

fast 10 Jahre vor | 2

Beantwortet
Generate an equation from a 3d surface
You can play a trick here. Use your code first: Eq = @(x,y) x.*y.*(y>=0 & y<3) + 2*x.*y.*(y>=3 & y<5) + 3*x.*y.*(y>=5 & y...

fast 10 Jahre vor | 0

Beantwortet
Generate an equation from a 3d surface
In Matlab, you can compact the three equations into one as written below. It is not a theoretical modeling anyway, but simply a ...

fast 10 Jahre vor | 1

Beantwortet
Summation equations in matlab
You can try with this: SOAM = sum(CP(1:n-3))/sum(abs(P(2:n)-P(1:n-1))) The 2nd sum is confusing because of the indexin...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
Regarding importing excel in matlab
xlsread import excel data with cell type. Convert them to double before plotting. In this case u can use cell2mat function: ...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
What is the problem in this code?
Your n has a length of 9, as n=0:8, so i will have length of 9 as well,and hence, you cannot write i(1:81). There are many ways ...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
binary matrix that has different orders of 0 and 1
If the ordering of rows is not a concern, then use: n = 3; A = dec2bin(0:2^n-1); B = double(A)-48 Note: 48 is the ...

fast 10 Jahre vor | 2

Beantwortet
create 3-dimension matrix
If you use your current code, then call your function create1() (from command window, or in another m-file): c = create1();...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
problem in Hanning window with FFT
Here are few things: Your plot shows the amplitude of Fourier transform, not the original signal. So, the amplitude may not be ...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How can I break line in comment for HTML publication?
%% Test section %% % After the break!

fast 10 Jahre vor | 3

Beantwortet
how can i plot using variables from a loop?
You can do this without using a for loop: er=2.2;h=0.1588; freq={11 2 3 4 5 6 7 8 9 10}; i=1:1:length(freq); ...

fast 10 Jahre vor | 1

Beantwortet
Producing an error vector with a loop
Where is your LogLike_Error_Vector? Is it LogLike_DT_Data? If so, you can try using a for loop: indx = 0; for MinLeaf = ...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
I want to plot the auto correlation function for 15 numbers without using the inbuilt function. My series is P=[ 47,64,23,71,38,64,55,41,59,48,71,35,57,40,58 ] and the plot should be autocorrelation function vs lags.
Replace acf=covark/covar0 ; by *acf(k)=covark/covar0;* Also no need to use acf after that line. After the end of for loop,...

fast 10 Jahre vor | 3

| akzeptiert

Beantwortet
How to separate signals with diffrent frequencies
Add the following lines of code at the bottom of your code (after y=x+randn(size(x)).*sigma;): ffty = fft(y); ffty = abs...

fast 10 Jahre vor | 5

| akzeptiert

Beantwortet
Why am I getting imaginary values with ode45 ??
Your I has both negative and positive values, which are in the range of 10^(-7), but Is is in 10^(-12). So, I/Is gives high nega...

fast 10 Jahre vor | 1

Beantwortet
Summation of a series without for loop
Yes you can do this! Use vectorization technique. Try to understand the line F = ... in the following code. If you get any hard ...

fast 10 Jahre vor | 3

| akzeptiert

Beantwortet
Rotation of 3d image
I am not sure what your aim is. You can try the following code: for az = -37.5:5:322.5 view(az,30) pause(0.1)...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
how can i solve this one below?!! PS: the most important to me is to know how to take the values from the user and put them into a matrix and please i want the simplest way for it
N = input('N='); for i = 1:N for j = 1:3 A(i,j) = input(['row ',num2str(i),' and column ',num2str(j),' elemen...

fast 10 Jahre vor | 1

Mehr laden