回答済み
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 ...

4年弱 前 | 0

| 採用済み

回答済み
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(...

4年弱 前 | 0

| 採用済み

回答済み
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...

4年弱 前 | 1

| 採用済み

回答済み
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...

4年弱 前 | 1

| 採用済み

回答済み
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...

4年弱 前 | 0

| 採用済み

回答済み
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...

4年弱 前 | 1

| 採用済み

回答済み
How to remove GIT from my Matlab files
Try Preferences>General>SourceControl, set Source control to None.

4年弱 前 | 6

| 採用済み

回答済み
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 ...

4年弱 前 | 0

回答済み
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) - ...

4年弱 前 | 0

回答済み
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...

4年弱 前 | 1

回答済み
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...

4年弱 前 | 1

回答済み
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...

4年弱 前 | 0

| 採用済み

回答済み
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...

4年弱 前 | 1

回答済み
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 ...

4年弱 前 | 0

| 採用済み

回答済み
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...

4年弱 前 | 0

回答済み
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...

4年弱 前 | 0

回答済み
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...

4年弱 前 | 0

解決済み


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

4年弱 前

回答済み
What's going on when setting these parameters?
That sets the increment for the x vector. Read the documentation for the colon operator: colon

4年弱 前 | 0

回答済み
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 ...

4年弱 前 | 0

| 採用済み

回答済み
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...

4年弱 前 | 0

| 採用済み

回答済み
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...

4年弱 前 | 0

| 採用済み

回答済み
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 ...

4年弱 前 | 0

回答済み
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...

4年弱 前 | 1

回答済み
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...

4年弱 前 | 0

| 採用済み

回答済み
Yaw in mobile app
Typically, Azimuth is equivalent to Yaw (also Heading).

4年弱 前 | 0

回答済み
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...

約4年 前 | 0

| 採用済み

回答済み
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...

約4年 前 | 0

回答済み
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 ...

約4年 前 | 0

回答済み
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....

約4年 前 | 1

さらに読み込む