# Fawad Farooq Ashraf

**Programming Languages:**

MATLAB

**Statistics**

RANK**7 263**

of 271 728

REPUTATION**5**

CONTRIBUTIONS

**14** Questions

**4** Answers

ANSWER ACCEPTANCE **
64.29%
**

VOTES RECEIVED**1**

RANK

of 18 321

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Question

Vectorize Matrix Formation & Multiplication

How can I vectorize the following code clear;clc t = 1:10; v = rand(10,3); a = rand(10,1); m = 6:15; n = 6:15; M = ...

22 dagar ago | 1 answer | 0

### 1

answerQuestion

Hold a value indefinitely once a condition becomes true

I have a simulink block diagram which gives true or false based on a condition (relational operator). My problem is that once I ...

ungefär 2 månader ago | 2 answers | 0

### 2

answersQuestion

Counting Consecutive Threshold Crossings in a Signal (Counting Oscillations)

I have an oscillating signal in a SIMULINK model and I want to count the number of times it crosses a certain threshold level (p...

2 månader ago | 1 answer | 0

### 1

answerSolved

Assign matrix rows/columns to separate variables

This is a slight variant of <http://www.mathworks.com/matlabcentral/cody/problems/2668-assign-matrix-elements-to-separate-variab...

4 månader ago

Plot a structure array without a loop

I think I've found the answer to this myself. figure(1);hold on;grid on;box on; p = arrayfun(@(a) plot(a.x,a.y,'.-'),DATA); ...

4 månader ago | 0

| accepted

Question

Plot a structure array without a loop

I ran a Monte-Carlo with 300 simulation runs and I stored the output data for each run in a structure as DATA(i).x = outputX; ...

4 månader ago | 1 answer | 0

### 1

answerQuestion

Length/Index based if else statements

I have a vector of variable length, for example b = [0.25;0.5;0.75;1;1.5;1.75;2.0]; and based on the length of this vector, I ...

7 månader ago | 1 answer | 0

### 1

answerQuestion

Bar Plot Legend and Axes

I have some data which I plotted as, What I want to do would look something similar to, I opened another figure and copied...

9 månader ago | 1 answer | 0

### 1

answerDatasetRef; parsim: 'Unable to read file ... No such file or directory'

try to use simOut = parsim(simIN,'TransferBaseWorkspaceVariables','On');

10 månader ago | 0

| accepted

Question

Disabling Data Logging in Simulink

I have a simulation on simulink with many to-file and to-workspace blocks in it. However, now I want to run a monte-carlo analys...

10 månader ago | 1 answer | 0

### 1

answerQuestion

Scaling down values to plot on the same figure

I have a dataset with x and y values (basically a trajectory plot). I've plotted them as shown in the attached figure. I'...

10 månader ago | 0 answers | 0

### 0

answersQuestion

Using parsim with SIMULINK model containing c-mex s-functions

I have a simulation with multiple S-functions (level 2 written in c++). I want to run a Monte-Carlo analysis for my problem and ...

10 månader ago | 1 answer | 0

### 1

answerSolved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

mer än ett år ago

How to Fill matrix rows with another row?

Well you could find the indices of all the nonzero rows for a matrix A as idx = find(~all(A==0,2)); and then you can replicate...

mer än ett år ago | 0

Search for optimal values of variables

I figured this out. And I'd share how i did it, in case anyone else encounters the same problem. I used fmincon with objective ...

mer än ett år ago | 0

| accepted

Question

Search for optimal values of variables

I have two parameters c1 & c2 as variables which I pass to a function and it returns x as 0 or 1 (not logical operators but valu...

mer än ett år ago | 1 answer | 0

### 1

answerQuestion

Equivalent of c++'s NULL or python' s None in MATLAB

I have a c++ code where certain variables (as well as certain user defined class objects) are set to NULL under some conditions....

mer än ett år ago | 5 answers | 0

### 5

answersQuestion

'n' number of nested for loops

I have a cell array M with 4 cell elements and each cell element has a 8x2 matrix. I'm trying to making different combinations ...

mer än ett år ago | 1 answer | 1

### 1

answerQuestion

Transformation of a MATLAB Function.

I have a function defined as, f_xw = @(x,w) [3.*x(1) - x(1).^2/7 + w(1); -2.*x(2) + w(2)]; I want to transfor...

mer än ett år ago | 1 answer | 0

### 1

answerQuestion

Alternative for nested for loop

I need to implement this logic to make combinations of a matrix. This code is a bit cumbersome since I need to add more rows and...

nästan 2 år ago | 1 answer | 0