Answered
Data processing
Here is a different way to do it. %% t=[00 08 255 267 298 300]; y=[5 4 3 4 3 2]; figure(1);hold on; stairs(t,y); ...

14 years ago | 1

Answered
How do I loop this code to open each file, conduct a simple operation and resave?
Start with this and then do the data processing. %% PathStr('c:\Users\Laurentiu Galan\Desktop\tickoutput'); Files = d...

14 years ago | 0

Answered
Display time in the title
If you can find the max temperature, you can use the index to find the time. [MaxTemp,Index]=max(temp); TimeAtMaxTemp=time(I...

14 years ago | 0

| accepted

Answered
matrix and binary bits
%% B=[00 01 11 10]; C=num2str(B','%02d'); or i=1; C=sprintf('%02d',B(i));

14 years ago | 0

Answered
I have to seperate a list of words into two conditions(each containing 10 words), take 5 words randomly from each condition, and display them. Please help. I've provided the code I have so far.
If you want to choose 5 works out of 10 randomly, use this: Words=cellstr(('a':'j')'); index=randperm(10); index=inde...

14 years ago | 0

Answered
Any ideas why I am getting this 'catch' error? Does anyone know how I can solve it?
put "continue" in a separate line after "catch". help catch

14 years ago | 0

| accepted

Answered
mesh of three vectors
The code in this post should give you a working example. <http://www.mathworks.com/matlabcentral/answers/20890-contour-plot-o...

14 years ago | 0

Answered
Newbie question
5+20*log((sqrt(2*pi*Nvalues))./tanh(sqrt(2*pi*Nvalues))) Notice './' instead of '/'. help rdivide ./ Right array divide. ...

14 years ago | 0

| accepted

Answered
How do I run this loop to download data from yahoo finance?
for i=1:NumTick thissym=thisval{i}; To learn more, see the help help for help cellstr help catch help continue

14 years ago | 0

| accepted

Answered
How do I export this file i downloaded to a separate file on my desktop?
thisfileid=fopen(thisfilename, 'wt') fprintf(thisfileid, '%s\n',thisdata) fclose(thisfileid);

14 years ago | 0

| accepted

Answered
The min(y) function where y is a vector
In your code, x is a scalar. It is over-written every iteration in the for-loop. min() can return the index. %% x=1:10; ...

14 years ago | 0

Answered
Ackley Function value
This is no surprise. It is a typical floating point precision problem. <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0...

14 years ago | 1

Answered
What is the difference between if and if/and in MATLAB?
If you type in "help and", it will tell you that and(A,B) is the same as A & B most of the times. From the help, "C = AND(A,B) i...

14 years ago | 0

Answered
Display range of points(as an "i letter") in plot command
Unfortunately, there is no marker in the shape of letter "I". Is the following close to what you want? %% d=rand(4,5); f...

14 years ago | 0

Answered
How to set background image in matlab GUI ??
You need to use the axes object and then use imshow() to show your image.

14 years ago | 0

| accepted

Answered
Plotting a graph with X-axis different from 'time' on SIMULINK
If you want to show Voltage vs. time and Current vs. time in one scope, click the property of the Scope block, change the "Numbe...

14 years ago | 1

Answered
problem with getting for loop to work
Use your input argument, your for-loop looks like this: for x=1000:2000:-999 No loop is executed at all. I don't think your s...

14 years ago | 0

| accepted

Answered
Select directory for File Exchange downloads via desktop
You can do that. See the first image in this link. <http://www.mathworks.com/help/techdoc/matlab_env/br2yr0m-30.html>

14 years ago | 0

| accepted

Answered
extracting data from double string
use fprintf() or sprintf() is easier. Check the help of sprintf() for format details.

14 years ago | 0

Answered
How to transfer pointcloud to mesh
mesh is for 3-D data. If you only have v and f, I am not sure how do you want to present it in 3-D. However, if you have x, y an...

14 years ago | 1

Answered
Periodic impulse train train
%% f=10; %frequency of the impulse in Hz fs=f*10; % sample frequency is 10 times higher t=0:1/fs:1; % time vector ...

14 years ago | 1

| accepted

Answered
Is there an elegan "Matlb" way to do math on all the signals in a bus, ie add element by element the signals
I guess you are talk about Simulink. The answer is no. This is one of the difference between bus signal and vector signal. If yo...

14 years ago | 0

Answered
how to erase a line?
%% f=figure(1);hold on; c1=plot(1:10); c2=plot(10:-1:1); delete(c1);

14 years ago | 5

| accepted

Answered
Adding markers/highlight to graph
If the values input from the user are actual data points in the scatter plot, can't you just scatter plot those values again and...

14 years ago | 0

Answered
get number from table
d=get(uitableHandle,'data'); d7=d(7);

14 years ago | 0

| accepted

Answered
Contour plot problem
It is not a vertical line. If you change the meshgrid, you'll see. [x,y]=meshgrid(-3:0.1:3)

14 years ago | 0

Answered
Matlab2006 Problem with evaluating Callbacks in GUIDE
If you are using GUIDE, then in GUIDE, right click the Button or Edit, select the correct callback function, it will bring you t...

14 years ago | 0

Answered
How to find from what row an outprint comes from
The "data print" might be generated by fprintf() though. Anyway, you can turn on echo and then run the code. It will interla...

14 years ago | 4

| accepted

Answered
How to extract the values that I want in a cell array?
I would use the comma as a way to split them and the select the second column. %% a={'1,17951,1,0' ; '1,20345,1,0' ; '1,...

14 years ago | 0

Answered
x.abs()?
That is true, but it doesn't imply that x you declared will have abs as its method. I think that claim you quoted means that M...

14 years ago | 1

| accepted

Load more