Filter löschen
Filter löschen

How introduce column vector in M-file?

1 Ansicht (letzte 30 Tage)
Abu Zar
Abu Zar am 19 Feb. 2023
how I improved my file to get { temp1<<1}, I am stuck here.
i gto sugestion to introduce column vector for temp0 but i am fail in this stage
  7 Kommentare
Abu Zar
Abu Zar am 19 Feb. 2023
Bearbeitet: Abu Zar am 19 Feb. 2023
modify this?thanks
disp(temp1)
0
- (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50 - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50
2^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
3^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
(91*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50 + (91*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 + (91*exp(-(1594323*120^(1/2))/31250000000000))/50 + (91*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 + (91*exp(-(6561*2^(1/2))/12500000))/50 + (91*exp(-(177147*24^(1/2))/125000000000))/50 + (91*exp(-(19683*6^(1/2))/625000000))/50 + (91*exp(-81/2500))/50 + (91*exp(-729/125000))/50 + (91*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 + (91*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 + (91*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 + (91*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 + (91*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 + (91*exp(-(4782969*720^(1/2))/3125000000000000))/50
5^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
6^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
7^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
2*2^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
(141*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50 + (141*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 + (141*exp(-(1594323*120^(1/2))/31250000000000))/50 + (141*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 + (141*exp(-(6561*2^(1/2))/12500000))/50 + (141*exp(-(177147*24^(1/2))/125000000000))/50 + (141*exp(-(19683*6^(1/2))/625000000))/50 + (141*exp(-81/2500))/50 + (141*exp(-729/125000))/50 + (141*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 + (141*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 + (141*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 + (141*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 + (141*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 + (141*exp(-(4782969*720^(1/2))/3125000000000000))/50
10^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
11^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
2*3^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
13^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
14^(1/2)*(exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000) + exp(-(3486784401*3628800^(1/2))/10937500000000000000000000) + exp(-(1594323*120^(1/2))/31250000000000) + exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000) + exp(-(6561*2^(1/2))/12500000) + exp(-(177147*24^(1/2))/125000000000) + exp(-(19683*6^(1/2))/625000000) + exp(-81/2500) + exp(-729/125000) + exp(-(387420489*362880^(1/2))/21875000000000000000000) + exp(-(43046721*5040^(1/2))/1093750000000000000) + exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000) + exp(-(387420489*40320^(1/2))/437500000000000000000) + exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000) + exp(-(4782969*720^(1/2))/3125000000000000)) - (9*exp(-(3486784401*3628800^(1/2))/10937500000000000000000000))/50 - (9*exp(-(1594323*120^(1/2))/31250000000000))/50 - (9*exp(-(7625597484987*87178291200^(1/2))/547421875000000000000000000000000000))/50 - (9*exp(-(6561*2^(1/2))/12500000))/50 - (9*exp(-(177147*24^(1/2))/125000000000))/50 - (9*exp(-(19683*6^(1/2))/625000000))/50 - (9*exp(-81/2500))/50 - (9*exp(-729/125000))/50 - (9*exp(-(387420489*362880^(1/2))/21875000000000000000000))/50 - (9*exp(-(43046721*5040^(1/2))/1093750000000000000))/50 - (9*exp(-(847288609443*6227020800^(1/2))/782031250000000000000000000000000))/50 - (9*exp(-(387420489*40320^(1/2))/437500000000000000000))/50 - (9*exp(-(31381059609*39916800^(1/2))/6015625000000000000000000000))/50 - (9*exp(-(4782969*720^(1/2))/3125000000000000))/50 - (9*exp(-(94143178827*479001600^(1/2))/1203125000000000000000000000000))/50
Walter Roberson
Walter Roberson am 19 Feb. 2023
double() or vpa()
The exp() terms I tested were exp(-1e-9) to exp(-1e-15). Precision is low in that range but the values should be distinguishable from 1.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 19 Feb. 2023
Here is the corrected code:
D = 15;
tmpI = eye(D);
ket = sum(tmpI(:,2:D),2);
syms n
ct = 6;
creation = circshift(diag(sqrt(0:1:(D-1))),-1);
annihilation = creation';
Vnorm = zeros(1,ct);
alpha = 0.03*(1:ct);
%loop for calculation
for k = 1:ct
temp0 = double(symsum(exp(-abs(alpha(k))^2 * alpha(k)^n / sqrt(factorial(n)) ), n, 0, 14)*ket);
ketalpha(k,:) = temp0; % Data from each iteration is stored
temp1 = annihilation*temp0 - alpha(k)*temp0;
V(k,:) = temp1; % Data from each iteration is stored
Vnorm(k) = temp1'*temp1;
end
plot(alpha,Vnorm, '-*k')
xlim([0 0.21])
xlabel('$\alpha$', 'Interpreter', 'latex', 'Color', 'b', 'FontSize', 15)
ylabel('Vnorm', 'Color', 'b', 'FontSize', 15)
whos temp0 ketalpha temp1 V Vnorm
Name Size Bytes Class Attributes V 6x15 720 double Vnorm 1x6 48 double ketalpha 6x15 720 double temp0 15x1 120 double temp1 15x1 120 double

Weitere Antworten (0)

Kategorien

Mehr zu Gate-Based Quantum Computing finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by