Question

MATLAB** I'm not sure what I'm doing wrong writing out my equation. I keep getting an...

MATLAB**

I'm not sure what I'm doing wrong writing out my equation. I keep getting an error. It has something to do with the line with the function written out. Here's what I have:

%3.2

clc
clear
close all
%plot ?(?,?)=?(1+sin?), as a 3D plot on the domain ?∈[−8,8], ?∈[−8,8].
x=[-8:8];
y=[-8,8];
z=x(sin(y)+1);
plot3(x,y,z)
title('Plot 3.2')

Homework Answers

Answer #1

code:

output :

raw_code :

clc
clear all
close all
%creating x and y in given domain
x = -8:8;
y = -8:8;
z = x.*(1+sin(y)); %given function
%plotting in 3d
plot3(x,y,z)
title('Plot 3.2')

***do comment for queries and rate me up****

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
I need to change the MATLAB code below to something else, but I need the solutions...
I need to change the MATLAB code below to something else, but I need the solutions to match each other. (Also try not to copy answer posted on chegg already) % % Problem 1.8 % clc; clear all; close all; % reset matlab w orthregdata; % load data n = length(a); w = ones(n,1); ma = w'*a/n; mb = w'*b/n; % ma = mean(a); % mb = mean(b); sa = norm(a-ma)/sqrt(n); sb = norm(b-mb)/sqrt(n); % sa = std(a,1); % Pass...
I keep getting error working on my project 2 MAT 243. What am I doing wrong?...
I keep getting error working on my project 2 MAT 243. What am I doing wrong? Step 3: Hypothesis Test for the Population Mean (I) A relative skill level of 1420 represents a critically low skill level in the league. The management of your team has hypothesized that the average relative skill level of your team in the years 2013-2015 is greater than 1420. Test this claim using a 5% level of significance. For this test, assume that the population...
I am using matlab and getting a "matrix dimensions error below" for line 22. Can someone...
I am using matlab and getting a "matrix dimensions error below" for line 22. Can someone spot the error and try the code to fix the error. %The beginning step is to generate a functionf(t) that consists of the sum %of the following components % 25 Hz cosine function of magnitude 1 % 50 Hz sine function of magnitude 1 % 40 Hz square wave function of magnitude 1 clear; clc; close all; %sample rate is given at 2500 Hz...
Problem 3 you can use Matlab and also i give u the Problem 1 code its...
Problem 3 you can use Matlab and also i give u the Problem 1 code its on Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandpass filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce this is the Problem 1 code and the solutin clear; clc;...