Answered
FOR loop merge plots
Since you have multiple plots, you can use figure() to specify which window to plot on. Use hold on if you want to plot the curv...

10 years ago | 0

| accepted

Answered
Reference to non-existent field 'xData'
It is most likely due to compatibility issues between different versions of Simulink version. You might be using R2009a to open ...

10 years ago | 0

Answered
Import data from xlsx file - how to import without a specified range
If it is always to process all the data, would this work? [~, ~, raw] = xlsread(fullfile(pathname,filename),'Data'); dat...

10 years ago | 0

Answered
IF reading matrix values without preceding scientific notation
I think it should be if any(abs(B)>1e-14) Do you see the difference?

10 years ago | 0

| accepted

Answered
How to change position of duplicated Simulink module in GUI dynamically?
Assume you are duplicating a block in a model using add_block (but not add_block() from a library source), the new block name wi...

10 years ago | 1

| accepted

Answered
Is there a way to search an array for each value in a vector and return how many of each entry were found?
This should work. a = [5,6,3;10,1,24;1,2,3]; v =[1,3,5,7]; w=zeros(size(v)); for k=1:numel(v) w(k)=nume...

10 years ago | 0

| accepted

Answered
Pass arguments to a .bat file from matlab
This seems to work. Create this TestBat.bat file @echo off echo This is a test. echo %1 Run this in MATLAB ...

10 years ago | 2

| accepted

Answered
How to programmatically get custom MATLAB toolbox version?
The version info of your toolbox should really come from the contents of your toolbox source code. Provide a Contents.m file in ...

10 years ago | 3

| accepted

Answered
How to cast two uint8 into int16 in Simulink?
1. Use the ShiftArithmetic block in Simulink->Logic and Bit Operations. 2. Multiply the first number with 256 and then add to...

11 years ago | 1

Answered
How to find Stateflow chart using API's
I had a similar need but couldn't find a way. It was confirmed by the Mathworks tech support that there is no direct way to find...

11 years ago | 2

| accepted

Answered
How come signal is logged with dimension 1x1x50 instead of 1x50?
You must have that output signal resolved to a signal object, like Simulink.Signal or mpt.Signal. a=Simulink.Signal If you spec...

11 years ago | 0

Answered
Simulink callbacks when modifying model
Open your model, File -> Model Properties -> Callbacks, Any callback function that you can use? Maybe PreSaveFcn or CloseFcn ...

11 years ago | 0

Answered
Sub-libraries do not appear in the library browser
You need to add a file slblocks.m to "register" your customized library.

11 years ago | 0

| accepted

Answered
Help with multi-window GUI
Go to this page and click Axes, you will find a good example. By the way, the same info is in the MATLAB document. Type doc and ...

11 years ago | 1

Answered
How do I fix the error Function definitions are not permitted at the prompt or in scripts.
The message said so. You are not allowed to define a function in the command line or in a script file. You need to create a s...

11 years ago | 0

Answered
Using pushbutton to load file in GUI
Your code is inside a GUI callback function so rawdata1 is in the function workspace, not the MATLAB base workspace. To load ...

11 years ago | 0

Answered
Matlab Guide checkbox issue
f1=figure; hold on; h1=plot(1:10,1:10); h2=plot(1:10,sin(1:10)); set(h2,'visible','off');

11 years ago | 0

Answered
microcontrollers compatible with Matlab/Simulink
It's hard to say what is cheap. You might need to check out this link. <http://www.mathworks.com/products/connections/> Ca...

12 years ago | 0

Answered
How to Initialise variables for simulink's matlab function block?
See <http://www.mathworks.com/help/rptgenext/ug/simulinkfunctionsandvariables.html>

12 years ago | 0

Answered
logical statement accelerates or decelerates speed?
Use profile to find out how much time each statement takes. I ran your code. It is strange that first loop is faster than th...

13 years ago | 0

Answered
How to stop/delay execution for specified time
pause(1)

13 years ago | 9

| accepted

Answered
Obtain step data in plotting
a=rss; [Y,T,X]=step(a);

13 years ago | 1

| accepted

Answered
How can a convert a data set to percentage of maximum absolute value?
a=rand(5)-0.5; b=max(abs(a(:))); c=a/b d=c*100

13 years ago | 0

Answered
Adding a row in a matrix.
What do you mean by command or manually? This would do it although it is not a good practice. a=rand(31,10); a(33,10)=0...

13 years ago | 0

| accepted

Answered
Summation problem help please!
Would this be what you need? a=rand(29,100,3); b=squeeze(sum(a,1)); whos;

13 years ago | 1

| accepted

Answered
How to read multiple excel tabs each as a separate matrix
xlsread() has a lot if overhead. Follow this link to use Excel COM method. <http://www.mathworks.com/matlabcentral/answers/16...

13 years ago | 0

Answered
I am studying a solar panel using simulink tools and I got the Voltage and Power of the panel in the form of a plot and now I want to find the max value of power during the time of 0.01s which is the simulation time I gave?
If you have the power data for example P=[1.0, 1.3, 1.5, 1.4, 1.0], just use [Pmax,Imax]=max(P) Pmax = 1.5000 ...

14 years ago | 0

| accepted

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

14 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

14 years ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

14 years ago

Load more