Solved


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

bijna 4 jaar ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

bijna 4 jaar ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

bijna 4 jaar ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

bijna 4 jaar ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

bijna 4 jaar ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

bijna 4 jaar ago

Solved


Find max
Find the maximum value of a given vector or matrix.

bijna 4 jaar ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

bijna 4 jaar ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

bijna 4 jaar ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

bijna 4 jaar ago

Answered
I want to plot this function f = cos(0.5*t)*5*exp(t)/(t^2+1)
You should place a period befor operations to get element-wise operators. f = cos(0.5.*t) .* 5 .* exp(t) ./ (t.^2+1);

bijna 4 jaar ago | 0

| accepted

Answered
A question about checking the significant difference between data sets
There are a lot of differences between these tests. Choosing one of them depends on your dataset and research design. All of the...

bijna 4 jaar ago | 1

| accepted

Answered
Schedule Timeout Block workaround
AFAIK You cannot implement it by SImEvent's default blocks. What you need is a customized FIFO queue and is only possible using ...

bijna 4 jaar ago | 0

Solved


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

bijna 4 jaar ago

Solved


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

bijna 4 jaar ago

Solved


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

bijna 4 jaar ago

Solved


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

bijna 4 jaar ago

Answered
Using Entities to add resources to a Resource Pool in SimEvents
This can be done via a Simulink function block. You should also set some of the properties of the resource pool. Find the attach...

bijna 4 jaar ago | 0

Answered
contourf with more colours
This works for both contour and contourf. You can either tell MATLAB how many levels you want. contour (X,Y,Z, levels); If le...

bijna 4 jaar ago | 1

Answered
Allocating Resource ID for the resources in Simevents
I was unable to run your model, but according to your post, I think you need to calculate the distance of the orders to the oper...

bijna 4 jaar ago | 1

| accepted

Answered
need solution asap for my hw about summing each character in student number that we input the data
num = input('enter your student number here : '); NumChar = num2str (num); MySum = 0; for i1 = 1:numel (NumChar) MySum =...

bijna 4 jaar ago | 0

| accepted

Answered
Generate a vector under norm condition
I don't know of any nice functions to do that in one shot, but I think you can start with a random point and use a solver to opt...

bijna 4 jaar ago | 0

Answered
FInd the function root
Finding values of inputs that minimizes or maximizes an objective function is an optimizaiton problem. I don't know about your f...

bijna 4 jaar ago | 1

Answered
how can i use for loop to solve the below problem
You have used an extra end. Delete the end in the last line. I think you must use hold on before your for loop and place the if ...

bijna 4 jaar ago | 0

| accepted

Answered
How to extract last non-zero element above current row in same column?
I think the best way is find as you mentioned. for i1 = 1:numel(X) if any ([isnan(X(i1)); X(i1)==0]) idx = find ...

bijna 4 jaar ago | 0

| accepted

Answered
How to find max and min value of a function ?
Finding the value of inputs that minimzes or maximizes the objective function value is an optimization problem. If your function...

bijna 4 jaar ago | 1

Answered
nested for loop for 2d matrix cell
I think the problem lies here CUT = RDM(i,j); if (CUT < threshold{o}) You said that RDM is a cell matrix; so CUT is also a c...

bijna 4 jaar ago | 0

Answered
In SimEvents, how can I block "plants" that are occupied so that the batch uses another plant?
The best option here is the entity output switch block. Each plant is connected to a port of this block. There are several optio...

bijna 4 jaar ago | 0

| accepted

Answered
How do you read an attribute from one part of a composite entity
Composite entities retain the hierarchical structure of the constituent entities. There are two ways: (1) Directly method. If...

bijna 4 jaar ago | 1

| accepted

Question


SimEvents: What is the correct usage of testEntry?
I really like the MATLAB Discrete-Event System (MDES) block in SimEvents library. I found it very flexible yet simple to work wi...

bijna 4 jaar ago | 1 answer | 0

1

answer

Load more