Réponse apportée
I try to run a for loop to plot the function y(t) for 0.1<=t<=0.9 for 5 diffrent t. Can you help me with my code?
You were pretty close. I had to change the loop to loop over the elements of t and save y one row at a time using y(i,:) using ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
I hope to show that aliasing occurs for more than one sinusoid
Perhaps you are looking for something like this? t = 0:1/500:0.02; x = 3*cos(2*pi*300*t+pi/3) + 8*cos(2*pi*800*t-pi/5); plot(...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to append a string to a filename when saving a file?
This should get you closer to what you want to do [~,f,ext] = fileparts(files(id).name); % extract file name without original e...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How to use MATLAB RGB triplets and hexadecimal color codes for a custom plots?
I don't think you can specify name/value pairs in the plot command with multiple x/y values. This isn't very elegant but it d...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Cutting a Circular Ring at particular points using angle-theta
You were pretty close. See if you can adapt this to get what you want. p = linspace(-1/2,1/2,100); [X,Y] = meshgrid(p,p); % b...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How do I rename variables from workspace for multiple matfiles?
clearvars load('filename.mat') % load data that you want to change (replace filename with actual name of your file) img_ldct=i...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How to remove GIT from my Matlab files
Try Preferences>General>SourceControl, set Source control to None.

presque 4 ans il y a | 6

| A accepté

Réponse apportée
how to adjust x-axis in plot
I think this is what you are asking for. Note that this isn't going to be very pretty if you have more than a couple of months ...

presque 4 ans il y a | 0

Réponse apportée
How to model a ramp input with two slopes and saturation at zero?
One approach (no loops necessary) t=0:0.1:50; y = zeros(size(t)); y(t<10) = 0.1 * t(t<10); y(t>=10) = 1 - 0.5 * (t(t>=10) - ...

presque 4 ans il y a | 0

Réponse apportée
Can I have round corners with PATCH?
Try this. Adjust the 'curvature' value to adjust the ratio of the round corners to the size of the rectangle (1.0 will result i...

presque 4 ans il y a | 1

Réponse apportée
Miraculous behavior of readstruct() when importing Attributes with a single d or e
@Eleftherios Bethmage As @AndresVar says, just use a text editor to search and replace CRC32=" with CRC32="0x. Or, as you sugg...

presque 4 ans il y a | 1

Réponse apportée
Italicise axis ticks (latex)
Try changing V_i = {' ','u','v','w'}; to V_i = {' ','\textit{u}','\textit{v}','\textit{w}'}; % latex code for italics and c...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Need to plot points
It isn't pretty but this is the closest I could come up with to reproducing what you appear to want. x =[ 1 2 3 4 10 1 2 3...

presque 4 ans il y a | 1

Réponse apportée
How to flip non-zero elements of an array and keep zero elements at initial position?
Another possibility (still requires a loop): A = [ 134 159 122 175 126 0 0 151 170 189 196 0 ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How could I display a "circle at the bottom of the figure? And color it along the way? To show Hue angles?
As I mentioned in my comment to @Image Analyst's answer, surface may be what you want. I decided to experiment with it and came...

presque 4 ans il y a | 0

Réponse apportée
shadow in mulitple line plot
I would recommend reading the documentation for the fill command: https://www.mathworks.com/help/matlab/ref/fill.html I think i...

presque 4 ans il y a | 0

Réponse apportée
Put name on above and left
This is close to what you can do with a table. However, since you only have four columns in your data array, I don't understand...

presque 4 ans il y a | 0

A résolu


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

presque 4 ans il y a

Réponse apportée
What's going on when setting these parameters?
That sets the increment for the x vector. Read the documentation for the colon operator: colon

presque 4 ans il y a | 0

Réponse apportée
Why is one of my subplots being deleted?
If you know the position of the two axes already, you don't need to use the subplot function to position them for you. Just do ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
I'm new to MATLAB. How would I read data and depending on line content, either read the line and parse it or skip it entirely? Should I use textscan ? fgetl?
fgetl() is probably a good way to do this. If you want to keep only the lines that start with numbers you could try something l...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to extract the DateTime info of an image using Matlab?
On line 34 you are extracting the first character from tme and assigning it to strTime. Why? Try just using tme when you popul...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Legend Title Indexing - Keeps Overwriting
One approach that should work is to wait to generate the legend until after the loop is done. Replace the two lines stringTmp ...

environ 4 ans il y a | 0

Réponse apportée
Write a function that gives a tree with one input
n = 9; tree(9); function tree(n) for i = 1:n fprintf('%s', repmat(' ', 1, n-i)); fprintf('%s\n', repmat...

environ 4 ans il y a | 1

Réponse apportée
Finding Corresponding X Value for Y value
If you ask for two outputs from the max() function you can find the index of your peak: P=zeros(1,750); theta=zeros(1,750); L...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Yaw in mobile app
Typically, Azimuth is equivalent to Yaw (also Heading).

environ 4 ans il y a | 0

Réponse apportée
How to pass commandline arguments to external text editor?
I don't have access to Matlab at the moment so I can't test this, but perhaps you can create a .bat file similar to this and put...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How can find the sum of these numbers using for-loop?
@Kim Kiha Have you read the documentation? Here is a link for the for loop documentation: https://www.mathworks.com/help/matl...

environ 4 ans il y a | 0

Réponse apportée
What is the meaning of this code snippet?
What that looks like it is trying to do is to check to see if the caller provided an optional argument and setting the variable ...

environ 4 ans il y a | 0

Réponse apportée
how to find zero value with find
Matlab will index down the columns first. It appears that you want to go across the rows first. So, just transpose the matrix....

environ 4 ans il y a | 1

Charger plus