Ken & Mike on the MATLAB Desktop

March 31st, 2008

Help us help you

If you are a regular reader of this blog, you are probably already aware that we monitor your comments closely. In fact, we’re always looking for ways to get feedback from MATLAB users. Along with the great feedback we get through technical support and our user surveys, we’re continually checking the file exchange and the MATLAB Newsgroup for your ideas.

Our documentation group is just as interested in hearing from you as our developers are. Starting with R2007b, nearly every page in the Help browser includes links to a feedback form at the top

and bottom

of the page. The online documentation on our web site contains links to the same feedback form.

You can be as specific as you want about the page you’re commenting on - the form keeps track of which page you were viewing when you clicked on the feedback link. Or, if you couldn’t find what you were looking for, feel free to give us feedback about the page on which you expected to find a topic. Each request will be routed to the appropriate writer and taken into consideration for the documentation of the next release. If you include your email address in your feedback, you can expect to hear back from the writer with any comments or questions they might have, as well as a summary of any action they are taking as a result of your feedback.

So, if you couldn’t have done your job without our documentation, let the writer know. If you think you have an example that’s even better than the one we provide, we want to know about that too. We’ve already gotten lots of good feedback from you; nearly half of the comments we have received have directly resulted in improvements and corrections in our documentation. You’ve shown us that you can make our documentation better, and we want you to keep it up. Our documentation team looks forward to hearing from you!

11 Responses to “Help us help you”

  1. IHateMyProfessor replied on :

    I would like to know how I can set a number(s) using the “input function” that states the wanted amount of numbers, as well use a “FOR_loop” & “ramdom number generator” to add each individual generated number to its own variable. So those variables can be distinguised between and possibly added together. Thank you, and I hope the description of the problem is clear.

    IHateMyProfessor

  2. Mike replied on :

    IHateMyProfessor,

    It’s unfortunate to have a teacher who inspires such negative emotions in a student. You should consider taking a different class. In response to your question, I am not sure what your algorithm is, exactly. I find it easiest to write the algorithm down in words on paper first and then translate it to a program. If you are having trouble with the MATLAB syntax, I recommend asking the MATLAB newsgroup (click the link at the top of this page) or Google. If you need help with functional programming, I recommend talking to your TA or a professor you do get along with.

    Good luck.

  3. laura replied on :

    Hi - question about summing variables in 150 by 1 vector (called E). I am trying to do one of 2 things:
    either (a) Find the sum of all elements at a certain interval. Example, sum of E(1)+E(31)+(E61) etc. and put that value in either a row or column.
    or (b) Change my 150 by 1 vector into a matrix of 30 rows and 5 columns such that E(1,1) is put into spot in the matrix (1,1) and then E(row = 2,col = 1) is put in the matrix at (row = 1, col = 2) and so on.

    Any help you can offer would be great - thanks!

  4. Mike replied on :

    Laura,

    MATLAB allows for vector indexing, so you could do (a) with:

    >> sum(E([1,31,61]))

    For (b) you should consider the reshape function.

    These kinds of things are covered all the time on Loren’s blog and not normally covered or answered by us. The comp.soft-sys.matlab newsgroup is a good resource for these types of questions as well. Click the “Newsgroup” link at the top of this page.

  5. jessica replied on :

    I am writing a program and I want to know how to write an integral. I want to put S=2*pi*(integral of r*dz between 0 and R) if you could help that would be great. Thanks

  6. Chanel replied on :

    Hi, a question about arrays???
    Create an M-by-N array of random numbers (use rand). Move through the array,
    element by element, and set any value that is less than 0.2 to 0 and any value that is
    greater than or equal to 0.2 to 1

    If you could help that would be great. Thanks

  7. Mike replied on :

    Chanel,

    This would be a great question for the MATLAB newsgroup: comp.soft-sys.matlab.

    You should think about this the MATLAB way, which is to use vector indexing to access the matrix, rather than by element. So,

    x = rand(2,3)
    x(x<0.2)=0
    x(x>=0.2)=1
    % or
    x(logical(x)) = 1
    x =
    
        0.9572    0.8003    0.4218
        0.4854    0.1419    0.9157
    
    x =
    
        0.9572    0.8003    0.4218
        0.4854         0    0.9157
    
    x =
    
         1     1     1
         1     0     1
    
    x =
    
         1     1     1
         1     0     1
    
  8. Pravin replied on :

    Hi guys, I use the Help Browser quite frequently as I try out new functions in MATLAB. I am using the r2009a version, and would like to know if there is anything I can put in the startup.m file to have the helpbrowser appear in a closed tab next to my command window. I saved the required arrangement as a custom desktop layout, but I don’t know if there is any way to make it the default one.

    Also, Chanel, you may have moved on to more interesting things, but I believe the im2bw() function should work admirably in this case.

  9. Scott Hirsch replied on :

    Pravin - You can almost get this by putting a call to

    doc

    in your startup.m file. This forces the doc open in the last place you left it. The only problem is that it brings it to the front, so you would need to click on the command window to bring it back to focus.

  10. Yair Altman replied on :

    Pravin/Scott - you can use the built-in commandwindow function to programmatically bring the Command Window into focus following the doc command.

    commandwindow is a fully supported and documented function, although internally it uses undocumented/unsupported functionality.

  11. Pravin replied on :

    Thanks so much Scott and Yair. doc followed by commandwindow works out exactly as I want on the Linux version of MATLAB at school. Will try it out on the Windows version at home, though I don’t see why it should be any different.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Ken & Mike work on the MATLAB Desktop team.
  • DP: Hi i have a problem with ezplot3, i want to plot more than i curve in the same graph but hold on command...
  • Ken: Hi Arsalan, Unfortunately there is no way to get the new Editor API in older versions of MATLAB. -Ken
  • Arsalan: Hi, I am very excited about the MATLAB API for editor because right now i am working on a project and i need...
  • Johannes: Since I started using matlab-emacs some days ago I never experienced Emacslink. But I experienced some...
  • Francisco J. Beron-Vera: Hi all, I have recently learned about ViEmu (http://www.vimemu.c om) which, for Vi/Vim...
  • OysterEngineer: When I first learned of the Publish feature in MatLab, I thought it might be useful to help to...
  • Ken: Hi Herve, I’m not quite sure what you mean by “stand-alone&# 8221; mode? -Ken
  • Herve: I wonder when the publish fonction will be supported in standalone mode.
  • Mike: Ravi, What you described should work as far I understand it. Please follow up with technical support. With a...
  • Mike: @Daniel, Thanks for that note.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.