Mechanical Engineer

Answered

How do i find a maximum elements in a specific row ?

A=[1,2,3;4,5,6;7,8,9]; M=max(A(2,:))

How do i find a maximum elements in a specific row ?

A=[1,2,3;4,5,6;7,8,9]; M=max(A(2,:))

20 days ago | 1

| accepted

Answered

rand command give different answer

All the random number functions, rand, randn, randi, and randperm, draw values from a shared random number generator. Every time...

rand command give different answer

All the random number functions, rand, randn, randi, and randperm, draw values from a shared random number generator. Every time...

20 days ago | 0

Answered

How we can generate generate a noise signal from gauss distribution ??

This is a example for generating a bivariate normal distribusion which is a duplicate of MATLAB Documentation. Maybe it can help...

How we can generate generate a noise signal from gauss distribution ??

This is a example for generating a bivariate normal distribusion which is a duplicate of MATLAB Documentation. Maybe it can help...

20 days ago | 0

Answered

how to fix this error matrix dimension must agree

The p1 matrix is 1x100. nerst(:) will turn a matrix nerst which is 1x100 to 100x1. A matrix with size of 1x100 can't | with ...

how to fix this error matrix dimension must agree

The p1 matrix is 1x100. nerst(:) will turn a matrix nerst which is 1x100 to 100x1. A matrix with size of 1x100 can't | with ...

1 month ago | 0

Answered

hello everyone, i am a noob using matlab. please help me i have an equation and 2 unknown variable

The equation μ=(μmax*Cs)/(Ks+Cs ) can be converted to μmax*Cs-Ks*μ=μ*Cs. μ=[0.011;0.059;0.053;0.149;0.125]; Cs=[430;428;...

hello everyone, i am a noob using matlab. please help me i have an equation and 2 unknown variable

The equation μ=(μmax*Cs)/(Ks+Cs ) can be converted to μmax*Cs-Ks*μ=μ*Cs. μ=[0.011;0.059;0.053;0.149;0.125]; Cs=[430;428;...

2 months ago | 0

Answered

How can I iterate all three cases at once in one script?

Maybe you can use a for loop. You can store functions g1(x), g2(x), g3(x) as a cell array. Such as g1=@(x) sqrt(2*x+3); g2=@(x...

How can I iterate all three cases at once in one script?

Maybe you can use a for loop. You can store functions g1(x), g2(x), g3(x) as a cell array. Such as g1=@(x) sqrt(2*x+3); g2=@(x...

2 months ago | 2

| accepted

Answered

Hello. I have to write a function called occurrence that tests whether a character exists in a string. If it is present, display true and the position (index) of the character. If it is not present, return inf. it gives me an error in line 2. help?!?

function find_letter(L, string) n= length(L); not_found = true; for k = 1:n if isequal(L(k), strin...

Hello. I have to write a function called occurrence that tests whether a character exists in a string. If it is present, display true and the position (index) of the character. If it is not present, return inf. it gives me an error in line 2. help?!?

function find_letter(L, string) n= length(L); not_found = true; for k = 1:n if isequal(L(k), strin...

2 months ago | 0

| accepted

Answered

How to integrate this function numerically?

You can use Euler formula. V(n+1)=V(n)+h*f(R,V(n)), which f(R,V) is the right side of differential equation. But you need to kn...

How to integrate this function numerically?

You can use Euler formula. V(n+1)=V(n)+h*f(R,V(n)), which f(R,V) is the right side of differential equation. But you need to kn...

3 months ago | 1

| accepted

Answered

How can I use a for loop to select values from a table that meet two conditions?

m=1; for i=1:height(tab) if(Aerobic(i)~=Anaerobic(i)) && Aerobic(i)>=0 && Anaerobic(i)>=0 secmet(m, 1:3)=tab(i, ...

How can I use a for loop to select values from a table that meet two conditions?

m=1; for i=1:height(tab) if(Aerobic(i)~=Anaerobic(i)) && Aerobic(i)>=0 && Anaerobic(i)>=0 secmet(m, 1:3)=tab(i, ...

3 months ago | 1

| accepted

Answered

How can I do this Matrix data operation?

It is Unworkable! For eaxample, every row of new matrix need that there must exist current and angle pairs which generate same ...

How can I do this Matrix data operation?

It is Unworkable! For eaxample, every row of new matrix need that there must exist current and angle pairs which generate same ...

3 months ago | 0

Answered

How to collect a fraction in a certain equation?

Hi Fahmy. I try the matlab function factor, but it get the result as following. syms a b c d e f=(a/3)+(b/3)+(c/3)+(d/3)+(e/3...

How to collect a fraction in a certain equation?

Hi Fahmy. I try the matlab function factor, but it get the result as following. syms a b c d e f=(a/3)+(b/3)+(c/3)+(d/3)+(e/3...

3 months ago | 1

| accepted

Answered

Adding a column every nth column without replacing existing one

It is every 2th column. Now I put it in Answer this question rowA=size(A,1); colA=size(A,2); B=zeros(rowA,colA*2); B(:,1:2:2...

Adding a column every nth column without replacing existing one

It is every 2th column. Now I put it in Answer this question rowA=size(A,1); colA=size(A,2); B=zeros(rowA,colA*2); B(:,1:2:2...

3 months ago | 1

Answered

regexp help when comparing strings

The function regexpi needs the second argument expression must be a regular expression! About what is regular expression, you c...

regexp help when comparing strings

The function regexpi needs the second argument expression must be a regular expression! About what is regular expression, you c...

3 months ago | 0

Answered

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.252760e-17.

It seems that A-lamda*eye(n) is nearly singular, you should check it carefully! mabey you can use another computing method.

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.252760e-17.

It seems that A-lamda*eye(n) is nearly singular, you should check it carefully! mabey you can use another computing method.

3 months ago | 0