Respondida
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).*(...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 0

Respondida
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...

casi 11 años hace | 2

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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;...

casi 11 años hace | 1

| aceptada

Respondida
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...

casi 11 años hace | 0

Respondida
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',...

casi 11 años hace | 2

| aceptada

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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 ...

casi 11 años hace | 2

Respondida
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...

casi 11 años hace | 0

Respondida
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 ...

casi 11 años hace | 2

Respondida
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...

casi 11 años hace | 0

Respondida
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.

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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')

casi 11 años hace | 3

| aceptada

Respondida
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 ; ...

casi 11 años hace | 0

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

casi 11 años hace | 0

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 0

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 1

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 2

Respondida
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...

casi 11 años hace | 0

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 0

Respondida
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 ...

casi 11 años hace | 0

Respondida
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...

casi 11 años hace | 0

Cargar más