Answered
importing matrix and variables of a m-file function into workspace directly and making a matrix name based on a variable string
1. To make a new variable name, use Name1='matrix'; Name2='label'; NewName=[Name1,'_',Name2]; 2. Don't name your v...

15 years ago | 1

| accepted

Answered
sobplot two matrix that the secend matrix is the same first matrix wtith shifts(only in x) on some parts of first matrix
It could be put in a loop if you can explain what is the pattern for those index and shiftTime values, such as 1500, 3000, 6000,...

15 years ago | 1

| accepted

Answered
MATLAB function "save" and "-V7.3"
Are you using the '-append' option of save? If you look at the help of save, '-v7.3' means Version 7.0 features plus support for...

15 years ago | 0

Answered
Indices of 'convolution' aka finding indicies of one matrix from a set of matrices in another matrix
Not very clear what you are asking. Using your example, if you run [I,J,V]=find(B), is the matrix I what you are looking for?

15 years ago | 0

Answered
error while using dlmread
%% a=magic(12); b=a(1,10) dlmwrite('test.txt',a); r=dlmread('test.txt',',',[0 9 0 9])

15 years ago | 0

Answered
2D FFT implementation in Simulink
Why use Simulink? I would think it's easier doing it in MATLAB. The function is fft2(), fft(),filter(),filter2().

15 years ago | 0

Answered
Assign multiple fields to a Struct-Array
%% filelist(1).names='a'; filelist(2).names='b'; a=upper({filelist.names}); [filelist.names]=deal(a{:})

15 years ago | 4

Answered
Use EmbeddedMatlab function without stateflow
In R2011a, Embedded MATLAB functions have been renamed as MATLAB functions in Stateflow charts. I guess if you develop the model...

15 years ago | 0

Answered
How To Select Signals
Use "Multiport Switch" block from the "Signal Routing" library.

15 years ago | 0

| accepted

Answered
Get selected range in Excel file using MATLAB
The function is probably uiimport. Type uiimport in Command Window to start. You can also use xlsread(). Type help xlsread to f...

15 years ago | 0

| accepted

Answered
finding unique values of mixed data types.
c={'a',1;'b',2;'c',1} unique(c(:,1)) unique(cell2mat(c(:,2)))

15 years ago | 0

| accepted

Answered
How to create a 3D matrix using the 2D matrices
d=zeros(137,137,72); for k=1:72 d(:,:,k)=rand(137); end

15 years ago | 3

| accepted

Answered
Matlab GUI - remove a control object
h=uicontrol('style','text','units','pixels','position',[100,200,30,50]) delete(h);

15 years ago | 1

| accepted

Answered
Time calculation in mdscale
Do you know that you can use tic and toc to measure the time? Other functions include cputime(), etime(), clock(). If it takes t...

15 years ago | 0

Answered
get Bus signal names
How is the bus created? Do you want the signal name in MATLAB or Simulink. In Simulink, you can use the Bus Selector block to se...

15 years ago | 0

Answered
not displaying answers in command window for this special command
Make rrr=[rrr,';']; eval(rrr);

15 years ago | 0

| accepted

Answered
Unusual behaviour in model outputs recorded by SystemTest - a value for every outport, on every outport.
It looks like the signal associated with each of your Outport has become a vector signal. Click menu Format->Port/Signal Display...

15 years ago | 1

| accepted

Answered
generating a randn values to study the effect of an input parameter on output parameter
1. No, it's not. randn could vary from large negative to large positive although the possibility of a large number is small. ...

15 years ago | 0

Answered
view usage of parameters in model.mld
I am not aware of a direct or effective way doing it. How many parameters are there in the .mat file? If not many, you can clear...

15 years ago | 0

Answered
Joining matrices while combining columns
I don't know any special function for this. I think there should be some from maybe the Image Processing Toolbox. For the task ...

15 years ago | 0

| accepted

Answered
Creating a list of variables
This topic comes up quite often. The following link should give you a good guidance. See 'How can I create variables A1, A2,.....

15 years ago | 2

| accepted

Answered
rempet
X=rand(4) Y=rand(4,1) Index=[2 3 4 1]; X=X(Index,:) Y=Y(Index,:)

15 years ago | 1

| accepted

Answered
Max and Min values within vectors in a cell matrix and their indexes
use [Y,I]=max(x) to return the maximum value and index. Assume every cell is a nx1 or 1xn array or empty. %% C=cell(3,4,5)...

15 years ago | 1

| accepted

Answered
How to call back a function in a gui
In the GUIDE, right click your 'calculate button', select 'View Callbacks', select 'Callback', that is where you write your func...

15 years ago | 0

Answered
is it posibile in matlab, jump to others command if a=1( i dont want if a~=1)
There is no "goto" command in MATLAB if that is what you are looking for. There should be other ways to control your code flow i...

15 years ago | 1

| accepted

Answered
To draw a curve line
Would the function rectangle() help?

15 years ago | 0

Answered
Selecting array column elements using a vector..?
%% Vi=[3 2 4 1]; A=magic(4); Index=sub2ind(size(A),Vi,1:4); B=A(Index)

15 years ago | 1

| accepted

Answered
add and remove columns from a marix
%% n=rand(5,1); Matrix=magic(5); NewMatrix=[]; for k=1:size(Matrix,2) if n(k)>0.5 NewMatrix(:,end+1)...

15 years ago | 0

Answered
Replace () with - using regexprep
Well, just as simple as your code unless you have other requirements: DataArr = regexprep(DataArr,'(','-'); % replace ( w...

15 years ago | 1

| accepted

Answered
Copying a subsystem from one model to another
It can be done although it takes some coding. # Use add_block(SubSysBlockInOriginalModel,Destination) to copy the Subsystem blo...

15 years ago | 2

Load more