William
Followers: 0 Following: 0
Semi-retired physicist with interests in numerical modeling and mathematics.
統計
All
Feeds
回答済み
Bitshift cannot work on negative numbers
I believe this is happening for the following reason: The documentation states that "If A is a double array, and ASSUMEDTYPE is...
Bitshift cannot work on negative numbers
I believe this is happening for the following reason: The documentation states that "If A is a double array, and ASSUMEDTYPE is...
3年弱 前 | 2
回答済み
How to calculate the conditional probability of an event?
Actually, I believe that p(C|A) would be: y = strfind(array, 'A'); N_A = length(y); p_CA = N_AC/N_A; There is one further th...
How to calculate the conditional probability of an event?
Actually, I believe that p(C|A) would be: y = strfind(array, 'A'); N_A = length(y); p_CA = N_AC/N_A; There is one further th...
3年弱 前 | 1
回答済み
How to calculate the conditional probability of an event?
Myriam, If A, B and C were variables with the values 1, 2 and 3, then in your example: array = [1, 1, 2, 1, 3, 1, 2, 2, 2, 3, ...
How to calculate the conditional probability of an event?
Myriam, If A, B and C were variables with the values 1, 2 and 3, then in your example: array = [1, 1, 2, 1, 3, 1, 2, 2, 2, 3, ...
3年弱 前 | 0
回答済み
How to calculate the conditional probability of an event?
Hello Myriam. It is not clear whether A, B, and C here are text characters, or if they have numeric values. If we assume they...
How to calculate the conditional probability of an event?
Hello Myriam. It is not clear whether A, B, and C here are text characters, or if they have numeric values. If we assume they...
約3年 前 | 1
| 採用済み
回答済み
trigonometric non linear equation
I have no idea what this question is about, but I do notice that some of the expressions are surrounded with curly braces { } ra...
trigonometric non linear equation
I have no idea what this question is about, but I do notice that some of the expressions are surrounded with curly braces { } ra...
約3年 前 | 1
| 採用済み
回答済み
How to 3D plot a circle with radius of 1 in x y and sine wave in z?
How about this: theta = linspace(0,2*pi,100); x = sin(theta); y = cos(theta); z = sin(2*theta); figure(); plot3(x,y,z);
How to 3D plot a circle with radius of 1 in x y and sine wave in z?
How about this: theta = linspace(0,2*pi,100); x = sin(theta); y = cos(theta); z = sin(2*theta); figure(); plot3(x,y,z);
約3年 前 | 3
回答済み
Adding each values to row vector
... but if you just want to create a vector with three values, you would use a statement like: a = [1,2,3]; This produces a ve...
Adding each values to row vector
... but if you just want to create a vector with three values, you would use a statement like: a = [1,2,3]; This produces a ve...
約3年 前 | 0
回答済み
How do I plot a function over a specific range of x values?
Erica, I think fplot() will work if it is called correctly. If you want to use it, you need to define the function so that it ...
How do I plot a function over a specific range of x values?
Erica, I think fplot() will work if it is called correctly. If you want to use it, you need to define the function so that it ...
約3年 前 | 0
| 採用済み
回答済み
For loop execution.
I think it may be the 4 clauses that read like (t >= 0.1 & t <= 2.5). Shouldn't these say (t(d) >= 0.1 & t(d) <= 2.5)?
For loop execution.
I think it may be the 4 clauses that read like (t >= 0.1 & t <= 2.5). Shouldn't these say (t(d) >= 0.1 & t(d) <= 2.5)?
約3年 前 | 0
| 採用済み
回答済み
what function to use to find frequency of values in set?
... or maybe histcounts(R12) to get a histogram.
what function to use to find frequency of values in set?
... or maybe histcounts(R12) to get a histogram.
約3年 前 | 0
回答済み
Why do i get the error "Dimensions of arrays being concatenated are not consistent"
The problem in the second program is the statement 'theta(i) = theta', which is changing theta from a scalar into a vector. The...
Why do i get the error "Dimensions of arrays being concatenated are not consistent"
The problem in the second program is the statement 'theta(i) = theta', which is changing theta from a scalar into a vector. The...
約3年 前 | 1
| 採用済み
回答済み
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Tim, A correction to the last message. If you want to go counterclockwise, you need to make the final angle bigger than the st...
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Tim, A correction to the last message. If you want to go counterclockwise, you need to make the final angle bigger than the st...
約3年 前 | 0
回答済み
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Hi Tim, Actually I have been thinking a little more about this, and I believe it is even easier than I suggested. You don't ne...
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Hi Tim, Actually I have been thinking a little more about this, and I believe it is even easier than I suggested. You don't ne...
約3年 前 | 0
回答済み
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Hi Tim, I don't think there is any problem with the cases you describe. The values of sin() and cos() are periodic in their ar...
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Hi Tim, I don't think there is any problem with the cases you describe. The values of sin() and cos() are periodic in their ar...
約3年 前 | 0
回答済み
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Tim, I think you could avoid all the special cases by making use of the atan2() function. This function is defined for points ...
Animate creation of a circle clockwise and anticlokwise for different staringpoints
Tim, I think you could avoid all the special cases by making use of the atan2() function. This function is defined for points ...
約3年 前 | 0
回答済み
How to use for loop structure to calculate two vectors to dot product
a = 1:5; b = 6:10; c = 0; for j = 1:5 c = c + a(j)*b(j); end However, this calculation can be done more simply with t...
How to use for loop structure to calculate two vectors to dot product
a = 1:5; b = 6:10; c = 0; for j = 1:5 c = c + a(j)*b(j); end However, this calculation can be done more simply with t...
約3年 前 | 0
回答済み
Subtraction of elements in successive rows
The easy way to do this is A = diff(a);
Subtraction of elements in successive rows
The easy way to do this is A = diff(a);
約3年 前 | 0
| 採用済み
回答済み
How can i use fill3 to make a box
That's odd. I cut and pasted the code from your question and ran it. It produced a blue rectangle in the z=0 plane, which I th...
How can i use fill3 to make a box
That's odd. I cut and pasted the code from your question and ran it. It produced a blue rectangle in the z=0 plane, which I th...
約3年 前 | 0
回答済み
Data saving for a loop
Nertila -- Yes, that is what this code does. Maybe it would be more clear if I wrote it in this way, with the k-index being the ...
Data saving for a loop
Nertila -- Yes, that is what this code does. Maybe it would be more clear if I wrote it in this way, with the k-index being the ...
約3年 前 | 0
| 採用済み
回答済み
Data saving for a loop
a = zeros(n,n,n) for i=1:n %calculus for j=1:n %calculus for k=1:n %calculus ...
Data saving for a loop
a = zeros(n,n,n) for i=1:n %calculus for j=1:n %calculus for k=1:n %calculus ...
3年以上 前 | 0
回答済み
Why do I get this error?
One of the first two terms on the right should have an i+1 rather than i-1, but this is undoubtedly not the problem that caused ...
Why do I get this error?
One of the first two terms on the right should have an i+1 rather than i-1, but this is undoubtedly not the problem that caused ...
3年以上 前 | 0
回答済み
Creating a loop to determine at which iteration an error has occurred
You don't necessarily need a loop for this. You can use B = diff(A) to return the differences between each pair of successive v...
Creating a loop to determine at which iteration an error has occurred
You don't necessarily need a loop for this. You can use B = diff(A) to return the differences between each pair of successive v...
3年以上 前 | 0
| 採用済み
回答済み
How rotate a cylinder?
Lorenzo -- If all you need is to have the center of the cylinder located at the origin of the coordinate system, then what you n...
How rotate a cylinder?
Lorenzo -- If all you need is to have the center of the cylinder located at the origin of the coordinate system, then what you n...
3年以上 前 | 0
回答済み
How to use bar() to plot
I suspect the arguments to your plot() functions are reversed, When you type plot(a,b), Matlab puts 'a' on the x-axis ahd 'b' o...
How to use bar() to plot
I suspect the arguments to your plot() functions are reversed, When you type plot(a,b), Matlab puts 'a' on the x-axis ahd 'b' o...
3年以上 前 | 0
| 採用済み
回答済み
Matlab question, very stuck
Your program seems to be a little uncertain about whether v is a number or a vector, and it also doesn't assign the values corre...
Matlab question, very stuck
Your program seems to be a little uncertain about whether v is a number or a vector, and it also doesn't assign the values corre...
3年以上 前 | 0
回答済み
Plotting square wave in matlab
Yes, the function square(x) returns a unique value, either +1 or -1, for each vallue of x. There is no value of x for which it ...
Plotting square wave in matlab
Yes, the function square(x) returns a unique value, either +1 or -1, for each vallue of x. There is no value of x for which it ...
3年以上 前 | 1
回答済み
How to do integral for data
I have two comments: A more correct statement about the integral is that the integral of sin(x) is equal to C-cos(x), where C i...
How to do integral for data
I have two comments: A more correct statement about the integral is that the integral of sin(x) is equal to C-cos(x), where C i...
3年以上 前 | 0
回答済み
How to produce line plot yline for matlab R2018a
It's not really necessary to plot 100 points along the line. The first and last points are enough, as in: plot([0,1],[260,260]...
How to produce line plot yline for matlab R2018a
It's not really necessary to plot 100 points along the line. The first and last points are enough, as in: plot([0,1],[260,260]...
3年以上 前 | 1
回答済み
How to remove numbers from a vector?
You could use something like: while z_force(1)==0 z_force(1) = []; end while z_force(end)==0 z_force(end) = []; en...
How to remove numbers from a vector?
You could use something like: while z_force(1)==0 z_force(1) = []; end while z_force(end)==0 z_force(end) = []; en...
3年以上 前 | 0