Solved

Check Digit - 02

Given a list of ISBN's, check whether they're valid or not. Prev Prob - <https://www.mathworks.com/matlabcentral/cody/problem...

4 hours ago

Answered

how can I set axis's tick or scale like photo.. help plz,,

CD = @(Re) 24./Re+(2.6*Re/5)./(1+(Re/5).^1.52)+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/10^6)./(1+Re/10^6); ...

how can I set axis's tick or scale like photo.. help plz,,

CD = @(Re) 24./Re+(2.6*Re/5)./(1+(Re/5).^1.52)+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/10^6)./(1+Re/10^6); ...

1 day ago | 1

Answered

How can i create a code which accept the 'peaks' of a quadrilateral and then give me the area of it?(without polyarea)

I would use the polyshape function or polyarea function pgon=polyshape([0 2 1 2],[0 2 0 -2]); a=area(pgon); plot(pgon); If y...

How can i create a code which accept the 'peaks' of a quadrilateral and then give me the area of it?(without polyarea)

I would use the polyshape function or polyarea function pgon=polyshape([0 2 1 2],[0 2 0 -2]); a=area(pgon); plot(pgon); If y...

1 day ago | 0

Solved

Inscribed circle in a triangle

A circle of radius r is inscribed in a triangle. In the figure, Ac=x and Bc=y. values of x & y are given. Find the ar...

2 days ago

Solved

Spiral Out - 02

An array is given. Convert it into a spiral matrix. For example, a=1:27; out=[21 22 23 24 25 26 20 ...

2 days ago

Solved

Spiral Out - 01

Create a spiral matrix ( clock-wise direction ) of size n. Try to do that without using the built-in function.

2 days ago

Answered

"Matrix dimensions must agree" and "error using /"

% Find the temperature using Van der Waal's equation T_VW_b= (P+(((n^2)*a)./(V.^2))).*(V-n*b)/(n*R);%since V is an array, need ...

"Matrix dimensions must agree" and "error using /"

% Find the temperature using Van der Waal's equation T_VW_b= (P+(((n^2)*a)./(V.^2))).*(V-n*b)/(n*R);%since V is an array, need ...

2 days ago | 0

| accepted

Answered

Algorithm to scan the total elements in a matrix randomly

A=[1 2 3;4 5 6]; a=A<=A(randi(numel(A)));

Algorithm to scan the total elements in a matrix randomly

A=[1 2 3;4 5 6]; a=A<=A(randi(numel(A)));

2 days ago | 0

Solved

Relative ratio of "1" in binary number

Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

4 days ago

Answered

How do i split an image into 8x8 blocks using a function?

I assume you have the image processing toolbox. Look at Neighborhood and Block Processing. blockproc() col2im()

How do i split an image into 8x8 blocks using a function?

I assume you have the image processing toolbox. Look at Neighborhood and Block Processing. blockproc() col2im()

4 days ago | 0

Answered

using linear interpolation to find coefficients

Make sure your matrix agrees with the meshgrid generated or change it to match. [d,a]=meshgrid(AerodynamicData.Cm.BodyFlap.deBF...

using linear interpolation to find coefficients

Make sure your matrix agrees with the meshgrid generated or change it to match. [d,a]=meshgrid(AerodynamicData.Cm.BodyFlap.deBF...

4 days ago | 1

Answered

using MATLAB determine the unit vector normal to 𝐒=𝐱𝟐+𝐲𝟐−𝐳 at point P(1,3,0).

syms x y z s = x^2+y^2-z; n(x,y,z) = gradient(s, [x, y, z]); a = eval(n(1,3,0)/norm(n(1,3,0)));

using MATLAB determine the unit vector normal to 𝐒=𝐱𝟐+𝐲𝟐−𝐳 at point P(1,3,0).

syms x y z s = x^2+y^2-z; n(x,y,z) = gradient(s, [x, y, z]); a = eval(n(1,3,0)/norm(n(1,3,0)));

5 days ago | 0

| accepted

Answered

Why does MATLAB do this?

floating point error isequal(round(transpose(inv(A)),15),round(inv(transpose(A)),15));

Why does MATLAB do this?

floating point error isequal(round(transpose(inv(A)),15),round(inv(transpose(A)),15));

5 days ago | 1

| accepted

Answered

calling subfunctions multiple times

function problem5(n) k=0:20;%method1 gets very slow causing the function to take a few minutes for low values of n=3 for i=k ...

calling subfunctions multiple times

function problem5(n) k=0:20;%method1 gets very slow causing the function to take a few minutes for low values of n=3 for i=k ...

5 days ago | 1

| accepted

Answered

How do I correctly enter the function f(x,y)=sin((pi/2)*(x+y))?

f=@(x,y)sin(pi/2*(x+y)); [X,Y]=meshgrid(-1:.2:1);%not sure what step size you are using a=interp2(X,Y,f(X,Y),1/3,1/3);

How do I correctly enter the function f(x,y)=sin((pi/2)*(x+y))?

f=@(x,y)sin(pi/2*(x+y)); [X,Y]=meshgrid(-1:.2:1);%not sure what step size you are using a=interp2(X,Y,f(X,Y),1/3,1/3);

5 days ago | 0

Answered

Picking the right combination from the arrays

Not sure how you are getting your data. Generally, you would not want to use so many variables but rather index into a single va...

Picking the right combination from the arrays

Not sure how you are getting your data. Generally, you would not want to use so many variables but rather index into a single va...

5 days ago | 0

| accepted

Answered

How can I convert this cell array into a matrix?

reshape(cell2mat(C),60,[])';

How can I convert this cell array into a matrix?

reshape(cell2mat(C),60,[])';

5 days ago | 0

Answered

Splitting up arrays in for loops

n=[0,find(diff(M(:,3))>1),size(M,1)]; for k=1:length(n)-1 m{k}=M(n(k)+1:n(k+1),:); end

Splitting up arrays in for loops

n=[0,find(diff(M(:,3))>1),size(M,1)]; for k=1:length(n)-1 m{k}=M(n(k)+1:n(k+1),:); end

5 days ago | 0

| accepted

Submitted

Secure Off-line Email Encryption GUI

Send and receive off-line encrypted emails using public-key cryptography and Advanced Encryption Standard (AES).

7 days ago | 3 downloads |

Answered

Differentiation and integration of functions

syms x; y=(11*x+1)/sqrt(x^2+22); dy=diff(y); ddy=diff(dy); for x=1:3 Dy(x)=double(subs(dy)); DDy(x)=double(subs(dd...

Differentiation and integration of functions

syms x; y=(11*x+1)/sqrt(x^2+22); dy=diff(y); ddy=diff(dy); for x=1:3 Dy(x)=double(subs(dy)); DDy(x)=double(subs(dd...

11 days ago | 0

Answered

Interpolation between intersecting curves

f=fit(x1',y1','poly5'); g=fit(x2',y2','poly5'); x=min(x2):.01:max(x2); h=1/4.5*(g(x)-f(x))+f(x);%only good for minimum x-rang...

Interpolation between intersecting curves

f=fit(x1',y1','poly5'); g=fit(x2',y2','poly5'); x=min(x2):.01:max(x2); h=1/4.5*(g(x)-f(x))+f(x);%only good for minimum x-rang...

13 days ago | 0

Answered

how to write the expression ((pi*epsilon)/ln((D-r)/r)) in matlab?

Are all the variables arrays of equal size? If so, then you need the element-wise operator. c = (pi*epsilon)./log((D-r)./r);

how to write the expression ((pi*epsilon)/ln((D-r)/r)) in matlab?

Are all the variables arrays of equal size? If so, then you need the element-wise operator. c = (pi*epsilon)./log((D-r)./r);

14 days ago | 0

Answered

Trapezodial Method using while loop

f=@(x) sin(x); tol=1e-6; x=linspace(0,pi,2); A=sum(movsum(f(x),2,'Endpoints','discard')/2.*diff(x)); n=2; while abs(2-A)>=t...

Trapezodial Method using while loop

f=@(x) sin(x); tol=1e-6; x=linspace(0,pi,2); A=sum(movsum(f(x),2,'Endpoints','discard')/2.*diff(x)); n=2; while abs(2-A)>=t...

14 days ago | 0

Answered

how to reshape the matrix

m =[0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1]; a=reshape(m,3,[])';

how to reshape the matrix

m =[0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1]; a=reshape(m,3,[])';

15 days ago | 1

| accepted

Answered

Caesar cryptic function problem.

Assuming c is a double array function coded = caesar(c,n) coded=char(mod(c-32+n,95)+32); end

Caesar cryptic function problem.

Assuming c is a double array function coded = caesar(c,n) coded=char(mod(c-32+n,95)+32); end

15 days ago | 0

Answered

How to compare two matrices, row by matrix using the GPU

Not sure if something like this would work for you. arrayfun(@(x)ismember(a,b(x,:)),1:size(b,1),'UniformOutput',false);

How to compare two matrices, row by matrix using the GPU

Not sure if something like this would work for you. arrayfun(@(x)ismember(a,b(x,:)),1:size(b,1),'UniformOutput',false);

15 days ago | 0

| accepted

Answered

How do i finish the code. I'm not even sure if this is how one would start to run the code

x=randi([-10,10]); while x(end)~=9; x=[x,randi([-10,10])]; end display(x(x>0&mod(x,2)==0));

How do i finish the code. I'm not even sure if this is how one would start to run the code

x=randi([-10,10]); while x(end)~=9; x=[x,randi([-10,10])]; end display(x(x>0&mod(x,2)==0));

21 days ago | 0

| accepted