Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1084
Number of posts: 1765

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
MAT LAB function help! Posted by jmed on 22 Feb 2010 at 12:45 PM
Implement matlab function y = radicals(v) that calculates....

sqrt of v(1) + sqrt v(2) + sqrt v(3) +sqrt of.....+ sqrt v(n)

The parameter v is a vector. In the expression, n is the length of v as well as the number of radicals. The values v(1), v(2),...,v(n) are components of v.
Report
Re: MAT LAB function help! Posted by jmed on 22 Feb 2010 at 12:49 PM
Once this is complete, I need to write a script to test function. Prompt user to enter positive integer k. Generate a random vector r of length k using rand function. Then calculate the following sequence of values by calling the function radicals repeatedly.

Save the calculated values to a vector seq. Display and plot seq. Ex:

project
Enter k = 10

r = 10 random numbers....

seq = 10 numbers
Report
Re: MAT LAB function help! Posted by jmed on 24 Feb 2010 at 2:34 PM
anyone please help!!!
Report
Re: MAT LAB function help! Posted by jmed on 24 Feb 2010 at 2:36 PM
anyone please help!!!
Report
Re: MAT LAB function help! Posted by Predictor on 2 Mar 2010 at 3:10 AM
Try: sum(sqrt(v))


-Will Dwinnell
Data Mining in MATLAB




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.