Réponse apportée
I am trying to make a s-function in my simulation. it consists of a c program. I have put this c program in matlab folder.But the simulation shows error and says that such a c program does not exist. s function does not allow us to specify the path name
Hmm... if you are writing an S-function by hand, then you should be able to add your other source files when you build it >...

plus de 12 ans il y a | 0

Réponse apportée
Convolution using Embedded MATLAB Function Block in simulink
To do this, somewhere in your model you need to have a block that maintains the previous values of the sampled input (the convol...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
How to set multiple ports for a step input block
I believe you can use a single Step block, and then for the various parameters (such as the Final Value parameter) you can set a...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
mirrored axes labels with imagesc
Are you referring to the y-axis being in reverse direction? If so, you can set it back... a = rand(5,5) a(3,3) = NaN ...

plus de 12 ans il y a | 0

Réponse apportée
text into matrix cell
My solution would involve meshgrid and some fancy arrayfun action (though you could easily replace arrayfun with a for loop) ...

plus de 12 ans il y a | 0

Réponse apportée
for loop query
Reshape and fliplr will help you here: m = 3; c = [40,39,36,30,22,21,1,2,3,4,5,6] result = reshape(c,m,[])' result...

plus de 12 ans il y a | 1

Réponse apportée
convert to text
I think your step creating e should be E = reshape(D,8,[])' The way you have it now does not properly reorder the string...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
ftp connection
I get the same behavior you get. This works for me though... f=ftp('tgftp.nws.noaa.gov'); cd(f,'data/observations/metar...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
coordinates of pixels in a contour plot
I would just bypass the contour altogether. It seems that you essentially want to find the points where (Am1_r == 0) & (Am2_r...

plus de 12 ans il y a | 0

Réponse apportée
Simscape Pneumatic Orifice Problem
I am no expert in pneumatics (I had to make sure I was spelling it right when I typed it just now) but I have a thought. The ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
changing the style in a loop with hold all...
Ok I understand your remark about it "feeling wrong" so please don't hate me for suggesting this... However, a little-known tri...

plus de 12 ans il y a | 2

Réponse apportée
Removing a block and making connections
I've run into this before. My solution was to find port handles and reconnect. I'm not sure if there is an easier way. Here...

plus de 12 ans il y a | 2

| A accepté

A résolu


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 ...

plus de 12 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

plus de 12 ans il y a

A résolu


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:...

plus de 12 ans il y a

Réponse apportée
Setting priority to data store read/write blocks
A couple general comments for you - If you really are just using Data Stores to avoid drawing signal lines, you'd probably be...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
simulink components names from vector of strings
Sounds like you just need some string concatenation... for i = 1:length(vector) block2AddSrc = ['library/' vector{i}...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Stateflow question: transitions evaluated before state is executed
Hi Iban, I believe that is actually the default behavior. Generally, outer transitions (ones on the super states) are tested...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
3d representation of GPS coordinates
Hmmm... does stem3 help? t = 0:0.01:pi; x = sin(t); y = cos(t); z = t; stem3(x,y,z)

environ 13 ans il y a | 0

Réponse apportée
how do I write the intergration part of an equation into matlab
I would start by simplifying the problem a bit. *Step 1 - for a fixed x1,x2, how could I calculate the integral?* For this, yo...

environ 13 ans il y a | 2

| A accepté

Réponse apportée
3D interpolation Help with
I always find this stuff cool for some reason. Anyway, TriScatteredInterp might help you X=[245 135 356 356 135 245 450 24...

environ 13 ans il y a | 2

Réponse apportée
matrix array
Would reshape followed by transpose do the trick.... %Create data array data = [12 0 8 0 4 0 1 0 5 0 9 0 3 0 1 0 10 0 12...

environ 13 ans il y a | 0

Réponse apportée
Multiple date and time formats in .txt files
I'm going to assume you have a cell array of strings of different formats. Could you define some criterion of being able to det...

environ 13 ans il y a | 0

Réponse apportée
pushbutton coloring problem
Sounds like a bug. I would report it using the "Contact Support" button here: <http://www.mathworks.com/support/?s_cid=globa...

environ 13 ans il y a | 0

Réponse apportée
What is the best way to execute a Simulink model step-by-step (interactively) from Matlab
Forgive the basic question, but why can't you just set the simulation inputs to change at desired points in the simulation? F...

environ 13 ans il y a | 0

Réponse apportée
replacing multiple lines with multiple lines in ascii file
Can you read the whole file in and then just replace the strings? wholeFile = fileread('myFile.txt'); newStr = 'This is ...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
multiple subplots in a figure
Similar question: <http://www.mathworks.com/matlabcentral/answers/6481-strange-behavior-bug-with-subplot-and-setting-outerposit...

environ 13 ans il y a | 0

Réponse apportée
Unable to troubleshoot this error message
I'm not sure, but should [Z,Y]=RK4(-0.5e-8, [0.1;0.5], 20e-100, 50, @(Z,Y) prob5partb(z,y,n)); really be [Z,Y]=RK4...

environ 13 ans il y a | 0

Réponse apportée
Increase the speed of the program
I may be missing something, but a general thought... Try replacing all those calls to dlmread with the textscan function. ...

environ 13 ans il y a | 0

Réponse apportée
Nested Structures using Custom Storage Classes RTW EC
Can you be more specific as to how nested bus objects is limiting for you? Most people I've encountered achieve nested struct...

environ 13 ans il y a | 1

Charger plus