Answered
Create unique terms vector
Your algorithm does have a flaw. Let's say, you've generated 9 unique numbers. For simplicity, let's say the numbers are 1 to...

14 years ago | 0

Answered
How do u pass the data calculated from the previous function to another function
abs() is a function, so is sin(). a=-3; b=abs(a); c=sin(b); or sin(abs(-3)) Does this answer your questio...

14 years ago | 1

Answered
Creating matrix as per given format
N=200; M=N^2; a=zeros(M,2); count=0; for k=1:N for j=1:N count=count+1; a(count,1:2)=...

14 years ago | 0

Answered
generating/plotting aperiodic functions
f below will be your function. f=@(t,StartTime,EndTime,Amplitude) Amplitude*and(StartTime<t,t<EndTime); To test it out: ...

14 years ago | 0

Answered
all possible permutations
Would this give you the correct result? %% a=[1 -1 2 -2 3 -3 0]; b=nchoosek(a,4); M=size(b,1); c=cell(M,1); ...

14 years ago | 0

Answered
the .m files open in a new workspace
Follow this link. <http://www.mathworks.com/support/solutions/en/data/1-D9IA82/?solution=1-D9IA82>

14 years ago | 0

Answered
Contour plot of stresses in a beam
You can use the <http://www.mathworks.com/help/techdoc/ref/triscatteredinterp.html TriScatteredInterp function>. Just replace me...

14 years ago | 0

Answered
Matlab workspace
feature('memstats') And a useful link: <http://www.mathworks.com/support/tech-notes/1100/1106.html Memory Management Guide> If...

14 years ago | 0

Answered
Integration tolerances ode15s
To resolve the symptom of the problem , you actually need to increase the tolerances, or reduce the allowed smallest step size a...

14 years ago | 0

Answered
Pre-alocating an array and locating last empty cells
If you want to keep the 3 sets of triplet, I suggest you using 3-D matrix. Your three transformation matrix can be assigned to a...

14 years ago | 0

| accepted

Answered
Legend shows only one line type
No line types are specified for the first three of your plots. The last three have the same line types. It should work fine. Se...

14 years ago | 0

Answered
executing a function in multiple directories
That is probably not the best word describing your need. Based on your previous questions, I guess you want to run a program. Th...

14 years ago | 0

| accepted

Answered
Export uitable's data to a spreadsheet Excel
You need to do some processing in the case that the table data is all numerical, because the column header is returned in a cell...

14 years ago | 2

| accepted

Answered
Produce an eggbox
Do you mean your last line to be surf(X,Y, X.^2)? It plotted something but I don't know what is an eggbox.

14 years ago | 0

Answered
data extract
%% str='123456-123456.123.abcde'; num=regexp(str,'-[^\.]*','match'); num=str2double(num{1}(2:end)) *Update* %% a=d...

14 years ago | 0

| accepted

Answered
using surfl
You mean you want to two figures, or two surface plots in one figure. Your code should produce two figures, although usually ...

14 years ago | 1

| accepted

Answered
GUI Plotting "hold on" problem
Do you mean just "hold on" command will distort the scale, or the new plots added changed the scale? You can always change the s...

14 years ago | 2

| accepted

Answered
averaging
%% d=rand(90,12); [M,N]=size(d); e=mat2cell(d,30*ones(M/30,1),N); f=cellfun(@mean,e,'uni',false); g=cell2mat(f)...

14 years ago | 0

Answered
plot and surf 3D graph
The error message says it all. Data used in plot() may not have more than 2 dimensions. Your data sseff seems to have a dimensio...

14 years ago | 0

Answered
Not able to change RTWInfo properties
RTWInfo is a built-in class. If you've customized that class, you probably need to do h = mypackage.Parameter; h.RTWInfo...

14 years ago | 0

Answered
Function
# plot() is a built-in function so you should not name your own function as plot. # It is better to have an input argument spec...

14 years ago | 0

| accepted

Answered
gui- panel
If you just use several panels and try to implement a way similar to tab panel, you have to use your code to hide one and show a...

14 years ago | 0

| accepted

Answered
Line graph shading?
I am not aware of any function for it. If you can get the intersection points, or just define the points, you can use patch().

14 years ago | 0

Answered
paste data in uitable one col at a time
It can be done. But you've known that when you set the data of the uitable, you have to set the whole table data, not just a par...

14 years ago | 0

| accepted

Answered
How to input data from one function to another one?
Write two functions: function data=Fcn1 data=[1 3 2]; function result=ProcessData(MyData) result=MyData+1; ...

14 years ago | 0

Answered
Populate a vector to a specified threshold limit
Can you generate a reasonably large random number, e.g. x=rand(50000,1), then after y(y<-5)=[] and y(y>25)=[] operation, it is a...

14 years ago | 0

| accepted

Answered
I'm trying to do simple averaging in Simulink and need some help with it.
Use the "Weighted Moving Average" block from Simulink>Discrete, click help for details.

14 years ago | 0

Answered
save figure
h=figure('visible','off'); plot(h,1:10); saveas(); close(h);

14 years ago | 1

| accepted

Answered
Simulink block from workspace
What file are you open, .mat or .txt or something else? In Command Window, do the following, t=(0:0.1:10)'; y=sin(t)...

14 years ago | 1

Answered
Copying from GUI listbox to Matlab Desktop
Are you asking about doing it in code or doing it interactively when you edit the GUI elements? You can use clipboard() to im...

14 years ago | 0

| accepted

Load more