f

#### cramer using matlab

```i am a new user for matlab
i dont know how to solve this proplem in my HW:
using cramers rule solve the following simultanous equations in 4 unkowns. Use matlab tp perform your calculations
X2+X3+X4=1
X1+X3=1
X1+X2+X3+X4=1
X1+x4=1

HERE IS MY TRY:
i wrote a function in M file ant that is it :
function X=cramer[A,B]
P=det(A);
[n,n]=size(A)
for j = 1 : n
Q=A;
Q(:,j) = B
X(j)=det(Q)/P
end
X=X';

when i go tl command window and write A and B
i got an error :

>> A=[0 1 1 1; 1 0 1 0; 1 1 1 1; 1 0 0 1];
>> B=[1;1;1;1];
>> x=cramer(A,B)
??? Error: File: C:\MATLAB7\work\cramer.m Line: 1 Column: 18
Unbalanced or misused parentheses or brackets.

i dont know why is this error ????
can u help me fast ?
bec. the submet is tomorrow
thanq
``` 0 3/17/2010 3:57:07 PM comp.soft-sys.matlab  211266 articles. 23 followers. 2 Replies 586 Views Similar Articles

[PageSpeed] 23

```"Abdullaziz H" <abdullaziz_2@hotmail.com> wrote in message <hnqu4i\$7o6\$1@fred.mathworks.com>...
> i am a new user for matlab
> i dont know how to solve this proplem in my HW:
> using cramers rule solve the following simultanous equations in 4 unkowns. Use matlab tp perform your calculations
> X2+X3+X4=1
> X1+X3=1
> X1+X2+X3+X4=1
> X1+x4=1
>
>
> HERE IS MY TRY:
> i wrote a function in M file ant that is it :
> function X=cramer[A,B]
> P=det(A);
> [n,n]=size(A)
> for j = 1 : n
>     Q=A;
>     Q(:,j) = B
>     X(j)=det(Q)/P
> end
> X=X';
>
> when i go tl command window and write A and B
> i got an error :
>
>
> >> A=[0 1 1 1; 1 0 1 0; 1 1 1 1; 1 0 0 1];
> >> B=[1;1;1;1];
> >> x=cramer(A,B)
> ??? Error: File: C:\MATLAB7\work\cramer.m Line: 1 Column: 18
> Unbalanced or misused parentheses or brackets.
>
>
> i dont know why is this error ????
> can u help me fast ?
> bec. the submet is tomorrow
> thanq

Hi, without commenting on the rest of the code:
You have written cramer[A,B]
you need cramer(A,B)

Wayne
``` 0 3/17/2010 4:13:06 PM
```thanq ..
ur replay was very usefull
i solved the proplem
``` 0 3/17/2010 4:37:24 PM Similar Artilces:

slow optimization using nonlcon with GA within matlab toolbox and mixed integer problem using GA within Matlab
greeting all, i'm using nonlcon(nonlinear inequality constraint) with GA from the toolbox provided by matlab. does anyone notice the extreme slowlness in evaluating nonlinear constraint as compared to other linear constraint? my problem for nonlinear constraint is as follow c(1)=x+y^2-2*ones(N,1) where x and y are Nx1 vector. which means if N increases, the size of constraint increases. and to clarify, the min problem is sometime like min c'z where z=[x;y], which means x and y are some range of variable within z(just a matter of problem formulation) well, is there anyone with other alternative or is it possible or method in including non-linear constraint directly to fitness function? (well, actually nonlcon deals nonlinear constraint by using Augmented Lagrangian Pattern Search from what i see from the help file, or am i wrong?) and one more question, is there anyone that attempt to attempt to apply mixed integer problem into the GA in matlab? For now, i can only switch before pure integer or pure real number problem, but not mixed at the moment. I will be trying to add in some repair operator to fix up the variable that needs to be integer and other remaining in real number. I'm not sure why you are using ga to solve your problem. Did you find fmincon unsatisfactory in any way? Alan Weiss MATLAB mathematical toolbox documentation On 5/10/2011 11:53 PM, terry wrote: > greeting all, > > i'm using nonlcon(nonlinear inequality constraint)...

matlab use
suggest me the online tutorial of MATLAB . On 2/27/2012 2:06 AM, azim kumar wrote: > suggest me the online tutorial of MATLAB . Best way to learn any language is to solve a simple problem you are familiar with. This way you know what the answer should be, and it is a matter of coding it to obtain the answer, and you'd have a goal to work for. Matlab itself has many on-line tutorials. Help->Online tutorials. --Nasser ...

Matlab engine with matlab R2010b
Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit)
What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit) I’m trying to import historical prices of stock data. Matlab keeps cutting off the header of each column; it gives me only values. I am thinking that this is a data-type-mixing-issue, or whatever it’s called. I have ‘Dates’ in ColumnA, and ‘MSFT’, ‘PWER’, ‘KO’, and ‘SBUX’, in ColumnB-ColumnE. Basically, if I put the Excel file in my Matlab folder and double-click the file, I see the values in a matrix (no dates and no headers), I hit ‘Next’. Then, I see only one option; one radio button is enabled – ‘Create variable matching preview’. The other two options, ‘Create vectors from each column using column names’ and ‘Create vectors from each row using row names’ – both are greyed out. I’ve seen videos, on YouTube and on the Matlab site, where people import excel data and these options are NOT greyed out. No matter what I do, there options are ALWAYS greyed out. The problem is, when I click ‘Finish’ in my ‘Workspace’ I have a variable named ‘data’ all values in a 575x4 matrix, but I have NO DATES and I have NO HEADERS on the columns. All of this seems to go into another variable, called ‘textdata’; all dates and headers ate in textdata. This is VERY inconvenient. I’m trying to analyze some stock data and I have no headers, so I have no idea which stock is which (I can figure it out, but I think Matlab should do this for me). Also, I have no dates corresponding to ...

Spawning matlab from within matlab
Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

Shall i use the misrosoft Visual c++ code from a m-file generated from matlab in Visual C++ with out matlab runtime environment
undefined ...

soft decoding of conv. codes using vitdec matlab func. #2
Hello, Isnt 'unquant' and 'soft' options essentially same?..in both case vitdec takes in "real numbers" as input (ok they are "mapped" in case o 'soft' option)..so can we not use 'unquant' option to carry out sof decoding?...my preliminary results show that 'unquant' option give me 2- db gain over hard decoding... any one having insight please let me know. thanks >Hello, > Isnt 'unquant' and 'soft' options essentially same?..in both cases >vitdec takes in "real numbers" as input (ok they are "mapped" in case of >'soft' option)..so can we not use 'unquant' option to carry out soft >decoding?...my preliminary results show that 'unquant' option give m 2-3 >db gain over hard decoding... >any one having insight please let me know. >thanks > > %%% Yes , u can use 'unquant' as soft decoding. try to implement for k=3 i.e [5 7] and BPSK and at roughly 4 dB u should get BER of 10^-3. Chintan ...

What code does matlab use for Matrix multiplication? Does it use Strassen?
I am getting unexpectedly fast results using matlab's matrix multiplication and I am wondering if it is doing something besides straight multiplication, such as using strassen's algorithm. I am benchmarking the matrix multiply at over 30 GigaFlops on my cpu, however, I am running only one thread (using -singleCompThread at startup), and my computer is 2.25 Ghz. Since I am doing single precision, SSE instructions allow 4 multiplies or adds per instruction, this allows 9 Gigaflops. Most computers can execute multiple instructions at once, however I know from my own tests, and consulting the intel manual: http://www.intel.com/content/dam/doc/manual/64-ia-32-architectures-optimization-manual.pdf (table C-10 and C-10A) that my computer can do at most 2 floating point operations in one cycle. This puts the theoretical maximum bound at 18Gigaflops, yet MATLAB seems to give much higher performance. How can this be? Below is my code that I tested with sz=2.^(0:12) for s=1:numel(sz) A=rand(sz(s),sz(s),'single'); tic; A'*A; t=toc; fprintf('sz=%d, time=%3.3gms, GFlops=%3.3g\n', sz(s), t*1000, 2*size(A,1)^3/1e9/t) end OUTPUT sz=1, time=0.0457ms, GFlops=4.37e-005 sz=2, time=0.0199ms, GFlops=0.000803 sz=4, time=0.00634ms, GFlops=0.0202 sz=8, time=0.0086ms, GFlops=0.119 sz=16, time=0.0086ms, GFlops=0.952 sz=32, time=0.029ms, GFlops=2.26 sz=64, time=0.0503ms, GFlops=10.4 sz=128, time=0.268ms, GFlops=15.7 sz=25...

embedded matlab function MATLAB R2009a
I downloaded the MS visual C++ 2008 Express Edition and the SDK as detailed in http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L My embedded function didnt work at the beginning because I did "mex -setup" before I installed my SDK. But after I installed the SDK, I ran "mex -setup" in Matlab once again and choose the MS visual C++2008 as my compiler. Then, my embedded matlab function worked. Thanks to the contribution from above! ...

Environmental Modeling Using MatLab and Econometric Analysis Using Stata
This three month long course introduces the use of MatLab for Environmental Modeling and leads to develop advanced level comprehensive skills in both Environmental Modeling and use of MatLab. The course also introduces the basic and advanced Econometric Modeling in the area of Environmental Economics and using Stata. The course is aimed towards Environmental Economists, Environmental Practioners, Students and faculty to develop hands on Environmental Modeling, MatLab, Econometrics and Stata. There is dire need for such course in the realm of today=92s fast moving Technological era and development of new models and theories to understand, apply and extend. This course helps in these dimensions. The course starts on May 20, 2012. Live class and interactive discussion 5 Days a Week, 2 Hours A Day Lectures Last Date to Register: April 30, 2012 Main topics to be covered are: 1. Fundamentals of Modeling, Principles and MATLAB 2. Transport Solutions 3. Transport with Decay and Degradation 4. Transport and Kinetics 5. Transport and Equilibrium Reactions 6. Ordinary Differential Equations =96 Dynamical Systems 7. Parameter Estimation 8. Flow Modeling 9. Groundwater Drawdown by Pumping 10. Aquifer Base flow and 2D Meshing 11. Potential and Flow Visualization 12. Stream function and Complex Potential 13. 2D and 3D Transport Solutions (Gaussian Puffs and Plumes) 14. Image Processing and Geo-referencing 15. Compartment Graphs and Linear Systems 16. Non...

using MODIS images to map ocean color using m_map in Matlab
I am trying to use image codes from http://oceandata.sci.gsfc.nasa.gov/MODISA/Mapped/Monthly/4km/chlor/ in ordor to create a figure of the DE, NJ, MA, and MA coastlines. I need to plot this data into a matlab image that had the high resolution data from m_map. Can anyone help me with the code? ...

why so many people use Matlab and much fewer people use Mathematica?
I tested the speed of Matlab 6.5 and Mathematica 8.0, Matlab used 4500 seconds to execute the program and mathematica used 6000 seconds, it seems the difference between Matlab and mathematica is not big, why so many people use Matlab and much fewer people use Mathematica? On 2/20/2012 6:09 AM, Liwen Zhang wrote: > I tested the speed of Matlab 6.5 and Mathematica 8.0, Matlab used 4500 > seconds to execute the program and mathematica used 6000 seconds, it > seems the difference between Matlab and mathematica is not big, why so > many people use Matlab and much fewer people use Mathematica? As was noted in the thread in comp.lang.fortran where you posted the "test", it was a terribly poorly chosen benchmark code--w/ optimization, Fortran was able to completely optimize away the constant, unused expression and the proposed Mablab comparison would _not_ be the way in which Matlab code would be written, either. The answer to the questions you're posing are probably "49". -- On 2/20/2012 8:14 AM, dpb wrote: > > As was noted in the thread in comp.lang.fortran where you posted the > "test", it was a terribly poorly chosen benchmark code--w/ optimization, > Fortran was able to completely optimize away the constant, unused > expression and the proposed Mablab comparison would _not_ be the way in > which Matlab code would be written, either. > In general, comparing run-time speed of programs written in inte...

Environmental Modeling Using MatLab and Econometric Analysis Using Stata #2
This three month long course introduces the use of MatLab for Environmental Modeling and leads to develop advanced level comprehensive skills in both Environmental Modeling and use of MatLab. The course also introduces the basic and advanced Econometric Modeling in the area of Environmental Economics and using Stata. The course is aimed towards Environmental Economists, Environmental Practioners, Students and faculty to develop hands on Environmental Modeling, MatLab, Econometrics and Stata. There is dire need for such course in the realm of today=92s fast moving Technological era and development of new models and theories to understand, apply and extend. This course helps in these dimensions. The course starts on May 20, 2012. Live class and interactive discussion 5 Days a Week, 2 Hours A Day Lectures Last Date to Register: April 30, 2012 Main topics to be covered are: 5. Fundamentals of Modeling, Principles and MATLAB 6. Transport Solutions 7. Transport with Decay and Degradation 8. Transport and Kinetics 9. Transport and Equilibrium Reactions 10. Ordinary Differential Equations =96 Dynamical Systems 11. Parameter Estimation 12. Flow Modeling 13. Groundwater Drawdown by Pumping 14. Aquifer Base flow and 2D Meshing 15. Potential and Flow Visualization 16. Stream function and Complex Potential 17. 2D and 3D Transport Solutions (Gaussian Puffs and Plumes) 18. Image Processing and Geo-referencing 19. Compartment Graphs and Linear Systems 2...

Does MATLAB use PVM?
Hi all, Does MATLAB use PVM (Parallel Virtual Machine) library in its parallel products? (Parallel Computing Toolbox and MATLAB Distributed Computing Server) Thank you! ...

use scanner with matlab
hello i want to use my cannon scanner with matlab, how can i send a SCAN command directly from matlab? thx yossi ...

Matlab parallel for loop or Matlab open pool
I am trying to to some computations and I would like to do it in parallel using parfor or by Opening the matlabpool.. as the current implementations is too slow: result=zeros(25,16000); for i = 1:length(vector1) % length is 25 for j = 1:length(vector2) % length is 16000 temp1 = vector1(i); temp2 = vector2(j); t1 = load(matfiles1(temp1).name) %load image1 from matfile1 t2 = load(matfiles2(temp2).name) % load image2 from matfile2 result(i,j)=t1.*t2 end end It work fine but I would really like to know if there is a way to speed thing up ... Thanks a lot in advance! ...

sound using matlab
Hi I have an input vector which has a set of values. I need to have an output of two distinguishable sounds i.e one sound from index 1 to 5 and another sound from index 5 to 10 ? how do I proceed ? "Sakthivel" wrote in message <jjd9kl\$3ec\$1@newscl01ah.mathworks.com>... > Hi > I have an input vector which has a set of values. I need to have an output of two distinguishable sounds i.e one sound from index 1 to 5 and another sound from index 5 to 10 ? how do I proceed ? http://www.mathworks.com/help/techdoc/ref/wavread.html http://www.mathworks.com/help/techdoc/ref/sound.html x = repmat([ 1 2 3 1 2]',33); x = reshape(x,1,165*33); z = repmat([ 1 3 4 5 4 3 1]',33); z = reshape(z,1,231*33); if(index>=1 && index <=5) sound(x/5, 8192); elseif(index>=6 && index <=10) sound(z/5, 8192); else error('improper index value'); end ...

using Line in in Matlab

Matlab Toolboxes used
After code has been written, Is there a way to check which toolboxes have been used? I receive p-code to run on my system from academics who have access to all toolboxes. Thank-you ...

using matlab in ADC
am trying to run the matlab program below,but when i get to the biquant part after typing in end it gives me an error report like; ??? Undefined function or method 'biquant' for input arguments of type 'double'. someone help. clear all; close all disp('Generate 0.02-second sinewave of 100 Hz and Vp=5'); fs = 8000; %sampling rate T = 1/fs; %sampling interval t = 0:T:0.02; sig = 4.5*sin(2*pi*100*t); bits = input('input number of bits=>'); lg = length(sig); for x = 1:lg [Index(x),pq] = biquant(bits,-5,5,sig(x)); %Output the quantized index end %transmitted %recieved for x = 1:lg qsig(x) = biqtdec(bits,-5,5,Index(x)); end qerr = qsig - sig; %Calculate the quantized errors stairs(t,qsig);hold %Plot the signal in a staircase style plot(t,sig);grid; xlabe('Time (sec.)');ylabel('quantized x(n)') disp('Signal to noise power ration due to quantization') snr(sig,qsig); On Oct 2, 7:29=A0am, "kumbirayi " <knyachioj...@gmail.com> wrote: > am trying to run the matlab program below,but when i get to the biquant p= art after typing in end it gives me an error report like; > ??? Undefined function or method 'biquant' for input arguments of type > 'double'. > someone help. > clear all; close all > =A0disp('Generate 0.02-second sinewave of 100 Hz and Vp=3D5'); > =A0fs =3D 8000; %sampling rate > =A0T =3D 1/fs; %sampling interval...

code of matlab 7a not working in matlab 2009
I wrote a code in matlab 7a andand it was working over there then i changed computer which was having matlab realease 2009a and it is not working If i install Matlab 7 release 14, will my code work again thanks "moonman" wrote in message <ipmsl7\$23v\$1@fred.mathworks.com>... > I wrote a code in matlab 7a andand it was working over there > then i changed computer which was having matlab realease 2009a and it is not working > > If i install Matlab 7 release 14, will my code work again thanks Can you be more specific about the fact that your code is not working in 2009a but worked in 2007a? It would be helpful if you could narrow down what is not working in 2009a and provide error messages. Wayne ok thanks wyne i will send error message after some hours ...

DTMF using MATLAB
Can any body help me in writing code of following problem in MATLAB :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::= =AD:::::::::::::::::::::: Design digital oscillators for DTMF frequencies at sample rate of 22500 sp/sec Generate a seven digit DTMF using Digital Oscillators and write it in a wav file haroon.khalil@gmail.com wrote: > Can any body help me in writing code of following problem in MATLAB > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::�:::::::::::::::::::::: > > Design digital oscillators for DTMF frequencies at sample rate of 22500 > > sp/sec > Generate a seven digit DTMF using Digital Oscillators and write it in a > > wav file > Which part are you having difficulty with ? Paul Fs = 22.5 kHz There are two DTMF frequencies F1 = [L0 L1 L2 L3] % four low frequencies F2 = [H0 H1 H2 H3] % four frequencies ocillator coefficients for example for L0 numerator = 1 denominator = [0.5 -cos(2*pi*L0/Fs) 0.5] When you want to generate you input an impulse, also you need to adjust in order to get the desired amplitude value. An expert here might point out a better way help wavwrite cheers ...

Using Refprop with MATLAB
Hello.. I am working on a project needing Refprop to be interfaced with MATLAB. I have been trying to interface Refprop with MATLAB. But not luck. I am using MATLAB 7.10.0 (R2010A). and Refprop 7. I have the .F90 file .... when I try to compile it with mex command I am getting the following error lcc preprocessor error: refpropm.f90:103 Unterminated string or char const lcc preprocessor error: refpropm.f90:172 Unterminated string or char const Error refpropm.f90: 1 unrecognized declaration Error refpropm.f90: 1 syntax error; found `.' expecting `;' Error refpropm.f90: 1 skipping `.' Error refpropm.f90: 2 syntax error; found `!' expecting `;' Error refpropm.f90: 2 unrecognized declaration Error refpropm.f90: 2 `2standard' is a preprocessing number but an invalid integer constant Error refpropm.f90: 2 syntax error; found `2standard' expecting `;' Error refpropm.f90: 2 unrecognized declaration Error refpropm.f90: 2 unrecognized declaration Error refpropm.f90: 2 syntax error; found `then' expecting `;' Error refpropm.f90: 2 syntax error; found `one' expecting `;' Error refpropm.f90: 2 syntax error; found `property' expecting `;' Error refpropm.f90: 2 syntax error; found `can' expecting `;' Error refpropm.f90: 2 syntax error; found `be' expecting `;' Error refpropm.f90: 2 syntax error; found `requested' expecting `;' Error refpropm.f90: 2 synt...

Contribute to MATLAB Central and Win a MATLAB Jacket
Many of you who post to this newsgroup are also regular contributors to the MATLAB Central File Exchange. Look for your favorite contributors on our File Exchange Author Profile page. You can read their profiles and see pictures: <http://www.mathworks.com/matlabcentral/reports/fileexchange/allProfiles/> In a random drawing, we recently awarded MATLAB jackets to three File Exchange authors with profile pages: Michele Giugliano, Andrey Egin, and Denis Gilbert. You can win a jacket, too. Just submit a new file to the File Exchange or update your author profile by December 2003 for a chance to win one of four MATLAB jackets. See the jacket below: <http://www.mathworks.com/matlabcentral/images/jeff3.jpg> Here are some interesting File Exchange facts: - Since its inception in 2001, visitors have downloaded more than 1.25 million submissions from the File Exchange. - In September 2003 alone, visitors downloaded 80,085 files, an average of 2670 a day! .... what if the prize was a free copy of the next version of Matlab :-) majb Min Poh wrote: ....or an offer for employment... aj "bourassa" <bourassa-m@rmc.ca> wrote in message news:3f9d507d\$1@rmcnt03a.rmc.ca... > ... what if the prize was a free copy of the next version of Matlab :-) > > majb > > Min Poh wrote: > ... Web resources about - cramer using matlab - comp.soft-sys.matlab

I'm a graduate of Sonoma State University (M.A., History, 1998), softwareengineer, and author. The titles of my books and publications appear ...

Blog for Cramer & Associates Fundraising
The blog of Cramer & Associates who helps with fundraising, campaign planning and management for not-for-profits, churches, education, arts, ... Kudlow & Cramer - Wikipedia, the free encyclopedia
Kudlow & Cramer was a CNBC American business and politics television program with conservative Lawrence Kudlow and liberal Jim Cramer . The program ...

Clayton Cramer's Blog
O.C. Sarah Smith Crawford had no Cherokee heritage, was listed as "white" in the Census of 1860, and was most likely half Swedish and half English, ... Jim Cramer Bullish On Facebook
Jim Cramer of CNBC and The Street enthusiastically clicked the like button when it came to Facebook, praising the social network in a video posted ...

Dear Congressman Kevin Cramer ... - Congressman Kevin Cramer - Facebook
Dear Congressman Kevin Cramer Matthew 25:36-43 The Message (MSG) 34-36 “Then the King will say to those on his right, ‘Enter, you who are blessed... ...

Jim Cramer (@jimcramer) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Jim Cramer @ jimcramer New ... Jim Cramer: My First Big Break - YouTube
You may know him for his stock-picking strategies, staying ahead of the bulls, and out of the way of the bears. But Jim Cramer's big break happened ... Jim Cramer's inspiring words on how to come back from a beatdown
VIDEO: At Business Insider's 2015 IGNITION conference, CNBC's Jim Cramer shared how he recovered from a major setback on national television ...

Resources last updated: 3/30/2016 10:26:57 PM