Gelöst


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

etwa 8 Jahre vor

Gelöst


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

etwa 8 Jahre vor

Gelöst


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

etwa 8 Jahre vor

Gelöst


Is my wife right?
Regardless of input, output the string 'yes'.

etwa 8 Jahre vor

Gelöst


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

etwa 8 Jahre vor

Gelöst


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

etwa 8 Jahre vor

Gelöst


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

etwa 8 Jahre vor

Gelöst


Add two numbers
Given a and b, return the sum a+b in c.

etwa 8 Jahre vor

Gelöst


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

etwa 8 Jahre vor

Beantwortet
can we run a matlab file without saving it?
Actually by default, the Matlab asks for saving the file or script with a name followed by .m extension. So, I don't think its p...

etwa 8 Jahre vor | 0

| akzeptiert

Gesendet


LPG Equilibrium Calculator
The program computes equilibrium composition, temperature and pressure of LPG combustion.

etwa 8 Jahre vor | 1 Download |

Gelöst


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

etwa 8 Jahre vor

Gesendet


FEM on axial element
FEM applied on axial element with user-defined geometry and boundary conditions*

mehr als 8 Jahre vor | 3 Downloads |

Gesendet


Lid driven cavity flow
Top lid moves horizontally with uniform velocity and the motion of flow in the cavity is studied.

mehr als 8 Jahre vor | 12 Downloads |

Beantwortet
Code performance tremendously slower than before
Sometimes, removing the orange color warning in the script file makes execution faster. Try this if you have not.

mehr als 8 Jahre vor | 0

Beantwortet
Displaying grid in Matlab animation window
I think adding this line would suffice grid on;

mehr als 8 Jahre vor | 0

Gesendet


InvPrandtlMeyer(v)
Calculates Mach Number

mehr als 8 Jahre vor | 6 Downloads |

Frage


How to plot symbolic row matrix in MATLAB?
I have a row vector whose elements are all some arbitrary functions of x. How to plot this row vector on y-axis and index of ele...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to improve performance of sparse matrix indexing in Matlab?
I have a big sparse matrix and it takes lot of time to execute the whole code.

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Plotting stream function as filled contour surface?
I have a matrix with columns denoting 'theta' and rows denoting 'radial distance'. I want to obtain a plot of stream function co...

mehr als 8 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to solve this ode?
E=200e9; syms x; A=10*(20-x); q=x; Boundary conditions u(0)= 0 and u'(x=l0)=100/(100*E)) <</matla...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to use feval in this code. I am getting this error: Argument must contain a string or function_handle.
syms t g g= feval('f',((x(2)-x(1))*t+(x(1)+x(2)))/2) % g is now a function of t a=w1*feval(g,x1)+w2*feval(g,x2)+w3*feval(g,x...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to initialize a row vector with value zero of size 1xn?
Say, I have a row vector A having n elements. I want to make all elements zero. * For e.g., in 2-d, we write A=zeros(n)

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to solve system of linear equations obtained from FEM in MATLAB?
Consider Ax=B where A is 4x4 and two values of x are known and 2 values of B are known. Then how to find other four unknowns?

fast 9 Jahre vor | 0 Antworten | 2

0

Antworten

Frage


Help with plotting contour.
r=-5:.2:5; [X,Y]=meshgrid(r,r); Z=30-2*X; pcolor(Z) This is the temperature distribution. Now I want to label each color in ...

mehr als 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How do I plot colored temperature distribution on a rectangular plate?
I have the data for temperature at every point and I want continuous colored plot corresponding to each temperature. Say, red fo...

mehr als 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to solve this ODE? Urgent help!!
<</matlabcentral/answers/uploaded_files/15845/e.png>> Please explain step wise and also I want a plot of m vs. t t varies fr...

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to solve ODE's and find m(t) using matlab? Urgent!!
Here is the given ODE for which I need a solution: <</matlabcentral/answers/uploaded_files/15837/c.png>> Please ...

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort