Answered
Can I save / preserve list of scripts open in the editor?
What is your MATLAB version? New versions might help you. help matlab.desktop.editor <http://blogs.mathworks.com/desktop/2...

15 years ago | 0

| accepted

Answered
Seeing if a value is in a matrix
ismember()

15 years ago | 0

| accepted

Answered
best way to define a function inside a script
I feel your pain! I was trying to campaign for it but without much success. see <http://www.mathworks.com/matlabcentral/answers/...

15 years ago | 3

| accepted

Answered
how can i get a horzenital vector?
X1=X'; X1=X1(:);

15 years ago | 0

Answered
asking for a password or code.
MATLAB doesn't have that function. You can use input() to ask the user to type in some numbers or letters. You have to do encryp...

15 years ago | 0

Answered
how to create different column as a different vector from a matrix
Don't use q1, q2, q3. Use the following. You can reference it using q{1},q{2},q{3}. Even further, q{1}(2), q{3}(4). %% a=...

15 years ago | 2

| accepted

Answered
matrix logical indexing
A1=A(A>a & A<b)

15 years ago | 0

| accepted

Answered
How to know what is the computational time for running matlab simulink?
Missing point. Model='f14'; open_system(Model) tic; sim(Model); toc; tic/toc is like stopwatch to measure t...

15 years ago | 1

Answered
How do I open an m-file from the command line in the current instance of the Matlab editor?
If you just want to use the editor, you can run "meditor test.m" at the command line. meditor.exe is in folder matlabroot\bin\w...

15 years ago | 0

Answered
structure
You mean like this? %% temp_Q=1:20; temp_q=struct('ff',mat2cell(temp_Q,1,repmat(1,20,1)))

15 years ago | 0

| accepted

Answered
find max of a vector between two indice
A=[3 7 13]; B=[-5 3 -8 1 -7 2 -9 3 6 2 7 9 -4 2 6]; C=zeros(1,numel(A)-1) for k=1:numel(A)-1 C(k)=max(B(A(k):A(k+1...

15 years ago | 1

Answered
Selecting pixels within a matrix
A=[0 100 300 800 5000; 200 400 600 1000 2000; 400 3000 4000 4000 5000] A(A<=300)=0; A(A>=400)=0;

15 years ago | 0

Answered
WHERE IS THE CONNECTOR?
<http://www.mathworks.com/mobile/>

15 years ago | 0

Answered
Is there a matlab command to Extract function of a plot
Curve Fitting Toolbox? <http://www.mathworks.com/products/curvefitting/?s_cid=global_nav>

15 years ago | 0

Answered
Arranging a simulink models inport and outport using a function m-file.
I have that function but can't share because it's work related. You could develop your own. By default, all signal lines are in...

15 years ago | 0

Answered
Find a block of ones in a vector
%% a=[0 0 0 1 1 0 0 1 1 1 0 0] ind=find(diff(a)==1)+1 Not too fast. This won't work if a starts with 1. Use this instead ...

15 years ago | 0

| accepted

Answered
Multiple lines in a string
Data={'Alice','John','Joe','Jill';12 13 14 15}; fprintf('\n%s will be %d this year.\n',Data{:});

15 years ago | 1

| accepted

Answered
Code of Puls Generator
Go to Simulink library->Model-Wide Utilities, double click 'Block Support Table', search for 'Pulse Generator' block in the docu...

15 years ago | 0

Answered
Build executable file for a GUI-Simulink model
No. It doesn't support Simulink model. To create executable for a Simulink model, you need the Simulink Coder toolbox.

15 years ago | 0

Answered
how can access?
If those 0s and 1s are always at the end and their repetition is consistent, you could do the following. %% str='1|Toy Sto...

15 years ago | 0

Answered
convert a variable string to data
If you really need to do this, eval(),evalin() or assignin() is the function to use. This is the same question as your previous ...

15 years ago | 0

Answered
BUILIDING A BASIC GAUGE TO MEASURE/MONITOR MY HOUSEHOLD POWER CONSUMPTION
Not sure if you are open to this. <http://www.mathworks.com/products/gauges/?s_cid=global_nav>. It requires Simulink and Gauges ...

15 years ago | 0

Answered
How to create a PWM signal but big frequency modified auto
I don't understand what you mean "big frequency modified auto", but to derive the PWM signal, you just need to compare the y wit...

15 years ago | 1

Answered
Need help using from file block
Your probably didn't set the parameter for the "From Workspace" block correctly. Click 'Help' at the dialog window will lead you...

15 years ago | 0

Answered
Annotating Plots
To include brackets, you could use for example, a=mat2str(B(1,:)). Or n=num2str(B,'[%5.3g],'), or str=['[',num2str(3),']'] To...

15 years ago | 0

| accepted

Answered
Including files in matlab
It seems like that you could benefit from going through the "Getting Started" portion of the MATLAB document. If both are M-s...

15 years ago | 0

| accepted

Answered
display result
If it is just the matter of display, check doc format. try format long g

15 years ago | 0

Answered
plot a 6x6 matrix in 3D
N=6; [X,Y]=meshgrid(1:N,1:N); surf(X,Y,A); or plot3(),contour() depending what illustration you want.

15 years ago | 1

| accepted

Answered
delay block
Use the 'Unit Delay' block from simulink->Discrete

15 years ago | 0

Answered
Error using ==> disp and Error in ==> TempArray1 at 6 disp('New B is equal to',D);
disp() is used to quickly display a text or array. You can't combine two together. In your example, use: disp('New B is e...

15 years ago | 1

Load more