답변 있음
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

더 보기