Question


Accessing a specific char in a string
I am trying to access a specific char in a string. I get a number by the user and I need to index all the digits, because the...

environ 5 ans ago | 1 answer | 0

1

answer

Question


Using array as a for loop
I need to solve the polynomial x^4+nx^3-1 for n=-1,0,1 (without using for loop) What I did is: n=(-1:1:1); co_poly=[1...

presque 6 ans ago | 1 answer | 0

1

answer

Question


Check which field are the input from
Is there a way to check from which field the elements of the vector are? For example intger, rational numbers,etc. ?

plus de 6 ans ago | 1 answer | 0

1

answer

Question


Concatenating element- what the different?
What is the different between those code: NewVector=[Vector1,element,vector2]; and NewVector=[Vector1:element:vecto...

plus de 6 ans ago | 1 answer | 0

1

answer

Question


what does the following syntax
A=magic(3); B=A(:) disp(B) why does it show the matrix entires in a column vector? what does (:) mean?

plus de 6 ans ago | 1 answer | 0

1

answer

Question


loop inside Index of matrix
On the following code function [d] = matrix( n ) d=zeros(2*n-1); for i=1:n d(i:end-i+1,i:end-i)=i;...

plus de 6 ans ago | 1 answer | 0

1

answer

Question


incrementation in for loop
x = ones(1,10); for n = 2:6 x(n) = 2 * x(n - 1); end When written as above n increase by 1 after execution of ...

plus de 6 ans ago | 3 answers | 0

3

answers

Question


Calculating N-th Element Of A Sequence
function m = seq( x ) n=[(1:x);(1:x)]; if x==1 n(1,1)=2; end if x==2 n(1,2)=3; end n(1,x)=(1-s...

presque 7 ans ago | 1 answer | 0

1

answer

Question


Saving to a vector
function [ b ] = PrimeF( x ) for i=1:x if mod(x,i)==0 b=i; end end b=isprime(b)*b; end ...

presque 7 ans ago | 2 answers | 0

2

answers

Question


radians to degrees in pc client
Using the mobile app the following code rad2deg(pi) works, but not in the PC (attached image).

presque 7 ans ago | 0 answers | 0

0

answers