Answered
Creating a reset button in GUI
Use findobj() to find the handles of all the toggle buttons, or check boxes, then you can use set() to set their values to be 0 ...

14 years ago | 0

| accepted

Answered
fprintf
doc fprintf or doc sprintf has plenty of examples.

14 years ago | 1

| accepted

Answered
set of txt files
Read one file at a time and then concatenate them together. You may use a for-loop. What is your code and what is your difficult...

14 years ago | 0

Answered
Conditional Calculations or Loop
All you need is to properly index and select the data from the array. I don't understand what do you mean by "Product" though. ...

14 years ago | 1

| accepted

Answered
Can any WHILE Loop be replaced with a FOR loop?
In a twisted way: for k=1:inf x=input('Enter a value'); if x>4 && x<10 break; end end

14 years ago | 0

Answered
Function for concatenating strings with delimiters?
Something similar to this: %% s={'sample','abc','1234','12'}; b=[sprintf('%s_',s{1:end-1}),s{end}]

14 years ago | 4

| accepted

Answered
How to track the vector magnitude in quiver plot?
If you use quiver(x,y,u,v), the data cursor mode will show the (x,y,u,v) value for every point that is plotted. I guess you want...

14 years ago | 1

| accepted

Answered
RGB to Gray function with Matlab code
gray() is a MATLAB function too. Do the following to see if there are conflicts. which gray -all

14 years ago | 0

| accepted

Answered
Problem in mesh plot...
The error message is clear. You didn't provide the right Z value. Check doc mesh for examples.

14 years ago | 0

Answered
error step input and velocity input
The function to use is stepinfo() like below. But your system is not stable. What "error" do you mean? Steady-state error? ...

14 years ago | 0

Answered
Varying Parameters for Simulink Models
No. You can't. What is the parameter for what block? Sometimes you can change the way you develop the model. For example, if the...

14 years ago | 1

Answered
read mix data from .txt file
Assume your file is called test.txt >> [Dat,Num]=textread('test.txt','%s %f','headerlines',1) Dat = '1950-01-01' ...

14 years ago | 1

| accepted

Answered
examine a model with range of input
I don't see the difficulty. If your "inner variable" varies with the input step, make that relation part of your Simulink model....

15 years ago | 0

| accepted

Answered
rising time
stepinfo() S = STEPINFO(Y,T,YFINAL) takes step response data (T,Y) and a steady-state value YFINAL and returns a structure ...

15 years ago | 0

Answered
Converting a cell array column of strings to a numeric matrix
If CSVIMPORT can't get what you want, I would start with your original .csv file and do proper parsing. Anyway, save your above ...

15 years ago | 0

Answered
Time vector
%% StartTime=datenum(2011,10,31,12,00,00); OneSecond=1/3600/24; TimeVector=StartTime+OneSecond*(0:1000); datestr(T...

15 years ago | 0

Answered
Transparent background for figures
What do you mean transparent? Do you mean white background color? Would the pdf or eps file come out the same as set(gcf,'Color'...

15 years ago | 1

Answered
delaying a simulation till end of a previous one
I don't think this is a MATLAB or Simulink technique issue. It's your modeling technique issue. How do you decide going from sup...

15 years ago | 0

Answered
Import a cell array in excel
Like you are aware of, when you write the data to the spreadsheet, every cell in the spreadsheet must contain a scalar number (o...

15 years ago | 0

| accepted

Answered
Graph scales
Are the logarithmic and exponential basically the same? No. You have to label it by specifying the label.

15 years ago | 0

Answered
How to get function block parameter from model?
Drag a Fcn block to an empty new Simulink model. >> get_param('untitled/Fcn','Expression') ans = sin(u(1)*exp(2.3*(-u...

15 years ago | 0

| accepted

Answered
outputs to workspace not visible
Your 'script' must have been a M-function, instead of a M-script. Setting 'DstWorkspace' to be 'current' means sending the outpu...

15 years ago | 0

| accepted

Answered
random number generation
If you type help rand or doc rand, it will explain what is seed. I always think of it as the unique ID of a serious of random nu...

15 years ago | 0

Answered
Finding the tangent line of a curve at a point
Something like this: %% delta_t=2*pi/100; t=0:delta_t:2*pi; y=sin(t); figure(1);grid on; plot(t,y,'r*');hold...

15 years ago | 4

Answered
how to simulatefuzzy logic controller
It's pretty easy if you have the Fuzzy Logic Toolbox. <http://www.mathworks.com/help/toolbox/fuzzy/fuzzy.html>. <http://www....

15 years ago | 0

Answered
load some file from matfile used iteration??
Either use just load(myfilename,'vector') without the return argument 'data'. The variable 'vector' will be in the workspace. ...

15 years ago | 0

| accepted

Answered
Using SYSTEM to run an executable outside of Matlab
try system('MYPROGRAM.EXE < MyInput.txt') where MyInpu.txt is a text file you created ahead of time. The text file contains noth...

15 years ago | 1

| accepted

Answered
Retrieving Arrays
%% A{1}=[1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4; 4 8 12 16]; A{2}=[2 3 4 5; 2 3 4 5; 2 3 4 5; 2 3 4 5; 8 12 16 25]; A{3}=[3 ...

15 years ago | 1

| accepted

Answered
Complex Transfer Function
Take a look at the example of doc zpk

15 years ago | 0

Answered
3D line plot
If you want to plot 3D lines, you need to have 3D data, whether the data is the typical x,y,z coordinates or one of the dimensio...

15 years ago | 0

| accepted

Load more