mzaman

20 Reputation

5 Badges

10 years, 143 days

MaplePrimes Activity


These are questions asked by mzaman

Hello

Is there any option to create a vector with logaritmically spaced? somthing like "logspace" in matlab. (logspace(0:10:20))

Thank you.

Hello

1)I need some guides to solve my problem. I have attached my file. Could you please help me to understand what's wrong in my code?

2) Is there any option to pause "Loops" and watching results, something like break point.

THank you.

 

 

restart

 

with(ImageTools):``

with(FileTools):````

Input Section

 

NULL

filelocation := "C:\\Users\\Mohammad\\Desktop\\1.jpg":

k := 1:NULL

 

zimage := Read(filelocation):

zwidth := Width(zimage):NULL

kernel__length := VectorCalculus:-`+`(VectorCalculus:-`*`(2, k), 1):````

kernel__data := `~`[`*`](Matrix(1 .. kernel__length, 1 .. kernel__length, 1), 1/kernel__length^2):

imheight := Height(zimage):``

imwidth := Width(zimage):NULLNULL

Width(zimage, lower):

Width(zimage, upper):

View(zimage):``

new1zpic := Convolution(zimage, kernel__data):

View(new1zpic)``NULL

new2zpic := zimage:

dummy := 0:

"for i from (k+1)  to (Width(zimage,upper)-k) do     for j from (k+1)  to (Height(zimage,upper)-k) do           for m from 1 to kernel[length]  do               for n from 1 to kernel[length]  do                         dummy:=dummy+kernel[data] (m, n)*new2zpic(i+m-2, j+n-2)                                         end do;              end do;                      new2zpic(i,j):=dummy:                   dummy:=0:   end do; end do;"

Error, final value in for loop must be numeric or character

 

 

 

 

NULL

 

Download Exercise_II-1.0.mw

restart

 

with(ImageTools):``

with(FileTools):````

Input Section

 

NULL

filelocation := "C:\\Users\\Mohammad\\Desktop\\1.jpg":

k := 1:NULL

 

zimage := Read(filelocation):

zwidth := Width(zimage):NULL

kernel__length := VectorCalculus:-`+`(VectorCalculus:-`*`(2, k), 1):````

kernel__data := `~`[`*`](Matrix(1 .. kernel__length, 1 .. kernel__length, 1), 1/kernel__length^2):

imheight := Height(zimage):``

imwidth := Width(zimage):NULLNULL

Width(zimage, lower):

Width(zimage, upper):

View(zimage):``

new1zpic := Convolution(zimage, kernel__data):

View(new1zpic)``NULL

new2zpic := zimage:

dummy := 0:

"for i from (k+1)  to (Width(zimage,upper)-k) do     for j from (k+1)  to (Height(zimage,upper)-k) do           for m from 1 to kernel[length]  do               for n from 1 to kernel[length]  do                         dummy:=dummy+kernel[data] (m, n)*new2zpic(i+m-2, j+n-2)                                         end do;              end do;                      new2zpic(i,j):=dummy:                   dummy:=0:   end do; end do;"

Error, final value in for loop must be numeric or character

 

 

 

 

NULL

 

Download Exercise_II-1.0.mw

Hello

Could you plese help me to plot my function. i want to plot a function in which variables are have able formatting. I have attache my file.

Thank you.


restart

L[b] := 400:

L[c] := 400:

q := 5:

M[ab] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), theta[b]):``

M[ba] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), VectorCalculus:-`*`(2, theta[b])):

M[bc] := VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[b]), 1/L[b]), VectorCalculus:-`+`(VectorCalculus:-`*`(2, theta[b]), theta[c])), VectorCalculus:-`*`(VectorCalculus:-`*`(q, L[b]^2), 1/12)):

M[cb] := VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[b]), 1/L[b]), VectorCalculus:-`+`(theta[b], VectorCalculus:-`*`(2, theta[c]))), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(q, L[b]^2), 1/12))):

M[cd] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), VectorCalculus:-`*`(2, theta[c])):

M[dc] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), theta[c]):

eq1 := VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`+`(M[ab], M[ba]), 1/L[c]), VectorCalculus:-`*`(VectorCalculus:-`+`(M[cd], M[dc]), 1/L[c])) = 0:

eq2 := VectorCalculus:-`+`(M[ba], M[bc]) = 0:

solve([eq1, eq2], {theta[b], theta[c]})

{theta[b] = -(40000000/3)/(E*(I[b]+2*I[c])), theta[c] = (40000000/3)/(E*(I[b]+2*I[c]))}

(1)

theta[b] := rhs({theta[b] = -(40000000/3)/(E*(I[b]+2*I[c])), theta[c] = (40000000/3)/(E*(I[b]+2*I[c]))}[1]):

theta[c] := rhs({theta[b] = -(40000000/3)/(E*(I[b]+2*I[c])), theta[c] = (40000000/3)/(E*(I[b]+2*I[c]))}[2]):

subs(theta[b] = theta[b], M[ba])

-(400000/3)*I[c]/(I[b]+2*I[c])

(2)

subs(theta[b] = theta[b], M[bc]):

``

EXplore(plot(M[ba], I[b] = 1 .. 10), parameters = [I[c] = 1 .. 20])

Error, (in plot) unexpected option: I[b] = 1 .. 10

 

``


Download shiboft2.mw

Hello

I wantt to assigne value to a variable that doesn't exist before the radio button. How can i do that?

Could you please help me?

1 2 3 Page 2 of 3