Community Profile

Contact

Top 5% contributor

Here is a how-to example; try publishing this code: %% HTML + Youtube % <html> % <iframe id="ytplayer" type="text/h...

accepted

2

Answered 10 months ago

for dive = 1:10 for n = 1:3 data_split(dive).( ['n',num2str(n)]).('var')=var end end ...

1

Answered 19 days ago

Functions max and min do the trick: a=randi(9,1,10) b=randi(9,1,10) vect_max = max(a,b) vect_min = min(a,b)

Answered 9 months ago

This is how you should try: syms x f=((1-2*x).^2)/( (x-x.^2).^2 ) int(f) ans = 2*log(x - 1) - 2*log...

You should try to catch the error using the structure try/catch structure: try statements catch exception ...

Instruction roots uses an iterative numeric method to approximate the solution in float arithmetic. What you get is an excellent...

0

Check the parenthesis in the line: n(:,m) = 2*a*cos( ( (w2-w1)*t(m)*0.5) - ((k2-k1)*x*0.5))) *... cos( ( (w2-w1...

Answered 1 year ago

<http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F>

function exgui fh = figure( 'units','pixels',... 'position',[50 ,50 , 600, 500]); X=[2 4 7] Y=[4 6 ...

f =@(x) sin(3.*x+1) ; g=@(x) exp(abs(x)/2 -2)-1; a=3; b=6; x=linspace(a,b,73); S=0; for k=1:length(x)-1 S=S+abs( ...

ItÂ´s not clear what you are trying to do, but there are some bad things here: 1) when you use int command, you dont give the ...

You sould open the file with the 'append' modificator. fid= fopen(filename, 'a') % Use fprintf (for example) to print the ...

Something like this? load carbig X = [MPG Acceleration Weight Displacement]; [d,p,stats] = manova1(X,Origin); mano...

Both are pointwise, but A./B divides every element in A by the same element in B. A.\B divides every element in B by the same e...

Answered 20 days ago

Multiline can be done using this syntax: figure; str=['Line1', '\n', 'Line2']; s=sprintf('Hello\nGoodbye'); t...

This is not the place to get a full solution for your homework. Here you are a few links to start your part: <http://es.mathw...

You should use regexprep to replace anything that matches with parenthesis with an empty string; the pattern that matches any pa...

Read this help link: <http://www.mathworks.es/es/help/matlab/import_export/downloading-web-content-and-files.html Download Web ...

There is a general solution using symbolic tools. syms x y fxy=1./x+1./y; xmin=0; xmax=2*y; ymin=0; ymax=+in...

Hello: fminsearch solve unconstrained minimum problems only. If you need to impose restrictions you should use (for example)...

You can do that using Regular expressions (so you can choose which files has the desired attribute) and the command dir so you c...

You have the command 'dos' so u can interpret some DOS command line, and catch the result of it. I extracted a few lines in the...

Your problem is that you are trying to integrate a function say F(y)=(Y-y)^2, but using t as integration variable. That means th...

There is a simple way to solve the linear system of equalities, instead of using inequalities. You are trying to solve what is c...

*blockproc* function divide your image in block, you decide the size of the blocks, and applies the function you want to each b...

You can generate values uniformily on [0,1], lets suppose you want to generate 100 random binomial numbers: N=100; x=rand(...

I created the function check(A), so i can check if the property 'every row and column are not all zeros'. Its useful later: ...

The problem here is that you can't predict how many rows the numerical data will have. I recommend extract all using a gener...

I think you defined your functions badly. Try something like f=@(x)(1-((c*x/2)*(log(x+1)-log(x-1))))

Sum=0; for k=1:3 % will sum 3 first diagonal elements Sum=Sum+A(k,k); end You can change the range k=1:3 with an arra...

Load more