Community Profile

photo

Ata Ul


Active since 2013

I'm a student of BSc Civil Engineering in UET LHR

Statistics

  • Thankful Level 1

View badges

Content Feed

View by

Question


PRIME NUMBERS,... I Tried to make a program that separates prime numbers between any interval......but it doesn't work......!?!?
The code that I used was; a=input('enter lower limit'); b=input('Enter upper Limit'); A=(a:b) for i=1:b-a; ...

10 years ago | 1 answer | 0

1

answer

Question


how to write a simple algorithm that can allow the user to know the index of the first negative element in a column matrix.
Using a WHILE statement..... how to write a simple algorithm that can allow the user to know the index of the first negative el...

10 years ago | 1 answer | 0

1

answer

Question


if r=rand(2,8) . I wanna find every element which is smaller than 0.5 and replace it with any other number say 0 or 1 or 2. how to do it....??
if r=rand(2,8) . I wanna find every element in r which is smaller than 0.5 and replace it with any other number; say 0 or 1 or 2...

10 years ago | 1 answer | 0

1

answer

Question


I have a matrix a=[1,2,3,4..........,20], Now I want to multiply every other element in a with -1 to get a=[1,-2,3,-4................-20].
I have a matrix a=[1,2,3,4..........,20] Now I want to multiply every other element in 'a' with -1 to get a=[1,-2,3,-4.........

10 years ago | 1 answer | 0

1

answer

Question


I have a matrix a=[1,2,3,4..........,20], Now I want to multiply every other element in a with -1 to get a=[1,-2,3,-4................-20].
I have a matrix a=[1,2,3,4..........,20] Now I want to multiply every other element in 'a' with -1 to get a=[1,-2,3,-4.........

10 years ago | 1 answer | 0

1

answer