Answered
HI, i want to plot x=sin(t*pi) fuction like this picture for t[0:1:24] and x will be 0 when t=17
figure out what azzi was doing in the math which would lead you to figure out what to change. t=0:0.01:24 y=sin(t*pi).*(...

10 years ago | 0

| accepted

Answered
How to get one table instead of multiple tables.
you have two methods, to either add to the table instead of creating a new table or create the table at the end and build a matr...

10 years ago | 0

| accepted

Answered
How can I setup MATLAB to differentiate things like recent directories and command histories for two unrelated projects?
just setup a script to run depending on the project you are working on in your root matlab directory. One for Project A and one...

10 years ago | 0

Answered
Creating movie from Images from a for loop
you can follow the example of getframe() in the documentation located here: <http://www.mathworks.com/help/matlab/ref/getfram...

10 years ago | 2

Answered
How can I add a character string to a numerical array?
You'll have to work with cells to have a combination of numbers and strings. you cannot have an array of grade = [ 1 2 3 4...

10 years ago | 0

| accepted

Answered
How is streamline function is implemented in MATLAB?!
Well how to generate the lines will take a bit of thought but to get the lines [x,y] = meshgrid(0:0.1:1,0:0.1:1); u = x;...

10 years ago | 1

| accepted

Answered
subscript indices must either be real positive integers or logicals when using a function in a nested for?
so when i run the code you have: function zk=h(x) zk(1,:)=sqrt(900+(x(1,:)-30).^2); zk(2,:)=x(2,:).*(x(1,:)-30)./z...

10 years ago | 0

Answered
Check if mouse is above an axes
Here is a little thing i threw together. function test() h = figure(1); hp = uipanel('Title','Main Panel','FontSize',...

10 years ago | 2

| accepted

Answered
Using pushbutton to load an .m file in GUI
you would first create a pushbutton in either GUIDE or manually using uicontrol. Then you would change the callback function to...

10 years ago | 0

| accepted

Answered
Merging Multiple text files
Since you're just doing a complete copy and paste of the text files just read it in as binary and write it all. I had to put a ...

10 years ago | 2

Answered
Find group of points in an array of points
Do you have access to the image processing toolbox? if so the function bwconncomp() maybe what you're looking for <http://ww...

10 years ago | 0

Answered
How do I delete the rows in amtrix wherre one column is less than another.
can be simply performed by testmat = [8 29 46 75;8 29 58 50;8 29 58 75;8 46 58 75;29 46 58 50;29 46 58 75;8 29 46 25;8 46 ...

10 years ago | 2

Answered
HELP - Need help with vectors.
If we took some time and looked at what you've done. POLY = [1 75; 1 25; 75 5; 175 5; 250 25; 250 75; 175 96; 75 96]; BL...

10 years ago | 0

Answered
Change x-axis labels of plot
solved much simpler by going figure,plot(-6:24,1:31) because you're setting the x and y plot pairs.

10 years ago | 0

| accepted

Answered
how to plot the parabola x^2-y=4 using ezplot command?
ezplot('x^2-y=4'); you just type it in... since you have a similar question already on holding and plot. perhaps the actual...

10 years ago | 0

| accepted

Answered
how to plot ellipse x^2/4+y^2/9=1 and circle x^2+y^2=1 in a single figure window using ezplot and hold on commands?
ezplot('x^2/4+y^2/9=1'); axis equal; hold on ezplot('x^2+y^2=1')

10 years ago | 3

| accepted

Answered
How can I find and replace a pattern inside a matrix
Well in the case that you do not have the image processing toolbox A =[ 0 0 0 0 0 ; 0 0 1 1 0 ; 0 1 1 1 0 ; ...

10 years ago | 0

Answered
How can I standardize figure sizes
Use the set() function and parameters 'position' and 'units'. %example: figure; set(gcf,'units','normalized','position',...

10 years ago | 0

Answered
why can't i load this .csv file in matlab?
are you sure that you want column 8065 or end of line one to read "0};"? i am running something so i can't try using matlab but...

10 years ago | 0

| accepted

Answered
I have problem to make code of deflection of beam
That is not an error. It is a warning. which based on the size of your function and number of iterations should not be an issu...

10 years ago | 0

Answered
How to load a .mat file from the parent directory?
you can determine your current directory with pwd. so to load the file it'll go something like this myfile = 'mymatfile.m...

10 years ago | 0

| accepted

Answered
Have any matrix's column same number?
you can use the function unique() to determine if there are repeated values within the matrix x = randi(10,4,4); dis...

10 years ago | 1

Answered
default size figures with subplot
yeah very simple. hfig = figure; pos = get(hfig,'position') set(hfig,'position',pos.*[.5 1 2 1]) subplot(1,2,1),pl...

10 years ago | 0

| accepted

Answered
How to plot curves sequentially with different colours automatically?
you can define the colors based on the number of plotted lines. see example: x= randi(1000,10,100); clist = colormap(hs...

10 years ago | 2

Answered
Is it possible to extract a comment line from the script itself?
why would you want to do this and not just declare the first comment as a string? if it is truly the first line of the script j...

10 years ago | 0

Answered
How to create a scroll bar for the legend
how are you not allowed to provide an example with dummy data and unlabeled axes? I ask for an example to check that you've cre...

10 years ago | 0

| accepted

Answered
How to achieve the output graph which is shown in the picture using simulation?
you can set the properties of the plot like i did below: x = -10:10:10; sub_trq = [5 2.5 0] main_trq = [0 2.5 5] h...

10 years ago | 0

Answered
There is any function displacement
you can use the function diff() to perform this differential. so you'll have something like da = diff(a); %this will get ...

10 years ago | 0

Answered
plot in a for loop
I would highly suggest you go back and read the matlab documentation on indexing arrays or how to make arrays. Here are my comm...

10 years ago | 0

Load more