Login
Password
Sources on this Page

> Headlines by Category

 Home / Science

 Genetics
 
 Nature
 
 History
 
 Space
 

You are using the plain HTML view, switch to advanced view for a more complete experience.

Re: Keep a vectors dimensions when elements are equal.
James Ellis wrote:
> My question is why does matlab do this?
>
> I =
>
> 1 1 1 1
>
>>> v1=I(1,1):I(1,3)
>
> v1 =
>
> 1
>
> How would I get v1=1 1 1 in this case?

v1 = I(1,1:3);
Plotting - Getting Error
Hi,

I have created an array P=zeros(T,N,D), where T = 10, N = 100000 and D = 3. Now I am generating following values of P

P= randn(T,N,D);

If I need to plot with X-axis T, Y axis N and Z-axis D. How can I do it? I am getting the following error

"Data may not have more than 2 dimensions"

Somebody help.

Thanks,
Rajeev
symbolic solver in Matlab 2009b
hi
is there a difference in the symbolic solver between Matlab 2009a and Matlab 2009b.... cause a code that runs in 2009a isn't running in 2009b and it uses a symbolic solver
Printing the Command Windows
I would like to print command windows but I encounter the problem that the space among element of the matrices I would like to print is too large. I only work with binary matrices but when I print, the paper only show 6 elements each line + funny arrow.

Is there anyway to reduced space between elements in matrix when printing out?
Re: Plotting - Getting Error
Rajeev Narayanan wrote:

> I have created an array P=zeros(T,N,D), where T = 10, N = 100000 and D =
> 3. Now I am generating following values of P
>
> P= randn(T,N,D);
>
> If I need to plot with X-axis T, Y axis N and Z-axis D. How can I do it?
> I am getting the following error
>
> "Data may not have more than 2 dimensions"

Please show us the command you are trying to use to plot with, and any
commands leading up to it that derive the appropriate data from P.

Keep in mind that if you try to plot P, then you are trying to do a four
dimensional plot -- T, N, D, and value.
Re: gaussian pulse
You should have t ranging from something to the very left of 0. Something like this:

t = -10:1/fs:10;

If you need, you can change the lower limit of t to get a truncated but still acceptable version.
Keep a vectors dimensions when elements are equal.
My question is why does matlab do this?

I =

     1 1 1 1

>> v1=I(1,1):I(1,3)

v1 =

     1

How would I get v1=1 1 1 in this case? Im new to matlab and learning all the ins and outs, ive made a script which accepts a vector input such as

a, b, c, d

and has to make an NxN matrix

a-b, -b, 0
-b, b-c, -c
0, -c, c-d

which ive done as follows:

I= input('Input spring constant values as a row vector:');
[m,n]=size(I);
N=n-1;
v1=I(1,1):I(1,N);
v2=I(1,2):I(1,N+1);
v3=I(1,2):I(1,N);
K=diag(v1)+diag(v2)-diag(v3,1)-diag(v3,-1);

The problem is if the input vector's elements are all equal matlab just makes it a number and K comes out in the wrong dimension (its used later in multiplication so it needs to be the right dimensions).

Any advice?
Systems Management in Education: A Best Practice Guide
Enable the success of you and your students with these real-life best practices for IT pros in K-12 schools as well as higher-education environments.
Post Selected Items to:

Showing 10 items of about 100000

home  •   advertising  •   terms of service  •   privacy  •   about us  •   contact us design by Popshop •   © 1999-2008 NewsKnowledge