Community Profile

photo

Abdolkarim Mohammadi-Balani


Last seen: Today

168 total contributions since 2019

Contact

Abdolkarim Mohammadi-Balani's Badges

  • Knowledgeable Level 3
  • Introduction to MATLAB Master
  • 3 Month Streak
  • Community Group Solver
  • Revival Level 2
  • Explorer
  • Solver
  • First Review
  • Thankful Level 2
  • First Answer

View details...

Contributions in
View by

Answered
Why SimEvents spends so much time
You should run 1000 simulations using sim() in conjunction with SimulationInput objects. With SimulationInput you can define the...

ungefär 18 timmar ago | 0

Answered
link a custom creation function
1) "If you have a partial initial population, meaning fewer than PopulationSize rows, then the genetic algorithm calls CreationF...

4 dagar ago | 0

| accepted

Answered
What information is conveyed by the different colors in Matlab's contourf( ) data plots?
You can turn on the ShowText property of the contour, or add the color bar: x = linspace (-5, 5, 51); y = linspace (-5, 5, 51...

4 dagar ago | 0

| accepted

Answered
MATLAB function block error in Simulink
Unlike m-file functions, MATLAB function block does not apply automatic array expansion. The simplest way to overcome is to defi...

5 dagar ago | 0

| accepted

Answered
Run a Simulink modell stepwise inside Matlab
You can use MATLAB function block. It is executed on every timestep just like other blocks, and you can return outputs for every...

5 dagar ago | 0

Answered
Create 9x9 matrix with RANDI between [0,2] with each 0,1, and 2 repeating three times each per column.
You can first create a vector with the values you need: Reference = repelem (0:2,3)'; Then you initialize the 9x9 matrix with...

5 dagar ago | 1

| accepted

Answered
How can I display the last value obtained in a scope block graph in Simulink?
The Display block shows the numeric output. https://www.mathworks.com/help/simulink/slref/display.html

5 dagar ago | 0

Answered
Can I use my own timetraces in M/M/1 queue implementation by Simevents?
I think you need a simple M/M/c queue. The example you are trying has components for other purposes, which might have confused y...

6 dagar ago | 0

| accepted

Answered
What am I doing wrong?
For drawing multiple line plots at once, you should have one column vector for each line. You just need to have x as a column ve...

6 dagar ago | 2

Answered
How to use the Parallel Computing Toolbox of MATLAB to optimize the parameters of a Simulink model with genetic algorithm?
You should set ga() to pass all of the generation members at once using UseVectorized option. Then you set the objective functio...

11 dagar ago | 0

Answered
How to solve this problem? Error using == Quadratic constraints not supported
QP = Quadradic Programming = Quadradic objective function and linear constraints. QCQP = Quadratically Constrained Quadratic P...

11 dagar ago | 1

Answered
Small Value bars are missing in bar graph.
You can add a constant to the bars with small values. For example: X (X<4) = X (X<4) + 0.2;

12 dagar ago | 0

Question


parsim() with fast restart returns different results
I am running multiple simulations using parsim() with fast restart to accelerate execution. However, I have noticed that using p...

14 dagar ago | 1 answer | 0

1

answer

Answered
How do you use the NaN function?
You first create the NaN vector using nan(), then fill in the elements. V = nan (500,1); V (124:end) = Data;

14 dagar ago | 0

Answered
How to plot one point in one axis
You should turn off the visibility of the vertical axis. For example: scatter (1,1); ax = gca; ax.YAxis.Visible = 'off'; xl...

15 dagar ago | 0

| accepted

Question


How to assign array values to object.object.property at once using deal?
I know that it is possible to assign the values of an array to object.property using deal(). Is it possible to do such thing for...

16 dagar ago | 1 answer | 0

1

answer

Answered
How to import excel file only one sheet and skip first column?
You should use readmatrix(). For example: M = readmatrix (filename, 'Sheet', 'MySheet', 'Range','B2:Z10'); Readmatrix documen...

21 dagar ago | 0

Answered
How to make a burst entity generation based on a event
You should use MATLAB Discrete-Event System block instead of an event-based Entity Generator.

21 dagar ago | 0

Answered
Do Simevents Entity Servers release entities in a FIFO manner?
Generally, the server starts to serve an entity as soon as the entity enters the block. The server tries to forward the entity a...

21 dagar ago | 0

| accepted

Answered
scaling and change the ylim for subplot
You should set ylim() for each axes separately. For example: x = linspace (0, 6, 51)'; y1 = sin (x); y2 = cos (x); yyaxis...

21 dagar ago | 0

| accepted

Answered
export variable in word
You can export matrixes to word using Report generator. The general workflow is that you first create a report template that det...

23 dagar ago | 0

Answered
Adding up the block statistics for two adjacent blocks in Simevents
If I have understood you correctly, you want to calculate the system's WIP (Work In Progress). You can use the Add block to sum ...

24 dagar ago | 0

Answered
Store generated Entity type in Workspace
You need a Simulink function, whose output port is connected to a "To workspace" block. Let's call this function RecordGeneratio...

24 dagar ago | 0

Answered
In a matrix column/array, how can I turn all numbers higher than a certain value into nans?
The best way is to use logical indexing. X(X>1) = NaN; Read this page, especially Indexing with Logical Values: https://www...

26 dagar ago | 0

| accepted

Answered
Using a "global" variable in Simevents
1) You can create it with set and get functions. They are nothing but two Simulink functions, where the output of the Set is con...

26 dagar ago | 0

| accepted

Answered
Get the mean and standard deviation of the lower half of the first mode of a bimodal distribution
You can first determine the elements that are in the lower half LowerHalfMask = Data <= mean(Data); Then calculate the statis...

26 dagar ago | 0

Answered
Quadprog solver not following constraints
Your bounds are the same for all of the variables, so they can be defined easier: lb = -5e4 * ones(1,2*iC); ub = 5e4 * ones(...

26 dagar ago | 0

Answered
filling a 1D plot with colours associated to each sample value
You can use patch() and use your response values for both edges and the color data. You replace your data with SampleX and Sampl...

27 dagar ago | 3

Answered
Why do i get "Index exceeds the number of array elements (2)". and how can i fix it? Please
You should first initialize the variable y. I also changed the definition order of the elements of y. I didn't understand why yo...

27 dagar ago | 0

| accepted

Answered
Plot line with 2y against single x value
You can use the following command to reverse the order of the elements in the variable c: c = flip (c);

27 dagar ago | 0

Load more