f

#### Need help for the same problem ?

```>> x(1:7) = randi([4,50],1,7);
d(1:7) = randi([3,5],1,7);
for i = 1 : 7
sum = 0;
w = 1;
sum = sum + w*(x(i) - d(i));
end
f(1) = sum;

for i = 1 : 7
sum = 0;
sum = sum + w*(x(i) - 4);
end
f(2) = sum;

f = f(1) + f(2);
>> a = Particle_Swarm_Optimization (10,2,[4 50;3 5],f,randi(100,50),2,2,2,0.4,0.9,3);
Completed  0  % ...Error using feval
Argument must contain a string or function_handle.

Error in Particle_Swarm_Optimization (line 103)
availability(p,itr)=feval(Food_availability,parameter);
``` 0  arudhra
12/19/2014 1:26:06 AM comp.soft-sys.matlab  211266 articles. 23 followers. 0 Replies 582 Views Similar Articles

[PageSpeed] 37 Similar Artilces:

need to compute this problem having problems with how to start this problem help need urgently
Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)] of the phase-shifted sinusoid.X(t) = A*  cos(t +theta ): State also if X(t) is Wide Sense Stationary (WSS). plot 10 realisations of X(t) plotR(s-t,0)as a function of s-t "pramod kumar" <pramod.kilu@gmail.com> wrote in message <jpapso\$44b\$1@newscl01ah.mathworks.com>... > Let   U[0; 2theta] be a uniform random variable ...

Some MATLAB problems....help needed.
Q1) WAP in MATLAB that will accept only positive integers and calculates Arithmatic and Geometric means.The program terminates when the user enters a -ve value.Use a while loop to get the inputs. Q2)Consider the following Eqation: N(i+1)=mod(8121N(i)+28411,134456) Using this eqation design a random number generatorwhose output is a real number in the range [0.0,1.0) Q3)Write a MATLAB function to calculate the running average and standard deviation of the data set as it is being entered. Q4) Write a MATLAB function "dice" that simulats the throw of a fair diceby returning a random...

Matlab Problem, Need Help Urgent
Consider the integral ∫0 e-x sin(2x) dx ∏/4 a) Use the trapezoidal rule, and Simpson’s rule to approximate the integral. b) Compute the exact error in each case of part (a), and compare the exact error to the error bound associated for each integration method used. Hint: Use function s=simprl(f,a,b,M) %Input - f is the integrand input as a string 'f' % - a and b are upper and lower limits of integration % - M is the number of subintervals %Output - s is the simpson rule sum h=(b-a)/(2*M); s1=0; s2=0; for k=1:M x=a+h*(2*k-1); s1=s1+feval(f,x); e...

Need help with some MATLAB coding problems
I have the following problems and no idea where to begin: 1) The function takes one string that contains two words separated by a space and returns true if the two words are identical (case sensitive).Otherwise, it should return false. Test Case: out1 = compareTwo('winner winner') out1 -> true 2) The function takes in a string which is a sentence of upper and lower case letters. The function then removes the upper case letters to reveal a secret message. The result should not contain any upper case letters. The result may contain lower case letters, spaces and numbers. Test Case: ...

New To MATLAB and need help with this problem
I am new to Matlab so can someone help me write some code to find the area of my hand from data points only without using built in matlab functions. I know that you can use things like midpoint rule or trap but I dont have a function input Thank You given data that represents the shape of my hand I have to use possibly several numerical integration schemes to find the area Matt wrote: > I am new to Matlab so can someone help me write some code to find the > area of my hand from data points only without using built in matlab > functions. > I know that you can use things like midp...

Need matlab help
Hi, I am trying to solve an interesting problem. I have a handheld device that contains a basic 3d accelerometer. I am trying to determine the path that the device moves through the air and the timing associated with the device. Think of the device being moved like a tennis racket or golf club. Normally this would be a simple problem to solve as I have the acceleration data. THe complication is that the device swivels in the persons hand and so i do not really know which direction gravity is acting. I am trying to use Matlab to see if i can figure out the path or the timing (even just timi...

Really need help in this MATLAB problem.
Going to go crazy. I noob in matlab. Please help me in those problem. Q : Write MatLab solution for the function DF that asks for a teamperature(in degree fahrenheit) and computes the equivalent temperature in degrees Celcius, and another function DC that asks for a temperature(in degrees Celcius) and computes the equivalent teamperature in degree Fahrenheit. Your functions should be able to accept both scalar and matrix input. The script should keep running until o number is provided to convert. [The function isempty will be useful here.] (Hint : Fahrenheit to Celsius : (F-32)...

New to MATLAB. Need help with this problem.
I've just ignored this 3 problems (out of 9) in my final today and I wonder someone could help me to solve these problems so I can understand how to do it. 1/ Suppose we have a job that will take 20 hours to complete, and requires the use of a special (and expensive!) type of battery. It is known from exhaustive testing that the probability one of these batteries will wear out in (exactly) one hour is 0 .1, in two hours is 0.4, in three hours is 0.3 and in four hours is 0.2. For each 5 =< n =< 20 , let Pn denote the probability that exactly n batteries will be required to finish...

Help needed on this 857W config. Repost to be clearer what the problems are and the help needed
Hi, Please see below config for my 857W. The basic topology is that I have one cisco857W and various servers and internal wired and wireless clients on the 192.168.0.0 255.255.255.0 network. There are a number of services running on the local lan, DNS and DHCP is also provided by a local server on the same subnet as the router. The 857W router sits on address 192.168.0.254 and needs to act as the local gateway for both wired and wireless clients. With this config booted on the router, the wireless clients can connect and authenticate and get allocated the correct DHCP information and ...

Need help for fixing problem in symbolic matlab
I use symsum in my function. I found a problem like the following sourcecode. Could you please suggest me how to solve it? Thank you. K>> ls = 20; lS=40; K>> syms linit K>> lSsProb = rand(21,1); K>> symsum(lSsProb(linit-ls+1),linit,ls,lS); ??? Error using ==> subsindex Function 'subsindex' is not defined for values of class 'sym'. "Noocharin Tipp" <noocharin_remove@hotmail.com> wrote in message news:ga3imu\$6pe\$1@fred.mathworks.com... >I use symsum in my function. I found a problem like the following >sourcecode...

Need Help to solve Matlab problem Urgently
Dear All, Anyone here can enlighten me where did i go wrong and how to amend my mistake in the matlab scripts (main script & function file), in order to get the plot out. Currently, there is no plot because there is an warning stating as Warning: Divide by zero. (Type "warning off MATLAB:divideByZero" to suppress this warning.) > In C:\MATLAB6p5\work\Assignment_Qn1new.m at line 44 Previous value q0 q1 q2 s ans = NaN NaN NaN NaN Latest value q0 q1 q2 s ans = NaN NaN NaN NaN My Matlab Main script are as follows: clear pack clc format long e M = 1601; % Number of...

MATLAB volume problem need HELP asap
Problem: We are constructing hemispherical domes, and wish to know how much concrete is required. For a given outer radius (in feet), and wall thickness (in inches), compute the volume v (in cubic yards) of concrete that will be needed. For the volume of a sphere, we use the formula V = 4/3 * pi * r^3 where r is the radius. Using the Engineering Problem-Solving Methodology from class, develop a complete solution to find the amount of concrete for a particular size of dome. Implement your solution with a MATLAB script that includes commands for getting the outer radius and wall thickness...

need help with this matlab problem(NN tolbox)
hello everybody, i m currently trying to recognise diffrent shapes like triangles,circles, polygons etc. i hv 36x36 binary images. I m presently trying it with matlab toolbox. My network consists of 3 layers with 1296 neurons in the input and 144 in the hiddenn and 6 in the output layer. but when I tried to simulate the network with sim() function, i get this kind of error. ??? One or more output arguments not assigned during call to 'K:\Matlab\toolbox\nnet\nnet\@network\sim.m (simargs)'. Error in ==> network.sim at 183 case 2, [err,P,Pi,Ai,T,Q,TS,matrixForm] = simargs(ne...

New to MATLAB. Need help with this problem. #2
I've just ignored this 3 problems (out of 9) in my final today and I wonder someone could help me to solve these problems so I can understand how to do it. 1/ Suppose we have a job that will take 20 hours to complete, and requires the use of a special (and expensive!) type of battery. It is known from exhaustive testing that the probability one of these batteries will wear out in (exactly) one hour is 0 .1, in two hours is 0.4, in three hours is 0.3 and in four hours is 0.2. For each 5 =< n =< 20 , let Pn denote the probability that exactly n batteries will be required to finish...

problems with PCI_6024E and DAQ under Matlab !!!! need HELP !!!!!
Hi all, Here is my problem: - I want to get signal from National Instrument DAQ card (PCI-6024E) under Matlab 6.1 with Data Acquisition Toolbox 2.1. - after pluging the card into the PC, I installed drivers downloaded from NI web site (drivers version 7.6). then under matlab, I typed the following lines to see if my card is detected: >> daqregister('nidaq') ans = 'mwnidaq.dll' successfully registered. >> daqinfo = daqhwinfo('nidaq') daqinfo = AdaptorDllName: 'C:\MATLAB6p1\toolbox\daq\daq\private\mwnidaq.dll' AdaptorDllVers... Web resources about - Need help for the same problem ? - comp.soft-sys.matlab Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

Chinese wisdom for Middle East problems
Chinese wisdom for Middle East problems The #OscarsSoWhite Problem Is Only the Tip of the Iceberg
... to always be the good guy, the right thing and the correct answer. However, they can’t be my safe place today because today they’re the problem. ... Complaining About Social Media? You’re Part Of The Problem.
... for following people back. If anything, this “quid pro quo” thing we’ve created on social networks is part of what has created the very problem ...

Why Iran is a problem for oil market
An Iranian oil tanker set sail for South Korea last week, heralding a new period of uncertainty for world crude prices. Epix’s ‘The 4%: Film’s Gender Problem’ Docu-Series To Debut On Intl. Women’s Day – Sundance
... small screen this spring too. Set to debut on Epix on March 8, International Women's Day, the Caroline Suh directed The 4%: Film’s Gender Problem ...

Michael Caine Speaks Out on Oscars Diversity Problem, Says Black Actors Should 'Be Patient'
Michael Caine Speaks Out on Oscars Diversity Problem, Says Black Actors Should 'Be Patient'

Flint: Playing The Blame Game Won't Fix The Problem
When things go wrong, blame and well as solutions begin with people at the very top. Such is the case with the water supply for the city of Flint, ...

Resources last updated: 1/26/2016 5:12:19 AM