Sources on this Page

> Headlines by Category

 Home / Science / Mathematics

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

How do I create a row vector containing odd integer numbers between 1900 and 2016 by using linspace?
Re: What an idiotic decision!
Petr Krysl" wrote in message <o63c4j$rjs$1@newscl01ah.mathworks.com>...

> I wonder if I can get through this time: By this change MathWorks is forcing thousands of users to go back and implement error checking that was previously provided by a well-established and widespread design decision in Matlab.

We haven't change a single line of our codes, and I don't think we ever do, since we have specified how our programs should be call - for external users, and they are all called correctly internal users.

We don't intend to handle BUGs consistently.

I'll stop to "discuss" further, I think I understand your points of view.
Re: What an idiotic decision!
Paul" wrote in message <o634gr$ard$1@newscl01ah.mathworks.com>...
> What they've done is changed how core operators work and possibly break user code bases to provide a capability that was already provided, depending on the particular use case, via repmat, bsxfun, expansion through indexing, etc. I suppose it's possible that the new implementation is more efficient than any of those approaches, but I haven't seen any data.
> For those users who have been relying on the previous implementation for the last 25-30 years, what are they supposed to do? Go scrub all of their code and search for all instances of every operator that now implements implicit singleton expansion and deal with each instance individually?
> At a minimum, TMW should have added preferences to allow users to either turn off this new feature or generate a warning or error when the implicit expansion is applied, and keep this around for the next few releases (with a note that this preference is deprecated if they ultimately want to get to where things are today (specified behavior, no option for warning/error). But to just drop this on everyone ....


You stated the main problems with this issue very well. Thanks.

patternsearch: Different step sizes for different variables
I'm trying to minimize a function that takes many variables using patternsearch.
Each variable has its own valid search domain and precision.
Does paternsearch use the same step size for all variables?
How do I set the minimum step size of each variable separately?
Right now it is using an excessively small step size for some variables.

Use a function to determine the angle between vectors of finite dimensions and returns an error message otherwise
      So I got a homework problem like this, I googled for the solution and I found a couple ways to do it. However, my professor wants students to do it with a function, and function is extremely confusing to me. (I'm extremely new to MATLAB.)

Here's my code:
      u = [x1 y1 z1];
      v = [x2 y2 z2];
 function y = ThetaInDegrees(x1,y1,z1,x2,y2,z2)
     CosTheta = dot(u,v)/(norm(u)*norm(v));
     ThetaInDegrees = acosd(CosTheta);

I saw some posts in Mathworks and the code inside this function works, but I have no idea how to make it work inside a function. Moreover, how to return an error message if one/two vector(s) is(are) not finite-dimensional?

      I'd really appreciate if someone can provide a detailed explanation on how to revise my code...we don't have a MATLAB textbook in this class, the professor told us to go to the TA for all coding problems, but the TA got answers wrong every time, I'm not exaggerating. Thanks in advance.
Re: angles in a triangle
Gregory" wrote in message <jk0f5d$52l$1@newscl01ah.mathworks.com>...
> "Roger Stafford" wrote in message <jk07dq$api$1@newscl01ah.mathworks.com>...
> > "Gregory" wrote in message <jjvuh5$90o$1@newscl01ah.mathworks.com>...
> > > "Gregory" wrote in message <jjvsf5$1ht$1@newscl01ah.mathworks.com>...
> > > > ......
> > > > 1 5
> > > > 1 2
> > > > 2 4
> > > >
> > > > and the angles i got (in degrees) ans =
> > > >
> > > > 45.0000 26.5651 108.4349.
> > > >
> > > > but when i plotted the graph, none of the angles were > 90 degrees.
> > > .......
> > > A1 = atan2(abs(det([V2-V1;V3-V1])),dot(V2-V1,V3-V1))/pi*180;
> > > A2 = atan2(abs(det([V3-V2;V1-V2])),dot(V3-V2,V1-V2))/pi*180;
> > > A3 = atan2(abs(det([V1-V3;V2-V3])),dot(V1-V3,V2-V3))/pi*180;
> > - - - - - - - - - -
> > You've got the right formula and moreover your angles are correct. It's your plotting that is at fault. That third angle is actually an obtuse, not acute, angle. It is greater than ninety degrees. It has to be so that the three angles can sum to 180 degrees. Try plotting it again very carefully on a larger graph.
> >
> > Roger Stafford
> Ah Drats!
> thanks so much for the help Roger! I just realised the scale of the axes were different hence the graph was skewed.

Indeed its important to make the axis equal; after this the angles appear correct when measured with a protractor

in matlab
axis equal;
Re: Partition Based Clustering
Joshua Carmichael" wrote in message <hd1usq$ejg$1@fred.mathworks.com>...
> I need to compute a partition based clustering between a large set of signals.
> My similarity metric uses the normalized cross-correlation coefficient. So for M signals, I have an MxM matrix of coefficients, which I generically call rho.
> I would like to find the clusters of signals which *mutually* correlate above a given threshold: That is, *all* signals within the cluster must correlate with each other above rho.
> Any m-file function recommendations? Any suggestions would be appreciated.

Dear Joshua,

Did you ever succeed in finding a good solution to your problem. I have the same type of problem.

Best regards,
Re: imread "file does not exist" error matlab R2010a
Aydos R" wrote in message <i3csbk$isv$1@fred.mathworks.com>...
> thank you for replying...I will try your solution recommendations...
> but the thing is ... first 7 jpg files can be read properly...just the last image gives error...I thought it is about timing...I tried to pause 3secs and wait for the crop function for writing image...then "msr_hough" function will have time to "dir" directory including 8 images...but it did not work...still I have the problem...when I check it step by step in debug mode...the 8th image can also be read...it is still a strange problem for me...
Re: voice recognition, matlab coding
M.Amin Anjum" <aminbce@hotmail.com> wrote in message <ef150f9.9@webx.raydaftYaTP>...
> I Have prepared Matlab code for voice recognation. if any body wants
> mail to me I will forword code
hi there.. Im Mohd Hanifz.. im student from enginnering electric.. can i have a code for voice recignation? or may u teach me how to learn matlab? i hope u can forward me the code.
Re: What an idiotic decision!
dpb" wrote in message <o60lov$1e8$1@dont-email.me>...

> Many have posted in the past their issues with organizations with very
> strict QC requirements; in a former life I was with one reporting to NRC
> and for anything considered under their definition as "safety related"
> we were not able to use Matlab even years and years ago owing to the
> fluid nature of the beastie; it would have required more effort to
> requalify code than manpower available.

I have involved in high quality Matlab code, and most of the time because programmer does not consider the forward compatibility of the older version and code using new feature of the newer version that breaks the backward compatibility.

Sometime using some hidden *feature* that is not documented will create problem down of the road. Using third party code (such as FEX) is also pb since no support is warranty.

If care is taken about those basic coding rule, then everything is fine.

Most of our codes developed in 10 years still run with minimal effort to update at every MATLAB release (6 months).

The biggest issue happens with R2004b where the new graphic engine slow down unacceptable some of the older codes with no real quick alternative to fix it.
Post Selected Items to:

Showing 10 items of 485

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