Community Profile

Contact

Top 5% contributor

Say I have a vector of data x and a function f(x). Now say I want to evaluate f(x) only for x>2, so I do: ind=x>2; y=f(x(...

3 Answers

0

Asked 3 years ago

Instead of comparing strings, which is slow and complicated, why not just compare the numbers? If you have an array of numbers ...

77421 views

Responded 4 years ago

Basic examples of using trapz and quad

6 downloads

4 years ago

I have several functions and scripts that either: - output cell arrays of vectors OR matrices - operate on cell arrays of ve...

1 Answers

1

I am finding that the delaunay() function causes long edges to be formed near to the boundries of my triangulation. These are...

2 Answers

Thanks for the advice - that settles that matter. Since I can't have a single licence work for multiple accounts, I'll just sti...

8914 views

I have two main user accounts on my Windows 7 laptop: a standard user account and an administrator account. I try to avoid usin...

Posted 4 years ago

Thanks for the suggestions. I'll have to work out how to do your suggestion for data that is unknown before the plotting, so I'...

7992 views

Is the syntax for this: set(gca,'XTickLabelMode','manual') Because it doesn't seem to have worked. The exponent is still th...

In any ordinary 2D x-y plot, MATLAB will automatically add "x10^n" exponent labels to the axis if the plotted data is large enou...

This is a pretty general request! The best method will depend heavily on what kind of sounds you are analysing, how fast you ne...

5946 views

Having thought about this a little, I think my previous post asked somewhat of a silly question. Since the triangulation is jus...

5440 views

Thank you John for your wonderful comments and entertaining my ignorance for so long already. I shall definitely investigate wa...

John D'Errico" <woodchips@rochester.rr.com> wrote in message ---------------------------------------------------------------...

Thank you very much for you insightful comments. I had actually wondered about using a "(mean height) * (area)" type method as ...

Hmm, it seems my problem was because dblquad may at times evaluate the function passed to it with vector x and scalar y. This i...

As an example, say I have: z=cos(x)+cos(y) and I want to find the volume under the surface z for -1<x<1 , -1<y<1. With dblqua...

Say I have some smooth, single valued 2D function that goes like y=f(x) or some equivalent 3D function z=f(x,y), but I only know...

It's usually a good idea to plot your functions to check they "look" right. If all else fails then you can at least estimate th...

5346 views

If you have trouble getting the .m files from my previous link, they are now on the File Exchange at the following address: htt...

Stephen is right, using the two-argument input into trapz means you don't have to specify the step length yourself. I had only ...

Further to my previous post I have made some .m files for both the quad and trapz methods, for the functions in your original po...

OK, I have some general observations, hopefully these will help you. (1) The functions you have in your trapz method and those...

OK, I took another look and noticed the following error. The function files are written like this, yes? function y1=funct1(t,a...

I politely suggest you read up about using functions - it's pretty fundamental to using MATLAB. Type "doc function" at the comm...

Yeah, I've just seen a mistake there - that sould be t=[0.1,0.2... etc.] since you always want to use 0 as your lower bound you ...

Your two functions are, written out in full: Since these functions are known and continuous, the best way to get an accurate v...

Roger, I haven't read through all the discussion here so I might be jumping the gun a bit with this suggestion but hopefully it...

4314 views

Yes, that's it. Thanks, Doug.

3598 views

Responded 3 years ago

Quite right, apologies Nasser. Here is an example of the kind of cell array I'm working with. ID={'_string1'; '_string2'; '_st...

Load more