Community Profile

# Ali Tawfik

##### Last seen: 2 months ago
47 total contributions since 2018

View details...

Contributions in
View by

Question

Get all the values from a two (for loop)
I am running two for loops with means it run 5*5.. Later the size of x will be (1,5) however; the x runs more than that!!! Ca...

2 months ago | 2 answers | 0

### 2

Question

Understanding Index for loop
I am new to Matlab, and I would like to understand the following index in for loop ... I understand the indices of the values ...

2 months ago | 1 answer | 0

### 1

Question

reduce vector each loop
I am trying to reduce the vector length backward each loop, like the following: I think I should use for loop but i can not figu...

2 months ago | 1 answer | 0

### 1

Question

Assigning or replacing elements of another array into an array based on indices
Hi, I am trying to replace or assign elements into another array based on indices, I did it but only with only element, I can ...

2 months ago | 1 answer | 0

### 1

Question

create array and assign the values to proper locations
I would like store each value and add them to the previous to create an array ... expected result should be= [-8 0 0 0 0 0 0 8]...

2 months ago | 1 answer | 0

### 1

Question

create plot with slice
Hi, I am wondering if I have two values x=[1,2,3,4,5,6,7] y=[10,20,22,25,30,35,37] I understand, it does NOT work like tha...

2 months ago | 1 answer | 0

### 1

Question

Creating multidimensional table from multidimensional array
Hi, I have some 3D arrays, and I would like to obtain/create table for each dimension, I could do it but I wanna it to operate...

3 months ago | 1 answer | 0

### 1

Question

Find Unique values in array
Hi all, I am trying to create a new array contains ONLY the unique values (same values but not repeated) which in the followin...

3 months ago | 1 answer | 0

### 1

Question

Obtain specific dimension from multidimensional Arrays
Hi All, I am trying to create a new variables based on multidimensional array obtained, for the simplicity I just got the part...

3 months ago | 3 answers | 0

### 3

Question

Add various horizontal lines to a plot Matlab 2016a
clear all; clc; close all x=[33.5 44 55 69 106 143 123 49 -25]; y=[61.8 53 45 73 77 81 156 68 -18]; z=[-7.5 -5 -2.5 -2.5...

3 months ago | 2 answers | 0

### 2

Question

Assign one name to three variables in table
clear all; t=[33;69;12;13;14;15] u={'High';'M';'LOW'} num=2 y=repmat(u,num,1) i=[0;45] ii=repelem(i,3) yy = table(ii,y,t)...

3 months ago | 1 answer | 0

### 1

Question

Repeat some elements in a vector
clear all; u={'High';'M';'LOW'} y=repelem(u(1:3),2) % would like the output y=[high;M;LOW;high;M;Low] I am trying to use r...

3 months ago | 1 answer | 0

### 1

Question

Undefined operator '==' for input arguments of type 'cell'.
Hi all, I using MatLab 2016a and I am trying to create if loop however, always get the following error "Undefined operator '=...

3 months ago | 1 answer | 0

### 1

Question

Sum with a for loop of each 2 elements
Hi All, I have been trying to get the sum of each two elements: for example: I have x=[50 200 20], I need to have the output...

4 months ago | 1 answer | 0

### 1

Question

Calculate centroid and length of a rectangular shape
Hi, I would like to obtain the distance with respect to the centriod (both distances 97.2 and 152.78) as shown in the figure...

4 months ago | 0 answers | 0

### 0

I think you misunderstood me, because I would like to add (for loop , or while )to add for each index a command then store them ...

6 months ago | 0

Question

Matrix dimensions must agree error in FOR loop
Hi all, I am trying to do a conditional statement inside for loop, I got a very strange error of matrix dimensions must agree ...

6 months ago | 1 answer | 0

### 1

Question

Hey all, I have been trying to create menu with input command, I wanna the menu displays choices as buttons in a dialog box de...

6 months ago | 2 answers | 0

### 2

Question

create a matrix from matrix with zeros elements
I have a matrix obtained A=[ 1 2 3 4;5 6 7 8;9 10 11 12; 13 14 15 16]; So I just would like to obtain another matrix but with...

7 months ago | 2 answers | 0

### 2

Question

Can not assign data for each cell with xlswrite
Hi All, I have a vector and I am trying to write the data into excel, I used xlswrite, which seems working fine, but when I tr...

9 months ago | 0 answers | 0

### 0

Question

Repeat specific elements in vector with keeping the basic vector
Hi All, I have been trying to create a new vector based on old one, by repeating specific elements, I have been looking for ...

9 months ago | 1 answer | 0

### 1

Question

Addition to specified elements in a vector with for loop to create a new vector
Hi all, I am trying to add to specified elements in a vector to create a new one with the new values, however, unfortunately...

9 months ago | 1 answer | 0

### 1

Question

Can not terminate execution with if/for loop
I am trying to terminate code but not working, I am using for loop, All I wanna is to break if (d) equal to the values writte...

11 months ago | 3 answers | 0

### 3

Question

find specific value from each row from matrix (Index, and number)
Hi All, I am trying to find/obtain each value is lower than specific number from each row from a matrix. However I only obtain...

11 months ago | 1 answer | 0

### 1

Question

Subscript indices must either be real positive integers or logicals with minimum and maximum values
I am trying to obtain the max and min. values from the following arrays:, however, I got the above mentioned error, any help cl...

12 months ago | 1 answer | 0

### 1

Question

Getting values from a for loop when specific condition met
I am doing a loop, and want the iteration stops when condition of x = 5 however, the code terminates before x=5 ? So any help...

12 months ago | 1 answer | 0

### 1

Question

Too many output arguments with if condition, and assume
Hi I got that error while I am using if condition with assume, so please any help. clear all; close all; clc; syms x ...

12 months ago | 0 answers | 0

### 0

Question

Extract value from Looping until or when condition is true
Hi All, I am trying to doing a loop with different values until condition met, I just do not wanna all the iteration to work...

12 months ago | 1 answer | 0

### 1

Question

Conversion to logical from sym is not possible. wanna do inequalities to syms
Hi all, I am trying to solve inequalites and then apply condition as the attachment: I understand I can not set conditi...

12 months ago | 0 answers | 0

### 0

Question

Need help please in function output
Hi I am trying to build function to obtain different results upon changing of variables So I need help please Below is the co...

12 months ago | 0 answers | 0