https://in.mathworks.com/matlabcentral/newsreader/most_recent_feed
MATLAB Central Newsreader Recent Posts
Most Recent Posts
enus
©19942017 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
https://in.mathworks.com/images/membrane_icon.gif

Wed, 26 Apr 2017 11:32:39 +0000
Re: How these codes work.
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348338#953513
dpb
On 04/26/2017 12:21 AM, Kyle Baron wrote:<br>
> I'm just trying to understand how this code comes to the answer of 10.5.<br>
><br>
> c=0;<br>
> while c<=10<br>
> if c==2<br>
> break<br>
> end<br>
> c=c+1.5;<br>
> end<br>
...<br>
<br>
Pretend you're the computer and follow thru step by step; write down the <br>
value of c every line if you have to...<br>
<br>
Or, use the debugger to do so. HINT: c _never_ ==2<br>
<br>


Wed, 26 Apr 2017 11:15:34 +0000
Re: If,elseif,else restart
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348335#953512
Loren Shure
"Wade Maxwell" wrote in message <br>
news:odp32b$7ba$1@newscl01ah.mathworks.com...<br>
<br>
This is what i am working with so far.<br>
<br>
casenum=input('Type 1 for Xaxis centroid or type 2 for Yaxis centroid of a <br>
Nth Degree Parabola.')<br>
<br>
if casenum==1<br>
b=input('Please enter the length of the parabola on the xaxis =');<br>
n=input('Please enter the degree of the parabola function =');<br>
Xc=((n+1)/(n+2))*(b);<br>
fprintf('The Xaxis Centroid is %0.2f = \n',Xc)<br>
elseif casenum==2<br>
h=input('Please enter the height of the parabola =');<br>
n=input('Please enter the degree of the parabola function =');<br>
Yc=(h/2)*((n+1)/(2*n+1));<br>
fprintf('The Yaxis Centroid is %0.2f = .\n',Yc)<br>
else<br>
fprintf('\n')<br>
disp('please choose 1 or 2')<br>
disp('This code will be ran again in a few seconds')<br>
pause(3)<br>
end<br>
<br>
My question is how to make it start over at the original question if the <br>
user chooses a number other than 1 or 2.<br>
<br>
Thanks for the help in advance.<br>
<br>
<br>
Put the check for not 1 or 2 first. With some logic...<br>
<br>
while notgoodinput<br>
input...<br>
checkinput...<br>
end<br>
<br>
then do your cases...<br>
<br>
Loren<br>
<br>
<a href="http://blogs.mathworks.com/loren">http://blogs.mathworks.com/loren</a>

Wed, 26 Apr 2017 11:12:56 +0000
Re: Undefined variable or class .
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348330#953511
Loren Shure
"James Tursa" wrote in message <br>
news:odo580$3jn$1@newscl01ah.mathworks.com...<br>
<br>
"Mark Blanchet" wrote in message <odo10v$np3$1@newscl01ah.mathworks.com>...<br>
> Hi,<br>
> I get the" Undefined variable "alkearth" or class "alkearth"." error as ? <br>
> run the below code. Help appreciated.<br>
><br>
> [fid,err]= fopen('alkearth.mat','r');<br>
> if fid==1<br>
> disp(err);<br>
> else<br>
> fprintf ('%10s %3s %6s %9s %8s %10s %6s <br>
> \n','Element','Sym','Atomic','Ionic','Melting','Density','Conduc');<br>
> fprintf ('%10s %3s %6s %9s %8s %10s %6s <br>
> \n','Name','bol','Number','radius(m)','Point(C)','(gram/cm3)','tivity');<br>
> fprintf ('%10s %3s %6s %9s %8s %10s %6s <br>
> \n','','','','','','','');<br>
> for k=1:5<br>
> fprintf('%10s ',alkearth(k).name);<br>
> ...<br>
><br>
> Many Thanks,<br>
><br>
> Mark<br>
<br>
This statement:<br>
<br>
[fid,err]= fopen('alkearth.mat','r');<br>
<br>
simply opens the file for reading ... it doesn't actually read anything. So <br>
you haven't loaded any variables from the mat file yet.<br>
<br>
That being said, you typically don't use "fopen" on mat files since they are <br>
typically binary compressed files. Just load them. E.g., replace the above <br>
line with:<br>
<br>
load alkearth<br>
<br>
<br>
James Tursa<br>
<br>
<br>
Or better yet,<br>
<br>
data = load('alkearth');<br>
Then the data contain structure fields with one per variable in your file.<br>
<br>
Loren<br>
<br>
<a href="http://blogs.mathworks.com/loren">http://blogs.mathworks.com/loren</a>

Wed, 26 Apr 2017 10:20:03 +0000
Sound
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348340#953510
mariam
Hello<br>
<br>
i want to use matlab for generating sounds in an audio experiment<br>
<br>
does anyone know how to generate sounds to different outpouts in a sound car?<br>
i wand to paly a beep that should displace randomly in 4 loudspeakers,<br>
i will be playing about 1000 stimuli, randomly distributed into the 4 loudspeakers,

Wed, 26 Apr 2017 08:48:03 +0000
Re: Psychtoolbox error "undefined function"
https://in.mathworks.com/matlabcentral/newsreader/view_thread/339704#953509
John Allen
"Trevor Dubois" wrote in message <mcr38q$ke3$1@newscl01ah.mathworks.com>...<br>
> Hi all,<br>
...<br>
> <br>
> Thus a starting step is can I check whether it is installed correctly with a command? And secondly if it is not what can I do to fix this?<br>
> <br>
.. to answer the first part of your question, what I do to test whether PsychToolbox has installed properly is to run<br>
GratingDemo <br>
as a command in the Matlab command window  if it runs ok (you'll get a stripy grey and black image in the centre of the screen) then it's usually installed ok. If not, then you'll need to read the error messages to find out what's wrong.<br>
<br>
John

Wed, 26 Apr 2017 07:23:03 +0000
Re: LaTeX Interpreter and Helvetica
https://in.mathworks.com/matlabcentral/newsreader/view_thread/114116#953508
Juan Guerrero
I have just written a tutorial on this for Matlab versions 2015b and 2016b. Feel free to download it at: <a href="http://isa.uniovi.es/~guerrero/FontExample/FontExampleFiles.zip">http://isa.uniovi.es/~guerrero/FontExample/FontExampleFiles.zip</a><br>
<br>
Regards.

Wed, 26 Apr 2017 06:42:04 +0000
Re: Command to get Z value from contour plot when [ X Y] are given
https://in.mathworks.com/matlabcentral/newsreader/view_thread/311520#953507
Jahan
"Murthy" wrote in message <j230lc$eau$1@newscl01ah.mathworks.com>...<br>
> Hi,<br>
> <br>
> Let us say I have Z values at some distinct X,Y  say(0,0) (0,10) (0,20),(0,30) ,(10,10),(10,20),(10,30). I have plotted this [X Y Z] set using contour plot. <br>
> <br>
> In this contour plot, I see interpolated values at intermediate (X,Y) locations say ( 0,2) (0,5) , (3, 14) etc. Using "Data Cursor" feature on plot, I could see Z values at all such intermediate (X,Y) points which are of my interest values . <br>
> <br>
> My problem now is: I have to get Z values from thousands of such intermediate (X,Y) points. And it is difficult for me to find Z value using 'data cursor'. How can do I get the Z value shown on the contour plot at some particular (X,Y) more elegantly? I would like to use some command at command prompt. I already have my (Xintm, Yintm) matrix. <br>
> <br>
> I have searched Matlab help and also online forums. But I could not find a solution.<br>
> Hoping that I could get an elegant solution using this platform. <br>
> <br>
> Regards,<br>
> Murthy <br>
<br>
I am facing the same problem. Could you please me about the solution?

Wed, 26 Apr 2017 06:31:03 +0000
Queue inital condition, store entities in queue at start up
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348339#953506
xinran liang
I'm using simevents to simulate a serial production line. Is there a way to make sure the inital condition of each queue is the same every time I run the simulation? For example, queue 1 has 3 entities, queue 2 has 4 entities and so on. I need to simulate nonempty buffer conditions. Thanks<br>

Wed, 26 Apr 2017 06:05:15 +0000
Re: How these codes work.
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348338#953505
Nasser M. Abbasi
On 4/26/2017 12:21 AM, Kyle Baron wrote:<br>
> I'm just trying to understand how this code comes to the answer of 10.5.<br>
><br>
> c=0;<br>
> while c<=10<br>
> if c==2<br>
> break<br>
> end<br>
> c=c+1.5;<br>
> end<br>
><br>
<br>
it looks like it is looping until c==2 is detected.<br>
<br>
> Also some help for a simple code for this question would be appreciated:<br>
><br>
> Write a FOR loop to compute the sum of the squares (1^2+2^2+3^2.....) of all integers from 1 to 20.<br>
><br>
> Thank you.<br>
><br>
<br>
i=1:20;<br>
sum(i.^2)<br>
<br>
2870<br>
<br>
Nasser

Wed, 26 Apr 2017 06:00:03 +0000
Re: How to launch the .m file from shell?
https://in.mathworks.com/matlabcentral/newsreader/view_thread/90363#953504
Arkya Chatterjee
Johan Carlson <Johan.NOSPAM.Carlson@csee.ltu.se> wrote in message <423466db$0$177$cc7c7865@news.luth.se>...<br>
<br>
> <br>
> matlab nojvm < scriptname.m<br>
> <br>
> /Johan<br>
<br>
When running code this way, is there a way one can make something like a progress bar? Something that can be shown on the terminal while the code executes?

Wed, 26 Apr 2017 05:55:41 +0000
Re: ode45 number of steps
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348337#953503
Nasser M. Abbasi
On 4/25/2017 11:07 PM, Arindam Sutradhar wrote:<br>
> How can I find the number of steps that ode45 is using to solve a particular equation?<br>
><br>
<br>
one option might be to make a counter and increment it.<br>
The counter is incremented inside an outputfcn which you<br>
define.<br>
<br>
"Output function, specified as the commaseparated pair consisting<br>
of 'OutputFcn' and a function handle. The ODE solver calls<br>
the output function after each successful time step"<br>
<br>
See<br>
<br>
https://www.mathworks.com/help/matlab/ref/odeset.html<br>
<br>
"Create or modify options structure for ODE solvers"<br>
<br>
Nasser

Wed, 26 Apr 2017 05:21:04 +0000
How these codes work.
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348338#953502
Kyle Baron
I'm just trying to understand how this code comes to the answer of 10.5.<br>
<br>
c=0;<br>
while c<=10<br>
if c==2<br>
break<br>
end<br>
c=c+1.5;<br>
end<br>
<br>
Also some help for a simple code for this question would be appreciated:<br>
<br>
Write a FOR loop to compute the sum of the squares (1^2+2^2+3^2.....) of all integers from 1 to 20.<br>
<br>
Thank you.

Wed, 26 Apr 2017 04:07:03 +0000
ode45 number of steps
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348337#953501
Arindam Sutradhar
How can I find the number of steps that ode45 is using to solve a particular equation?

Wed, 26 Apr 2017 04:00:03 +0000
Up To 10% Bonus for old school runescape gold sale buying on Rsorder 2017 Spring Top Sale Until May.10
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348336#953500
Candice Accola
"Natalie Tennant and I do not agree on everything," Warren said Monday at a rally rs 2007 gold for Tennant in West Virginia. "But on the core issues, on the issues that are about our values, on the issues that define us as human beings, Natalie and I agree. Our job is to fight for the families of America.<br>
RSorder has already become the most professional site to supply RS products online since 2008, Nearly 60% of all RS players have enjoyable shopping experience at our website. The favorable rate which according to customers feedback has reached 99%. At the meanwhile, Rsorder on the Google is No.1 store of Rs gold, Rs 3 gold, Rs 2007 gold, RS accounts and so on..<br>
<br>
XV. Elimination of nuclear weapons: If we deeply contemplate to find out the root cause for the production of "Weapons of Mass Destruction" (WMD) like nuclear weapons, ballistic missiles, poisonous chemical weapons, we deduce the fact that it is the State, only the State, having the ownership of capital, produces such kind of weapons throughout the world in the name of 'self defense' or 'military balance' or to enjoy the dignity of 'super power'. The people who pay the tax for their own welfare are not aware of the conversion of productive capital into destructive capital.<br>
<br>
I think that much of the coverage of the religious right is extremely unsophisticated. And by the way, not even with a particular ideological cast. As Ralph Reed likes to bring up, there was that famous quote in "The Washington Post" some years ago calling religious conservatives easily led and duped or whatever, which was, of course, outrageous.<br>
<br>
I published an article on 13th and got 70 views so far. Then I submitted a fix, I changed my title, it says "your fix is accepted and you will receive an email when it is fixed". I checked my article later, I didn't receive any email but I got my article fixed.<br>
<br>
A lot of viewers bang their heads against this kind of dichotomy. Sometimes "Game of Thrones" is a widescreen epic fantasy, other times it's a small scale study of violent lives, and it's a struggle both to anticipate and appreciate whatever you wind up getting. The answer is to stop struggling.<br>
<br>
The next on the list was the older IIFT, which secured the top position in four categories " industry interface, infrastructure, potential to network, salary drawn and student development. IIFT realises the importance of reworking the curriculum according to the industry demand and having quality faculty that is well updated according to the changed needs,? says director K. T.<br>
<br>
If an owner takes good care of his pet then the latter will not try to leave the compound. To ensure that the animal is well protected we must ensure that they are enclosed in a decent compound even tied to a running chain. The Chairman of the Veterinarian council says that the sight of stray dogs puts off tourists.<br>
Guys!RSorder 2017 Spring Bonus Boom :Up to 10% Extra bonus for rs3 gold and rs 2007 gold buying from <a href="http://www.rsorder.com/oldschoolrsgold">http://www.rsorder.com/oldschoolrsgold</a> During April 21 May 10, 2017!<br>
<br>
Using 7% off code SYTHE to buy rs 2007 gold from <a href="http://www.rsorder.com">http://www.rsorder.com</a> anytime !<br>
OSRSAccount with 60 attack, 90 strength, 1 defense, Range 90:<br>
Availability:In stock

Wed, 26 Apr 2017 03:10:04 +0000
If,elseif,else restart
https://in.mathworks.com/matlabcentral/newsreader/view_thread/348335#953499
Wade Maxwell
This is what i am working with so far.<br>
<br>
casenum=input('Type 1 for Xaxis centroid or type 2 for Yaxis centroid of a Nth Degree Parabola.')<br>
<br>
if casenum==1<br>
b=input('Please enter the length of the parabola on the xaxis =');<br>
n=input('Please enter the degree of the parabola function =');<br>
Xc=((n+1)/(n+2))*(b);<br>
fprintf('The Xaxis Centroid is %0.2f = \n',Xc)<br>
elseif casenum==2<br>
h=input('Please enter the height of the parabola =');<br>
n=input('Please enter the degree of the parabola function =');<br>
Yc=(h/2)*((n+1)/(2*n+1));<br>
fprintf('The Yaxis Centroid is %0.2f = .\n',Yc)<br>
else<br>
fprintf('\n')<br>
disp('please choose 1 or 2')<br>
disp('This code will be ran again in a few seconds')<br>
pause(3)<br>
end<br>
<br>
My question is how to make it start over at the original question if the user chooses a number other than 1 or 2.<br>
<br>
Thanks for the help in advance.